New Linux Install removed secondary hard drive partition
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
New Linux Install removed secondary hard drive partition
I have a PC with two hard drives. The first drive was Windows XP and the secondary was just a storage drive.
I installed Red Hat 9 on the primary drive, and didn't think that RH would also take the secondary drive. (Maybe I was asleep during that part of the install).
My question is, Is it possible to remove the Linux partition from the secondary drive and restore the Windows partition? I have not saved anything to the secondary drive since the RH install.
The files that were on the secondary drive are not critical, just desirable.
Did you mean that RH9 claimed all of your second harddrive or just part of it? I also use RH9 and have several hard drives. What happens when you use this command:
df
The above command should show you which partitions RH9 is currently using. However, it will only show you the partitions that RH9 currently has mounted, it will not show you all the partitons that exist. You could also try using the command below to find all of the partitions that exist on your second hard drive. Before doing that either use the su command to get superuser priveleges or log in as root. That is a lower case L in the command by the way and not the number 1. Use a lower case l.
/sbin/fdisk /dev/hdb -l
Remember that the above command as given would only show the partitions on your second hard drive. When I have installed RH9 or other versions of RH I have never let it do the partitioning automatically. I prefer to choose the custom installation option and then use the Disk Druid option for partitioning. I have never liked the idea of automatic partitioning (perhaps it is ok?). The RH installation program also has an option to use fdisk for partitioning. I used that once with RH 7.3. I prefer the Disk Druid option because it seems more user friendly.
I want to make sure we correctly understand your current configuration before any of us suggest what to do.
PS, on second thought do not use the above fdisk command. When I tried that just now it not only gave the the information I wanted but it also announced this;
Warning: deleting partitions after 16
Fortunately, there is not anything important beyond partion 16 on my second hard drive. They are several almost empty partions that only have backup of data that exists on other partions. Obviously I am not an expert an using fdisk. I generally try to avoid using it and mostly use other software such as Partiton Magic and Disk Druid instead for partition. Can someone who knows more about fdisk please explain what I did wrong in the above command?
Well I rebooted and used had Partition Magic to view all my partitons. All of my important partitons are still there. Whatever was above partiton 16 was not important. I tested all of the copies of Linux that are on my second hard drive and they boot up ok and all data seems to be there.
I do not mean to steal your thread so, I will probably post my questions and problems with fdisk in a new conversation. So anyway everthing was ok but I believe fdisk did delete an unimportant partition or two.
[root@localhost root]# mount
/dev/hda2 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
If the 2nd drive is formated NTFS then that is probably why RH doesn't see it correctly. RH does not include NTFS support in its default kernel. To add support search the site for links to sourceforge's web site.
Try using fdisk to see as suggested above. You probably don't have 16 partitions on the drive anyway.
To be more specific, I have a 'removable' primary hdd, so I have a tray with a WinXP drive and another tray with RH9 drive.
I want the secondary drive to be able to be visible when I have the WinXP drive in. Currently, when I boot with the XP drive, it doesn't see the secondary drive.
My task is to get the secondary drive back in service for XP and not lose any of the files that were on it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.