[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#457409: debian-installer: GRUB config needs to use UUIDs to avoid boot failure on Sun x4100 M2 (Galaxy)



Package: debian-installer
Severity: normal


We have a number of Sun x4100 M2 systems and have run into a significant
problem triggered by the newer ILOM service processors. The SPs provide a nifty
remote CD-over-network feature as part of their KVM function; unfortunately
this results in a race condition on newer kernels since /dev/sda might be the
first SCSI/SATA hard drive or the virtual CD-ROM.

The solution is to use UUIDs but the Etch installer doesn't appear to support
them. I ran into two problems which made this hard than it looks:

1) /dev/disks/by-uuid isn't available in the install kernel (at least for
   etch/amd64)
2) Even after creating the link grub's findfs will insist that the specified
	 UUID is invalid unless you use /sbin/blkd to read the UUID first. I'm
   guessing this causes something to refresh before findfs queries it.

Here's the process in our preseed/late-command script - it has a hardcoded
dependency on /dev/sda1 (which should be easy to fix) and I haven't
exhaustively tested it but this does work on both our real nodes and a test VM;
omitting any step below causes it to fail:

# Determine the UUID:
UUID=`/lib/udev/vol_id -u /dev/sda1`

# Create the /dev/disks/by-uuid link within /target
if [ ! -d /target/dev/disks/by-uuid/$UUID ]; then
	mkdir -p /target/dev/disks/by-uuid
	chroot /target ln -s /dev/sda1 /dev/disks/by-uuid/$UUID
fi

# Do an in-place conversion for the device name to UUID
chroot /target sed -i "s/\/dev\/sda1/UUID=$UUID/" /boot/grub/menu.lst /etc/fstab
# NOTE: while printing the UUID is useless, blkid MUST be run for update-grub to work!
chroot /target /bin/sh -c "/sbin/blkid blkid /dev/sda1 -s UUID -o value; /usr/sbin/update-grub"

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)



Reply to: