PDA

View Full Version : [SOLVED] 9.10 upgrade, grub can't find device by uuid or directly



Morrad
November 18th, 2009, 05:05 AM
Hello all.

I've tried two methods, both upgrading and fresh install, to move from 9.04 to 9.10 on my desktop machine. Both times, I can't get past the grub loading screen due to the following error and drop to busybox.


Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay=
- Check root=
- Missing modules
ALERT! /dev/disk/by-uuid/XXXX does not exist. Dropping to shell!

Indeed, within the buysbox prompt, looking at /dev/disk/by-uuid/ with grub legacy installed shows all the partitions except my root/boot partition. However, there are no /dev/sdaX entries at all. The partitions are visable from the grub command line, and I can manually input the boot commands using autocompletion just fine, its only after the boot command is given that they seem to disappear.

After searching the net, I tried to following approaches for each case, all without success.

Upgrading 9.04 -> 9.10 (Grub Legacy)

(I should note, 9.04 booted fine, and reinstalling it fresh also booted fine without changing anything).
Changing the root=UUID=XXXX statement in menu.lst to root=/dev/sdaY.
Adding rootdelay=120
Changing /etc/fstab from using UUIDs to directly using /dev/sdaX.

Fresh install of 9.10 (Grub2)

Changed GRUB_DISABLE_LINUX_UUID to true in /etc/default/Grub, then update-grub.
Removed the line with --no-floppy in it from the grub menu at boot time (I saw this recommended in some bug report that I can't find now).


My disk partitions:

/dev/sda1 root
/dev/sda2 swap
/dev/sda5 usr
/dev/sda6 var
/dev/sda7 tmp
/dev/sda8 home

So after all this, I haven't found the magic combination yet. Does anyone have any insight into what I'm missing, or any further recommendations? Right now, I have the 9.04->9.10 upgrade installed, so legacy grub is in the system.

Thanks.

Morrad
November 18th, 2009, 06:04 AM
Just remembered that I should have added: I install using the minimal CDs, and the CLI install option. Probably not especially relevant, but don't want to discount anything.

Morrad
November 18th, 2009, 04:55 PM
Bumping.

jago25_98
November 18th, 2009, 05:36 PM
I get

`Waiting for device /dev/sda6 /`
`Waiting for device /dev/.... for all my partitions`

is this the same problem?

oldfred
November 18th, 2009, 05:57 PM
For all kinds of boot issues we find this script to be one of the best ways to document the process to review what may be wrong. You can run from a liveCD or another working install.

Boot Info Script 0.34 courtesy of forum member meierfra
http://sourceforge.net/projects/bootinfoscript/
Instructions
http://ubuntuforums.org/showthread.php?t=1291280
cd to directory saved to:
chmod 755 boot_info_script034.sh
sudo ./boot_info_script034.sh
or as example if on desktop
sudo bash ~/Desktop/boot_info_script*.sh
This will create a RESULTS.txt file in the same directory. Paste the entire contents of that file back here. Once pasted highlight all text and click the # sign on the toolbar to place code tags around the text.

Separate question, why separate partitions for usr, var, & tmp? I understand years ago that was standard and for a server you may want to do that but for a normal desktop it seems like overkill.

Morrad
November 18th, 2009, 06:20 PM
For all kinds of boot issues we find this script to be one of the best ways to document the process to review what may be wrong...
Thanks, I'll run that script as soon as I get home from work and post the results (perhaps 5-6 hours from now).

Question: it looks like it needs to be run from a bash shell? (ie, using sudo bash script_name?)



Separate question, why separate partitions for usr, var, & tmp? I understand years ago that was standard and for a server you may want to do that but for a normal desktop it seems like overkill.
It definately is overkill. I remember a couple years ago I wanted to try to record some video games, and thought that it might be a good idea to have a separate tmp directory so as not to overflow either root or home. I don't have a good excuse for usr or var though.

I do have a home server that similarly partitioned, but you're right, it is overkill for the desktop. I could change it back next time I do a clean install (which I may before trying the script).


I get

`Waiting for device /dev/sda6 /`
`Waiting for device /dev/.... for all my partitions`

is this the same problem?
I don't recall seeing a similar error while booting my system, jago.

jago25_98
November 18th, 2009, 06:34 PM
============================= Boot Info Summary: ==============================

=> Grub0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #6 for /boot/grub/stage2 and /boot/grub/menu.lst.

sda1: __________________________________________________ _______________________

File system: vfat
Boot sector type: Dell Utility: Fat16
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sda2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM

sda3: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

sda6: __________________________________________________ _______________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.10
Boot files/dirs: /boot/grub/menu.lst /etc/fstab

sda7: __________________________________________________ _______________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda8: __________________________________________________ _______________________

File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /BOOT.INI /bootmgr /BOOTMGR /ntldr /NTLDR
/NTDETECT.COM /ntdetect.com

sda9: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sda10: __________________________________________________ _______________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sda11: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.10
Boot files/dirs: /etc/fstab

sda4: __________________________________________________ _______________________

File system: vfat
Boot sector type: DEll Recovery: Fat32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0bce05e7

Partition Boot Start End Size Id System

/dev/sda1 63 240,974 240,912 6 FAT16
/dev/sda2 * 240,975 163,686,284 163,445,310 7 HPFS/NTFS
/dev/sda3 163,686,285 969,844,049 806,157,765 f W95 Ext d (LBA)
/dev/sda5 163,686,411 167,590,079 3,903,669 82 Linux swap / Solaris
/dev/sda6 167,590,143 245,007,314 77,417,172 83 Linux
/dev/sda7 245,007,378 362,201,489 117,194,112 83 Linux
/dev/sda8 362,201,553 367,438,679 5,237,127 1b Hidden W95 FAT32
/dev/sda9 367,438,743 659,018,429 291,579,687 7 HPFS/NTFS
/dev/sda10 719,583,543 969,844,049 250,260,507 83 Linux
/dev/sda11 659,018,493 719,583,479 60,564,987 83 Linux
/dev/sda4 969,844,050 976,768,064 6,924,015 db CP/M / CTOS / ...


blkid -c /dev/null: __________________________________________________ __________

/dev/loop0: TYPE="squashfs"
/dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="07D8-050D" TYPE="vfat"
/dev/sda2: UUID="C6D455FED455F163" TYPE="ntfs"
/dev/sda4: LABEL="DellRestore" TYPE="vfat"
/dev/sda5: UUID="89439604-b5c7-42c0-9da4-0cc7c232a2b2" TYPE="swap"
/dev/sda6: UUID="4111834b-26e3-4ae6-aac0-c40ae8acec1a" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: UUID="cb055cba-db2b-4fb7-adf9-e09702661fe6" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda8: LABEL="MEDIADIRECT" UUID="07D8-050D" TYPE="vfat"
/dev/sda9: UUID="3038CACA38CA8DF2" LABEL="WindowsStorage" TYPE="ntfs"
/dev/sda10: LABEL="LinStor" UUID="6368746f-2074-616b-6f65-207575696400" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda11: UUID="2a98fb72-5fce-41af-a32c-50244ce389cc" TYPE="ext4"

=============================== "mount" output: ===============================

aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
/dev/sr0 on /cdrom type iso9660 (rw)
/dev/loop0 on /rofs type squashfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
/dev/sda11 on /target type ext4 (rw,errors=remount-ro)
/cdrom on /target/media/cdrom0 type none (rw,bind)
proc on /target/proc type proc (rw)
sysfs on /target/sys type sysfs (rw)
devpts on /target/dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)


================================ sda2/boot.ini: ================================

[boot loader]

timeout=1

default=multi(0)disk(0)rdisk(0)partition(2)\WINDOW S

[operating systems]

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect




=========================== sda6/boot/grub/menu.lst: ===========================

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=4111834b-26e3-4ae6-aac0-c40ae8acec1a ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,7)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash rootflags=data=writeback

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Microsoft Windows XP Professional
root (hd0,1)
savedefault
makeactive
chainloader +1

title Ubuntu Linux
root (hd0,5)
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=4111834b-26e3-4ae6-aac0-c40ae8acec1a ro quiet rootflags=data=writeback
initrd /boot/initrd.img-2.6.31-14-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:

title Quick Boot to Firefox (xPud)
root (hd0,5)
kernel /boot/xpud-0.8.9-image noisapnp lang=en quiet

title Dell Laptop Hardware Test Utility
root (hd0,0)
savedefault
makeactive
chainloader +1

title Ubuntu, Realtime Kernel
(root (hd0,5)
kernel /boot/vmlinuz-2.6.28-3-rt root=UUID=4111834b-26e3-4ae6-aac0-c40ae8acec1a
initrd /boot/initrd.img-2.6.28-3-rt
quiet

=============================== sda6/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0

# /dev/sda8
/dev/sda7 / ext3 noatime,nodiratime,errors=remount-ro,data=writeback 0 1

# /dev/sda6
/dev/sda6 /home ext3 relatime 0 2

# /dev/sda7
/dev/sda7 none swap sw 0 0

=================== sda6: Location of files loaded by Grub: ===================


85.8GB: boot/grub/menu.lst
85.8GB: boot/grub/stage2
85.8GB: boot/initrd.img-2.6.28-12-generic
85.8GB: boot/initrd.img-2.6.28-13-generic
85.8GB: boot/initrd.img-2.6.28-14-server
85.8GB: boot/initrd.img-2.6.28-3-rt
85.8GB: boot/vmlinuz-2.6.28-12-generic
85.8GB: boot/vmlinuz-2.6.28-13-generic
85.8GB: boot/vmlinuz-2.6.28-14-server
85.8GB: boot/vmlinuz-2.6.28-3-rt
85.8GB: boot/vmlinuz-2.6.31-14-generic
85.8GB: boot/vmlinuz-2.6.31-14-generic-pae
85.8GB: boot/vmlinuz-2.6.31-9-rt
85.8GB: initrd.img
85.8GB: initrd.img.old
85.8GB: vmlinuz
85.8GB: vmlinuz.old

================================ sda8/boot.ini: ================================

[boot loader]

timeout=0

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect /KERNEL=NTOSBOOT.EXE /maxmem=768


================================ sda8/BOOT.INI: ================================

[boot loader]

timeout=0

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect /KERNEL=NTOSBOOT.EXE /maxmem=768


=============================== sda11/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda11 during installation
UUID=2a98fb72-5fce-41af-a32c-50244ce389cc / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=89439604-b5c7-42c0-9da4-0cc7c232a2b2 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

=================== sda11: Location of files loaded by Grub: ===================


337.4GB: boot/vmlinuz-2.6.31-14-generic
337.4GB: vmlinuz

oldfred
November 18th, 2009, 07:15 PM
jago25_98 please post to a separate thread. It is considered impolite to highjack a thread. Your issues are different than the OP - Original Poster and it gets too confusing to answer two sets of issues in one thread.

Morrad
November 18th, 2009, 10:44 PM
I've had a chance to run the script, and have it attached. I ran the script while chroot'ed from an ubuntu alternate cd onto the installed system.

Before running the script, I did a clean install of 9.10 on /dev/sda, using a root partition, swap, and home directory, to get rid of my fiddling with settings and unnecessary partitions.

The crap on my second hard disk is from trying to do a raid install a couple days ago (I not wanting to do this now). The third hard drive is the memory stick that the livecd is running off of.

oldfred
November 18th, 2009, 11:54 PM
The boot part looks ok but it is reporting overlapping partitions and other drive errors.

First take a look at this thread on raid. There are issues with Karmic finding old raid settings in partitions:
Presence1960 on remove old raid setting from HD
http://ubuntuforums.org/showthread.php?t=1325650

If that does not resolve your issues I would try testdisk which you can download from the repositories and it is on many LiveCDs. Testdisk can check and repair partition info in most cases.

If you have any valuable data on these drives I would make sure you have backups.

Beyond that any thing else is beyond my experience.

Morrad
November 19th, 2009, 12:22 AM
The boot part looks ok but it is reporting overlapping partitions and other drive errors.

To me it looks like the only errors reported are for /dev/sdb, which I'm not using at all. Are you saying that this is somehow interfering with trying to boot off of /dev/sda?

oldfred
November 19th, 2009, 12:39 AM
You could try unplugging sdb and see if it then boots ok. I agree that I do not see any mounting of sdb to boot but it may be scanning for drives and finds issues with sdb.

Morrad
November 19th, 2009, 12:43 AM
Well this is interesting. I decided to unplug my second drive to see what would happen, and it boots.

I run blkid, and it spits out


# blkid
/dev/sda: TYPE="nvidia_raid_member"
/dev/mapper/nvidia_hhjaecfe1: UUID="(uuid of sda1)" TYPE="ext4"
/dev/mapper/nvidia_hhjaecfe2: UUID=... TYPE="swap"
/dev/mapper/nvidia_hhjaecfe5: UUID=... TYPE="ext4"

So it looks like the installer decided to set up the disk as a member of a raid array. I'm not sure how this happened, as I have raid disabled in the BIOS, and when ubuntu asked me if I wanted to set up the hard disk as raid, I answered no.

I guess my question now is do I leave it alone now as is, since the vodoo magic allows me to boot, or do I do something about this, and if so, what?

Morrad
November 19th, 2009, 12:53 AM
Using the command for post number 4 in the thread linked to by oldfred earlier (http://ubuntuforums.org/showthread.php?t=1325650), I was able to remove the raid mapping from my first hard disk.

I'm going to try to plug the second disk back in and see if I need to or can repeat the procedure there now.

Morrad
November 19th, 2009, 12:57 AM
Ok, so it was still able to boot with the second drive plugged in. I needed to repeat that command, but it looks like the traces of those raid drives are disappeared now.

I'm going to mark this thread as solved. Thanks for your help, and the link, oldfred.

oldfred
November 19th, 2009, 01:53 AM
Glad you got it working.

I would not have suggested the raid info unless you had mentioned as I did not see it in the script. I thought it internally ran the blkid and should have shown it. And your later listing of blkid did show it.

I think you may still have issues with your second drive. If so try testdisk. There are a very few people here that can use command line cfdisk commands to rewrite partition info. I do not yet understand what they do when that is done.