I am trying to do a silent install of Ubuntu 10.04 lts server from a usb drive. It works fine for some machines, but whenever I use it in a machine where the usb stick gets mounted as /dev/sda instead of /dev/sdb, the machine won't boot from its hard drive after the install.
I have tried using udev in the initrd of the usb drive to make sure the usb drive is renamed to /dev/sdb, but /proc/partitions doesn't get updated, and even though the install finishes without errors, the machine can't be booted. It just shows a black screen with a blinking cursor in the corner. If I reinsert the usb drive while it is in that state, the machine will boot properly from the hard drive. So I know the files were copied successfully.
The udev rules I'm using are here, I put them in /etc/udev/rules.d/99-my.rules
Code:
NAME="sdb%n",KERNEL=="sda*",ENV{ID_BUS}=="usb",RUN+="/usr/bin/logger 'DEBUG:::1 kernel matched sda* renaming to sdbn [%E{ID_BUS}][%E{ID_FS_UUID}][%k][%E{ID_FS_LABEL_ENC}]"
NAME="sda%n",KERNEL=="sdb*",ENV{ID_BUS}!="usb",RUN+="/usr/bin/logger 'DEBUG:::2 kernel matched sdb* renaming to sdan [%E{ID_BUS}][%E{ID_FS_UUID}][%k][%E{ID_FS_LABEL_ENC}]"
I have tried renaming the rules so they are run at different times. I tried 61-my.rules, 59-my.rules, and 00-my.rules. Each time, I confirm that the debug messages appear in the syslog.
If I stop the installer at the configure keyboard prompt and do an ls /dev/sd*, I see
/dev/sdb /dev/sdb1 (no /dev/sda) as I expect, but if I cat /proc/partitions, I still see
/dev/sda and /dev/sda1 (no /dev/sdb)
At the end of the installer, checking ls /dev/sd*, I see the usb drive partition named sdb* and the hard drive partitions named sda*, but /proc/partitions still shows the usb drive as sda, and the hard drive as sdb.
I can see during the install that the following grub commands are run:
Code:
grub-install /dev/sda
grub-update
As a control test, I built a usb drive using Pendrivelinux's Universal USB Installer and used it to install Ubuntu 10.04 lts desktop. It also mounted the usb drive as /dev/sda, and completed successfully, but the machine failed to boot. I know it is not a bad machine because I have tried it on 3 dells of the same model, all with the same issue.
Any help or ideas would be greatly appreciated.
Bookmarks