Fedora 9 Booting from another harddisk

it is all about yesterday’s (oct 2nd, 2008)  SYA710 lab we all had newly installed fedora 9 on /dev/sdb. Due to some reason we have to change parameters at grub prompt. Here is explanation what i know..

So first of all we have to tell the grub actually where the kernel (vmlinuz &  initrd) is residing. it is represented by hard disk number + partition number. steps are given below.

step 1. grub>find /grub/stage1 (we can skip this step for our lab because we know that where the linux kernel is). so we can start from step 2.

it will gave us output (hd1,0).

Then we have to set root with command. But in our lab’s case we know that we have installed the linux on harddisk, which is ‘/dev/sdb’. so the command would be root(hd1,0). please note that it is hd1 not sd1.it is grub language.

step 2.: grub> root (hd1,0)

Now we have to tell the kernel which hard disk + partition has the ‘/’. (please note it not root’s home dir.), rather it is  the ‘/’ (root (top) of the file system

we can find that with

step 3: grub> find /etc/passwd (this command sometime dont work if the file system contains logical volumes. then we have to use linux boot disk to find the ‘/’ partiton.)

so if the  out put of above command is


then we will invoke the command..

step 4:grub> kernel /vmlinuz-<pressing tab will comlete the command automatically>  ro root=/dev/sdb2

This command tells the kernel on which hard disk’s which partition the ‘/’ of the file system is . In our case we had given /dev/sdb2 in response to (hd1,1). The thing is simple grub starts numbering   the hdds from zero (0) (NOT 1) i.e. hd0,hd1,hd2 & partitions with 0, 1, 2…..3.

But the kernel starts form 1 (not form zero)

kernel          hard disk & partition number          GRUB

sda1 hard disk 1, partition 1                           hd0,0

sda2 hard disk 1, partition 2                           hd0,1

sdb1 hard disk 2, partiton1.                            hd1,0

sdb2 hard disk 2 partition 2                            hd1,1

step 5:grub> initrd  /initrd…. < pressing tab wil complete the command>

step 6:grub> boot

This is how it works.

I hope you all would find it helpful.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s