You are not logged in.

#1 2009-12-30 19:24:55

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Grub can't find root device after system update today (12/30)

I did a system update (kernel was updated to 2.6.32) today and turned off my computer. When I tried to boot up, Grub said it couldn't find my root device (/dev/sdb3) which is on my external hard drive. Grub and my kernel is on my external hard drive too (/dev/sdb1) so the hard drive itself seems to be working. If it'll help, here are my hooks:

HOOKS="base udev autodetect pata scsi sata usb filesystems"

Offline

#2 2009-12-30 20:04:37

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: Grub can't find root device after system update today (12/30)

You should change your fstab to use UUIDs and not /dev/ devices. To do this, use 'blkid' to get a list of the disk UUIDs, and change the associated entries in fstab from /dev/sd.. to be UID="long uuid string". For instance, my fstab is:

#/dev/sda4 (sometimes)
UUID="303889b7-ae78-436f-85ac-da95b2280596" / ext3 defaults 0 1

Offline

#3 2009-12-30 20:33:50

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Re: Grub can't find root device after system update today (12/30)

Question: Will the UUID be the same on every kernel? I know little about how they work...

Edit: Nevermind, I found an answer.

Last edited by megajosh2 (2009-12-30 20:39:12)

Offline

#4 2009-12-30 20:43:15

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: Grub can't find root device after system update today (12/30)

I believe the answer is yes, the UUID is the same no matter what OS is doing the booting or what kernel it is.

Offline

#5 2009-12-30 21:18:31

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Re: Grub can't find root device after system update today (12/30)

I edited my fstab and Grub entries so they used UUIDs, but Grub still can't find the root device (/dev/sdb3) on startup.

Here's my menu.lst:

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /arch/vmlinuz26 root=UUID=e0938d94-4650-4474-8ba6-2fcc246567af rw vga=773
initrd /arch/kernel26.img

# (1) Arch Linux Fallback
title Arch Linux Fallback
root (hd0,0)
kernel /arch/vmlinuz26 root=UUID=e0938d94-4650-4474-8ba6-2fcc246567af rw vga=773
initrd /arch/kernel26-fallback.img

and the blkid output for my external HD:

/dev/sdb1: UUID="8917e6cd-bac7-4aa3-ab20-2e276206ad47" TYPE="ext2" 
/dev/sdb2: UUID="c9a90e30-51a9-4538-95da-ec1dbc564805" TYPE="swap" 
/dev/sdb3: LABEL="Arch Linux" UUID="e0938d94-4650-4474-8ba6-2fcc246567af" TYPE="ext3"

Last edited by megajosh2 (2009-12-30 21:21:01)

Offline

#6 2009-12-30 21:22:56

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: Grub can't find root device after system update today (12/30)

oops, not in there! My menu.lst is:

# (0) Arch Linux
title  Arch Linux
root   (hd1,3)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/303889b7-ae78-436f-85ac-da95b2280596 ro vga=773
initrd /boot/kernel26.img

The UUID= part is supposed to go in the /etc/fstab.

Offline

#7 2009-12-30 23:18:02

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Re: Grub can't find root device after system update today (12/30)

I changed the entries to refrence the devices from /dev/disk/by-uuid but there's no difference. sad

Here's my menu.lst:

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /arch/vmlinuz26 root=/dev/disk/by-uuid/e0938d94-4650-4474-8ba6-2fcc246567af rw vga=773
initrd /arch/kernel26.img

# (1) Arch Linux Fallback
title Arch Linux Fallback
root (hd0,0)
kernel /arch/vmlinuz26 root=/dev/disk/by-uuid/e0938d94-4650-4474-8ba6-2fcc246567af rw vga=773
initrd /arch/kernel26-fallback.img

and the blkid output for my external HD:

/dev/sdb1: UUID="8917e6cd-bac7-4aa3-ab20-2e276206ad47" TYPE="ext2" 
/dev/sdb2: UUID="c9a90e30-51a9-4538-95da-ec1dbc564805" TYPE="swap" 
/dev/sdb3: LABEL="Arch Linux" UUID="e0938d94-4650-4474-8ba6-2fcc246567af" TYPE="ext3"

Offline

#8 2009-12-30 23:28:15

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: Grub can't find root device after system update today (12/30)

Any reason you didn't use the /dev/sdb1 UUID? Didn't you say at the top that grub & your kernel are on sdb1?

Offline

#9 2009-12-30 23:38:57

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Re: Grub can't find root device after system update today (12/30)

Before this kernel update, using /dev/sdb3 always worked, since this is the root device. Yes, the grub folder is on sdb1. The kernels are in an "arch" folder.

