Bug#696877: installation-reports: Wheezy DI-b4-amd64-netboot-mini.iso from an usb stick fails trying to install grub
On 23/01/13 21:42, Steven Chamberlain wrote:
Hi,
It looks like some code is already there to avoid cdrom or USB install
media being used as the grub-install target.
In the grub-installer script:
552 # [...] if /cdrom seems
553 # to be a USB stick then (hd0) may not be safe. If we hit either of those
554 # checks, then try the disk containing /boot instead.
555 # The same goes for /hd-media, so avoid installing there as well.
556 cdsrc=$(mount | grep "on /cdrom " | cut -d' ' -f1)
557 cdfs=$(mount | grep "on /cdrom " | cut -d' ' -f5)
558 hdsrc=$(mount | grep "on /hd-media " | cut -d' ' -f1)
For hybrid media on USB it seems that /cdrom will be iso9660, so the
next thing preventing an install to (hd0) is if cdrom-detect/hybrid is
set to true.
This seems a bit of a long shot, but in cdrom-detect it looks like this
might go wrong if `list-devices cd; list-devices maybe-usb-floppy` finds
the install media before `list-devices usb-partition` does.
If someone who has hardware that can reproduce this, could please do the
following, it could really help explain this:
1. boot a USB install up to the 'Configure the network' step,
2. drop to the Alt-F2 shell,
3. run these commands and note the output from them:
# mount | grep cdrom
# list-devices cd
# list-devices maybe-usb-floppy
# list-devices usb-partition
# list-devices disk
Thanks!
Regards,
Hi,
Here's the output on a (laptop) machine of mine ...
# mount | grep cdrom
# list-devices cd
# list-devices maybe-usb-floppy
# list-devices usb-partition
/dev/sda4
# list-devices disk
/dev/sda
At this stage, all the installer can see is the USB stick.
I let the installer run on to the partition disks section and the output
is then ...
# mount | grep cdrom
# list-devices cd
/dev/sr0
# list-devices maybe-usb-floppy
# list-devices usb-partition
/dev/sda4
# list-devices disk
/dev/sda
/dev/sdb
So in grub terms the hard-drive is disk 1.
After the original installation, /boot/grub/device.map read:
(hd0) /dev/disk/by-id /usb-BUFFALO_ClipDrive_A3200510210000751-0:0
(hd1) /dev/disk/by-id/ata-Hitachi_HTS545025B9A300_100411PBN2061SFS47GT
and /boot/grub/grub.cfg had several set root='(hd1,msdos?)' statements.
This stuck me as not quite right so I deleted device map and ran
update-grub.
To avoid confusion, I don't think I'm using a 'hybid media on USB'.
I threw together a USB image with both 32- and 64-bit mini.iso and
a syslinux menu to choose between them. I didn't go anything specific
to create a USB/CD hybird.
I hope this helps. I'm willing supply more information if asked.
Regards,
--
Paul Bryan Roberts
pbronline-debian@yahoo.co.uk
Reply to: