LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making Linux Partition Bootable (https://www.linuxquestions.org/questions/linux-newbie-8/making-linux-partition-bootable-818322/)

zhtway 07-06-2010 01:31 PM

Making Linux Partition Bootable
 
Hi,

I am very new to Linux.
I have a little problem with dual boot installation.

There are two Hard Drives.
Win XP is on First HDrive.
Redhat Linux was installed on over Windows XP on second HDisk.

And later after a few months, the computer did startup.
I want to get rid of XP and load the linux alone.

Is there any way we can move over or install Linux bootloader on second HDisk? I can take out First Hdrive.

Thanks
Heathcliff

pixellany 07-06-2010 01:58 PM

Welcome to LQ;

Piece O'Cake.......:)

Boot into Linux

Run "fdisk -l" (no quotes---run it as root) and confirm how the drives are being seen. Let's assume that you Linux install is on sdb and sda is the one you are going to remove. Also verify which partition has /boot on it---let's assume sdb1. **
As root, run "grub" to start the grub shell, and then run these commands:

root (hd1,0) **
setup (hd1) **

Now, when you remove the other drive and start up again, what WAS sdb will now be sda, and you'll boot directly into Linux.

**
Note the numbering rules: To the Linux OS, sda is drive #1, and sda1 is the first partition on drive #1. To GRUB, hd0, means drive #1, and hd0,0 means the first partition on drive #1

zhtway 07-07-2010 10:05 AM

Hi pixellany,

Thanks for your reply. Your post give me valuable information.

Actually, I made an typo error in my post. The computer didn't start up.
When redhat linux was installed, did GRUB replaced the Windows XP boot loader on the First HardDrive?
So, if the first HD is removed, GRUB will not be on the second HardDrive. Will GRUB be moved when the GRUB setup is run?

thanks again,
Heathcliff

jefro 07-07-2010 03:47 PM

You don't move grub you re-install it. You also have a choice of other loaders and chain loading schemes.

saikee 07-07-2010 04:43 PM

It is a bit more complicated I am afraid.

If Red Hat Linux has been installed in the 2nd disk it would not like to find itself boot up as the 1st disk, even after you have correct the partition and boot disk reference in /etc/fstab, /boot/grub.grub.conf and /boot/grub/device.map. If it Selinux kicks in it will prevent you form booting into the Linux, unless you disable Selinux.

Remeber if you removed the first disk sda the second disk sdb will take up the first disk status to become sda, unless you are using IDE disks for which the hdx will remain unchanged but to Grub your (hd1) would disappear to become (hd0).

If you can keep the first disk then there is less hassele.

aus9 07-07-2010 08:05 PM

hi

I am not sure I can offer wiser words but attempt to.

If OP no longer needs any XP, why not install Redhat on first drive?

but that begs the question on which drive is faster?

IDE is slower than sata which is slower than SSD etc

so if zhtway would like to explore that opportunity gives us some specs or make your own decisions please?


All times are GMT -5. The time now is 08:41 PM.