.:
arch  grub  System.map26  vmlinuz26

./arch:
kernel26-fallback.img  kernel26.img  System.map26  vmlinuz26

./grub:
default        fat_stage1_5       menu.lst           stage1
device.map     installed-version  minix_stage1_5     stage2
e2fs_stage1_5  jfs_stage1_5       reiserfs_stage1_5  xfs_stage1_5

Last edited by megajosh2 (2009-12-30 23:48:51)

Offline

#10 2010-01-01 07:05:05

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: Grub can't find root device after system update today (12/30)

Sounds like the problem is that grub can't find the kernel, not that the kernel can't find the root partition.

In your menu.lst, you might try changing the line:

root   (hd0,0)

to

root (hd1,0)

since your kernel would appear to reside on the first partition of the second drive in the system (/dev/sdb1 or hd1,0 in grubspeak)

See if that works!

Last edited by theapodan (2010-01-01 07:05:26)

Offline

#11 2010-01-01 15:37:33

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Re: Grub can't find root device after system update today (12/30)

I would have thought that too, but in the beginning, when setting up Arch Linux, I had to set it to root (hd0,0) even though that would be /dev/sda1. http://ubuntuforums.org/showthread.php?t=1146939

Changing it to (hd1,0) gives me error 17, but when it's on (hd0,0), the kernel DOES run, even though the root device (/dev/sdb3) can't be found. I also tried using /dev/sda3 but I got the same results.

Offline

#12 2010-01-01 17:16:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Grub can't find root device after system update today (12/30)

