grub-installer fails if root is on 27th disk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub-installer (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: debian-installer
I tried installing ubuntu-server 11.04 on a real system with 28 disks, where the disk I wanted to use as the root partition happened to be enumerated as /dev/sdaa (notice the two "a"s -- /dev/sda through /dev/sdaz are used, and then /dev/sdaa is the next disk). The installer made it most of the way through, but the grub-installer step failed.
I tried this in a virtual environment (for easier reproduction), and did:
for i in $(seq -f'%02.0f' 28); do qemu-img create -f qcow2 d$i 4g; done
to make 28 virtual drives (the qcow2 format means this uses minimal disk space), and then:
kvm -net nic,model=virtio -net user -m 1024 -vga vmware -usbdevice tablet -smp 2 -vnc :1 \
-drive file=/home/
-drive file=d01,
-drive file=d02,
-drive file=d03,
-drive file=d04,
-drive file=d05,
-drive file=d06,
-drive file=d07,
-drive file=d08,
-drive file=d09,
-drive file=d10,
-drive file=d11,
-drive file=d12,
-drive file=d13,
-drive file=d14,
-drive file=d15,
-drive file=d16,
-drive file=d17,
-drive file=d18,
-drive file=d19,
-drive file=d20,
-drive file=d21,
-drive file=d22,
-drive file=d23,
-drive file=d24,
-drive file=d25,
-drive file=d26,
-drive file=d27,
-drive file=d28,
(the first two lines can be tweaked for your ISO location and UI preferences). In this VM, I chose to use whole disk on /dev/vdaa in the partitioner, and I got the same error with grub-installer failing.
I'm currently poking around the grub-installer script to see what exactly is failing. In /var/log/syslog (in the installer), I just see:
WARNING **: Configuring 'grub-installer' failed with error code 1
but no diagnostics from grub-installer that I can find.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: debian-installer (not installed)
Uname: Linux 2.6.39-999-generic x86_64
Architecture: amd64
Date: Tue May 3 11:26:53 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20101206)
MachineType: LENOVO 2901CTO
MemoryUsage:
total used free shared buffers cached
Mem: 7987000 7830544 156456 0 290636 5617776
-/+ buffers/cache: 1922132 6064868
Swap: 1738748 620 1738128
ProcEnviron:
LANGUAGE=en_US:en
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: debian-installer
UpgradeStatus: Upgraded to natty on 2011-03-24 (39 days ago)
dmi.bios.date: 10/27/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6UET61WW (1.41 )
dmi.board.name: 2901CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 2901CTO
dmi.product.
dmi.sys.vendor: LENOVO
tags: | added: patch |
affects: | debian-installer (Ubuntu) → grub-installer (Ubuntu) |
Changed in grub-installer (Ubuntu): | |
status: | New → Confirmed |
Looks like the bug is in this snippet of grub-installer:
# This code to set disc_offered was taken from lilo-installer nodevfs= $(mapdevfs $rootfs) nodevfs= $(mapdevfs $bootfs) $(device_ to_disk "$bootfs")
rootfs_
bootfs_
prefix=
case $prefix in
disc_offered_ devfs=" $bootfs"
disc_offered_ devfs=" $bootfs"
disc_offered_ devfs=" $bootfs" [hsv]d[ a-z]|/dev/ xvd[a-z] |/dev/cciss/ c[0-9]d[ 0-9]*|/ dev/ida/ c[0-9]d[ 0-9]*|/ dev/rs/ c[0-9]d[ 0-9]*|/ dev/mmcblk[ 0-9]|/dev/ ad[0-9] *|/dev/ da[0-9] *)
disc_offered_ devfs=" $prefix"
disc_offered_ devfs=$ (echo "$bootfs_nodevfs" | sed "s:\(.* \)/.*:\ 1/disc: ")
/dev/md)
;;
/dev/mapper)
;;
/dev/loop)
;;
/dev/
;;
*)
;;
esac
Since my root filesystem is on /dev/vdaa1, $prefix ends up as /dev/vdaa which doesn't match the second-to-last pattern (the intention is to catch it with /dev/[hsv]d[a-z] but that only matches /dev/vda through /dev/vdz. Tweaking that pattern is a little scary since it seems pretty magical...