You are not logged in.

#1 2010-05-03 19:19:36

dcj123
Member
Registered: 2009-12-27
Posts: 58

[SOLVED] Trying to boot off an external hard drive

Hello,

I have installed arch normally on my 250 GB external hard drive and rebuilt the initramfs with the usb hook; however, when I boot I get a kernel panic that says no filesystem can mount root. I have tried various grub and fstab configurations. What am I doing wrong?

Grub

title  USB Arch Linux
root   (hd0,0)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/(uuidcode) ro rootdelay=10
initrd /boot/kernel26-usb.img

Fstab

UUID="(uuidcode)" / ext4 noatime,nodiratime 0 1

The filesystem is ext4 and has no swap since this system has 4 GB of ram.

EDIT: Nevermind, by-uuid code didn't work I had to use /dev/sd**.

Last edited by dcj123 (2010-05-26 17:52:46)

Offline

#2 2010-05-03 20:04:12

Blue Peppers
Member
From: Newbury, UK
Registered: 2009-02-01
Posts: 178

Re: [SOLVED] Trying to boot off an external hard drive

the line

root   (hd0,0)

boots off the first partition of the first harddrive. (hd1,0) boots of the first partition of the second hard drive. (hd1,1) the second partition of second hard drive. and so on and so forth. This is documented in the usual /boot/grub/menu.lst file:

# DEVICE NAME CONVERSIONS
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,1)
#  /dev/sda3       (hd0,2)

Consistency is not a virtue.

Offline

#3 2010-05-03 22:54:17

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] Trying to boot off an external hard drive

... and exactly _how_ is arch installed on your second disk?(which partition(s))  Did you install grub? - and if so, exactly _where_ did you install it?
Your current menu.lst for archlinux indicates that arch is on the first partition of your first disk - and that you do not have a seperate boot-partition!

Offline

#4 2010-05-04 00:01:32

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [SOLVED] Trying to boot off an external hard drive

So if I tell the BIOS to boot from an external disk, and grub is properly installed in the MBR of that external disk, is it then guaranteed that grub will see that disk as (hd0)?

The one thing I really like about grub2 is that the search function allows me to get rid of the (hdX) guessing game.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#5 2010-05-04 02:15:46

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] Trying to boot off an external hard drive

grey wrote:

So if I tell the BIOS to boot from an external disk, and grub is properly installed in the MBR of that external disk, is it then guaranteed that grub will see that disk as (hd0)?

The one thing I really like about grub2 is that the search function allows me to get rid of the (hdX) guessing game.

So why does it have to be hd0? To me (anyway) a second disk should be hd1.
Putting grub on hd0 (ie mbr of first disk) and using "root=(hd1,0)"
Personally I think grub2 is a gigantic step backwards, though I agree that if you use only one distro - it doesn't really matter.
I am an ardent distrohopper - none of my (many) computers have less than 3 distros on them *lol* and I most certainly would not trust grub2 to figure it all out. Someone has to be in control, and I prefer that someone to be _me_ rather than grub2.

Having to run 'grub-update' reminds me just too much of lilo of yesteryear ... (stepping off my soapbox) - sorry, just couldn't help myself there ...

In this particular example - using a usb-disk - there are other factors as well - the op probably needs rootdelay=whatever and also has to make sure that all usb-stuff is loaded before the root filesystem gets mounted ... could be a bit hairy ...

Also - even if the bios is set to boot from the usb-disk, the root=(hd1,0) would probably still have to be used as sata/ide-drives are found before any usb-drives ... its just the nature of the beast

Last edited by perbh (2010-05-04 02:21:27)

Offline

#6 2010-05-04 07:25:15

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [SOLVED] Trying to boot off an external hard drive

<OT> I agree about grub2. I don't use it. I like menu.lst, it's simple in a good way, and replacing it with a method where you generate the config file with a script is a violation of KISS. However, I also like grub2's search function and I wish grub-legacy had it. The emphasis in my second sentence was on *one*.  </OT>

What I was asking is if the boot order in the BIOS influences the order in which grub sees the hard disks. In particular, if the first disk in boot order is always (hd0). The answer seems to be no.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#7 2010-05-04 14:23:19

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: [SOLVED] Trying to boot off an external hard drive

Blue Peppers wrote:

boots off the first partition of the first harddrive. (hd1,0) boots of the first partition

Mine boots in such a way. Since grub believe to have the first drive the one which got boot from wink

The only other error could be the /etc/fstab, which I invite to post off.

F


do it good first, it will be faster than do it twice the saint wink

Offline

#8 2010-05-04 15:13:25

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] Trying to boot off an external hard drive

grey wrote:

<OT> I agree about grub2. I don't use it. I like menu.lst, it's simple in a good way, and replacing it with a method where you generate the config file with a script is a violation of KISS. However, I also like grub2's search function and I wish grub-legacy had it. The emphasis in my second sentence was on *one*.  </OT>

What I was asking is if the boot order in the BIOS influences the order in which grub sees the hard disks. In particular, if the first disk in boot order is always (hd0). The answer seems to be no.

I am sorry - I thought your post was a statement - not a question.
And the answer is 'no' (as far as I have experienced). If your bios is made to boot from a second drive - the said drive will still be a second drive after the initrd is done ... but ... in order to load the initrd, then it's still the first disk (I think) ... *lol* I must admit that I have not tried too much to boot from an external disk ...

Last edited by perbh (2010-05-04 15:36:38)

Offline

Board footer

Powered by FluxBB