/dev/sd* are not (or weren't) guaranteed to stay the same, even after a reboot I believe so using uuid is preferable.
Also in your menu.lst _if_ and only if you are using uuid you don't need the line "root   (hd0,0)".

The uuid is unique (or should be unique, heck the string is quite long) so the partition is uniquely identified, unlike the /dev/sd* scheme that depends on the disk order.

However when installing grub you need to get it right but after than it is pain free. I have an usb flash disk that uses the uuid scheme and it boots fine everywhere I have tested so far, either machines with just 1 HD or machines with more than 1 HD.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#13 2010-01-01 18:40:55

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: Grub can't find root device after system update today (12/30)

megajosh2 wrote:

I would have thought that too, but in the beginning, when setting up Arch Linux, I had to set it to root (hd0,0) even though that would be /dev/sda1. http://ubuntuforums.org/showthread.php?t=1146939

Changing it to (hd1,0) gives me error 17, but when it's on (hd0,0), the kernel DOES run, even though the root device (/dev/sdb3) can't be found. I also tried using /dev/sda3 but I got the same results.

Ahhh, nuts.

Have you tried booting from the fallback image?

When you installed new kernel, maybe mkinitcpio didn't correctly build all the fs drivers you need.  When I originally installed arch, I had to regenerate the initrd after installation even though it was done during installation.

Try running this command:

mkinitcpio -p kernel26

You will probably have to chroot in from a livecd if the fallback image doesn't work.

R00KIE wrote:

Also in your menu.lst _if_ and only if you are using uuid you don't need the line "root   (hd0,0)".

I don't think that is right.  I don't think grub understands UUIDs.  The root (hdx,x) command sets grub to look for the kernel (hdx,x) and has nothing to do with the device where / is located.

Offline

#14 2010-01-01 22:08:56

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Grub can't find root device after system update today (12/30)

Check here http://bbs.archlinux.org/viewtopic.php?id=61080 it is possible, also on my notebook I have it commented and it does works .... maybe I'm asking for trouble later tongue

Now I can't find the place where I saw that "root   (hd0,0)" was not needed if using uuid.

menu.lst

# (0) Arch Linux
title  Arch Linux 64bit
#root   (hd0,0)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/f8e65b3f-7236-4c63-9d9f-bc4db94ea3bd rootfstype=ext4 ro quiet
initrd /boot/kernel26.img
savedefault

R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#15 2010-01-02 00:05:30

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Re: Grub can't find root device after system update today (12/30)

This is from pacman.log, from when I updated on 12/30.

[2009-12-30 10:19] synchronizing package lists
[2009-12-30 10:20] starting full system upgrade
[2009-12-30 10:29] upgraded consolekit (0.4.1-1 -> 0.4.1-2)
[2009-12-30 10:29] upgraded hdparm (9.27-1 -> 9.27-2)
[2009-12-30 10:29] upgraded libdrm (2.4.16-1 -> 2.4.17-2)
[2009-12-30 10:29] upgraded libgl (7.6-2 -> 7.7-1)
[2009-12-30 10:29] upgraded intel-dri (7.6-2 -> 7.7-1)
[2009-12-30 10:29] upgraded kernel26-firmware (2.6.31-1 -> 2.6.32.2-2)
[2009-12-30 10:29] >>> Updating module dependencies. Please wait ...
[2009-12-30 10:29] >>> MKINITCPIO SETUP
[2009-12-30 10:29] >>> ----------------
[2009-12-30 10:29] >>> If you use LVM2, Encrypted root or software RAID,
[2009-12-30 10:29] >>> Ensure you enable support in /etc/mkinitcpio.conf .
[2009-12-30 10:29] >>> More information about mkinitcpio setup can be found here:
[2009-12-30 10:29] >>> http://wiki.archlinux.org/index.php/Mkinitcpio
[2009-12-30 10:29] 
[2009-12-30 10:29] >>> Generating initial ramdisk, using mkinitcpio.  Please wait...
[2009-12-30 10:29] ==> Building image "default"
[2009-12-30 10:29] ==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/arch/kernel26.img
[2009-12-30 10:29] :: Begin build
[2009-12-30 10:29] :: Parsing hook [base]
[2009-12-30 10:29] :: Parsing hook [udev]
[2009-12-30 10:29] :: Parsing hook [autodetect]
[2009-12-30 10:29] :: Parsing hook [pata]
[2009-12-30 10:29] :: Parsing hook [scsi]
[2009-12-30 10:29] :: Parsing hook [sata]
[2009-12-30 10:29] :: Parsing hook [usb]
[2009-12-30 10:29] :: Parsing hook [filesystems]
[2009-12-30 10:29] :: Generating module dependencies
[2009-12-30 10:29] :: Generating image '/boot/arch/kernel26.img'...SUCCESS
[2009-12-30 10:29] ==> SUCCESS
[2009-12-30 10:29] ==> Building image "fallback"
[2009-12-30 10:29] ==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/arch/kernel26-fallback.img -S autodetect
[2009-12-30 10:29] :: Begin build
[2009-12-30 10:29] :: Parsing hook [base]
[2009-12-30 10:29] :: Parsing hook [udev]
[2009-12-30 10:29] :: Parsing hook [pata]
[2009-12-30 10:29] :: Parsing hook [scsi]
[2009-12-30 10:30] :: Parsing hook [sata]
[2009-12-30 10:30] :: Parsing hook [usb]
[2009-12-30 10:30] :: Parsing hook [filesystems]
[2009-12-30 10:30] :: Generating module dependencies
[2009-12-30 10:30] :: Generating image '/boot/arch/kernel26-fallback.img'...SUCCESS
[2009-12-30 10:30] ==> SUCCESS
[2009-12-30 10:30] upgraded kernel26 (2.6.31.6-1 -> 2.6.32.2-2)
[2009-12-30 10:30] upgraded libgcrypt (1.4.4-2 -> 1.4.5-1)
[2009-12-30 10:30] installed parted (1.9.0-3)
[2009-12-30 10:30] installed libatasmart (0.17-1)
[2009-12-30 10:30] installed devicekit-disks (009-3)
[2009-12-30 10:30] installed gnome-disk-utility (2.28.1-1)
[2009-12-30 10:30] installed gvfs (1.4.3-1)
[2009-12-30 10:30] upgraded libgnome (2.28.0-1 -> 2.28.0-2)
[2009-12-30 10:30] upgraded libsndfile (1.0.20-3 -> 1.0.21-1)
[2009-12-30 10:30] upgraded mesa (7.6-2 -> 7.7-1)
[2009-12-30 10:30] upgraded mono (2.6-1 -> 2.6.1-1)
[2009-12-30 10:30] upgraded mtasc (20080105-1 -> 20091229-1)
[2009-12-30 10:30] upgraded nano (2.2.0-1 -> 2.2.1-1)
[2009-12-30 10:31] upgraded netbeans (6.8-1 -> 6.8-2)
[2009-12-30 10:31] upgraded pycups (1.9.46-2 -> 1.9.47-1)
[2009-12-30 10:31] upgraded system-config-printer-common (1.1.13-1 -> 1.1.15-1)
[2009-12-30 10:31] upgraded system-config-printer-gnome (1.1.13-1 -> 1.1.15-1)
[2009-12-30 10:31] upgraded totem (2.28.4-1 -> 2.28.5-1)
[2009-12-30 10:31] upgraded tzdata (2009s-1 -> 2009t-1)
[2009-12-30 10:31] upgraded xorg-server (1.7.3.901-1 -> 1.7.3.902-1)

I'll try running mkinitcpio though.

Edit: from the chroot'd shell:

[ root@ubuntu ] [ / ]
[ # ] > mkinitcpio -p kernel26
==> Building image "default"
==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/arch/kernel26.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usb]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/arch/kernel26.img'...SUCCESS
==> SUCCESS
==> Building image "fallback"
==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/arch/kernel26-fallback.img -S autodetect
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usb]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/arch/kernel26-fallback.img'...SUCCESS
==> SUCCESS
[ root@ubuntu ] [ / ]
[ # ] > ls /boot/arch
kernel26-fallback.img  kernel26.img

I'll try booting with both the disk by UUID and the disk named as /dev/sdb3 in the Grub commands.

Last edited by megajosh2 (2010-01-02 00:17:45)

Offline

#16 2010-01-02 01:00:07

megajosh2
Member
Registered: 2009-04-15
Posts: 57

Re: Grub can't find root device after system update today (12/30)

I think I might have found the problem, but I don't think it was related to my menu.lst. Looking at the files on /dev/sdb1, I noticed there were two System.map26 and vmlinuz26 files each. One set was from October, and another set was from December 26. The December 26 ones, which where in the root of /dev/sdb1, weren't being used while the old ones in the "arch" folder were. I moved the newer ones to the arch folder, rebooted, and used the fallback kernel just to be safe and everything is working now. I just hope there's a setting somewhere to control where new System.map26 and vmlinuz26 files go...

Offline

#17 2010-01-03 17:30:32

unixbhaskar
Member
From: India
Registered: 2009-11-01
Posts: 27
Website

Re: Grub can't find root device after system update today (12/30)

I might consider myself lucky that I have had suffered by this very problem and fortunate few tricks work for me.

The steps I took:

1) put UUID to /etc/fstab.....not sure it is at all required ...but good thing to have.

2) keep grub entry as it is,i.e root=/dev/sd...

3)boot with fallback entry

4) Delete the existing kernel26.img file from the boot dir

5) Run mkinitcpio -p kernel26

it will create the new kernel26.img file in the /boot dir. Then please boot with the actual kernel entry( not the fallback one) and it works!

Try your luck


Musing with GNU/Linux!!

Offline

#18 2010-01-04 09:31:18

slot
Member
Registered: 2008-09-08
Posts: 67

Re: Grub can't find root device after system update today (12/30)

I'm on x86_64. After the last kernel update I could only boot to the fallback image. Now this morning could not boot at all. Tried to reboot a couple of times to see where it goes wrong. Then suddenly it boots on the new image. Confused roll
I have by-uuid entries in grub, but not in fstab, which I can see that I had, but commented out, so must have had some problems with them. I am now changing back to uuid again in fstab

Offline

#19 2010-01-04 10:32:45

Heema
Member
From: Egypt
Registered: 2008-08-12
Posts: 62

Re: Grub can't find root device after system update today (12/30)

i have the same issues too, and fallback is also working without any problem
http://bbs.archlinux.org/viewtopic.php?id=88022

i will try unixbhaskar steps

Offline

#20 2010-01-04 18:09:01

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Grub can't find root device after system update today (12/30)

Might have to do with this:

http://bugs.archlinux.org/task/17632


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#21 2010-01-05 09:39:13

Heema
Member
From: Egypt
Registered: 2008-08-12
Posts: 62

Re: Grub can't find root device after system update today (12/30)

some one posted a bug report

http://bugs.archlinux.org/task/17674

Offline

#22 2010-01-07 19:50:26

feralert
Member
Registered: 2007-03-21
Posts: 12

Re: Grub can't find root device after system update today (12/30)

I have the same issue, i have followed unixbhaskar's steps to no avail.

Any other ideas?

Thanks.

Offline

#23 2010-01-08 21:46:50

slot
Member
Registered: 2008-09-08
Posts: 67

Re: Grub can't find root device after system update today (12/30)

kernel upgrade just released fixed the problem here smile

Offline

#24 2010-01-09 00:22:32

Heema
Member
From: Egypt
Registered: 2008-08-12
Posts: 62

Re: Grub can't find root device after system update today (12/30)

yeah me too

i even restarted 2 times and it works without a problem

Offline

#25 2010-01-18 18:40:00

feralert
Member
Registered: 2007-03-21
Posts: 12

Re: Grub can't find root device after system update today (12/30)

slot wrote:

kernel upgrade just released fixed the problem here smile

No so lucky over here, problem persists :-(

I am still able to boot in safe mode though... lets hope it'll be fixed soon.

Offline

Board footer

Powered by FluxBB