On 05/23/2012 01:31 AM, Brian wrote:
On Tue 22 May 2012 at 12:10:25 +0800, Bob wrote:
I just copied the install onto a 32GB memory card in a USB reader& grub
boots it on that no problem so it is specific to USB harddrives (or at
least the 3 I've tried, a Samsung a WD& a Seagate)
With your memory card you have a working Debian system. Boot it, plug in
one of your non-booting hard drives, mount it (assuming it is /dev/sdb1)
Actually I can still boot the system either by entering
the below commands at the grub>
linux /vmlinuz root=/dev/sda1 ro
initrd /initrd.img
boot
Or I have a booting squeeze pen-drive so by mounting the USB HDD Wheeze
before running update-grub2 I get a working grub entry for the USB HDD
Wheeze install
mount /dev/sdb1 /mnt
and delete the /boot/grub directory on it
rm -r /mnt/boot/grub
I've done this by booting the system and running
apt-get remove --purge grub-pc
Give the /dev/sdb1 partition a label
e2label /dev/sdb1 MY_LABEL
and install GRUB to the MBR of the hard drive with
grub-install --boot-directory=/mnt/boot /dev/sdb
Create the file /mnt/boot/grub/grub.cfg with the contents
menuentry 'Debian GNU/Linux, with Linux 3.2.0-2-686-pae' --class debian --class
gnu-linux --class gnu --class os {
insmod gzio
insmod part_msdos
insmod ext2
search --no-floppy --label --set=root MY_LABEL
linux /boot/vmlinuz-3.2.0-2-686-pae root=LABEL=MY_LABEL ro quiet
initrd /boot/initrd.img-3.2.0-2-686-pae
}
Finally, comment out everything in /mnt/etc/fstab apart from the proc
line and, for an ext4 filesystem, add
LABEL=MY_LABEL / ext4 errors=remount-ro 0 1
I've changed the partition label to USBDeb64 which is a bit shorter and
more convenient and updated fstab
I've reinstalled grub2
apt-get install grub-pc
And edited /boot/grub/grub.cfg despite that files insistence that you
not edit it
menuentry 'Debian GNU/Linux, with Linux 3.2.0-2-amd64' --class debian --class
gnu-linux --class gnu --class os {
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --label --set=root USBDeb64
echo 'Loading Linux 3.2.0-2-amd64 ...'
linux /boot/vmlinuz-3.2.0-2-amd64 root=LABEL=USBDeb64 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-2-amd64
}
When I reboot I end up at the grub> prompt again.
I'm not sure what if anything would be added by remotely installing grub
from a separate environment?
In the below bug report titled "unbootable when installing on USB drive"
he's talking about a BIOS that identifies the boot partition as a floppy
drive which mine doesn't so I don't think it's relevant but I'll email
in my problem and ask
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600580
I'm wondering if it has something to do with the drive appearing more
than once (3 times) in /dev/disk/by-id which the pen drive and USB SD
card reader both of witch GRUB can boot off do not.
ls -la /dev/disk/by-id/
total 0
drwxr-xr-x 2 root root 240 May 22 22:58 .
drwxr-xr-x 6 root root 120 May 22 18:54 ..
lrwxrwxrwx 1 root root 9 May 22 22:54 ata-ST1000LM010-9YH146_Z110VXRS ->
../../sda
lrwxrwxrwx 1 root root 10 May 22 22:54 ata-ST1000LM010-9YH146_Z110VXRS-part1
-> ../../sda1
lrwxrwxrwx 1 root root 9 May 22 22:54 scsi-SSeagatePortable -> ../../sda
lrwxrwxrwx 1 root root 10 May 22 22:54 scsi-SSeagatePortable-part1 ->
../../sda1
lrwxrwxrwx 1 root root 9 May 22 22:58 usb-Mass_Storage_Device_121F20110712-0:0
-> ../../sdc
lrwxrwxrwx 1 root root 10 May 22 22:58
usb-Mass_Storage_Device_121F20110712-0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 May 22 22:57
usb-TOSHIBA_TransMemory_0014780D094FBA508333016C-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 May 22 22:57
usb-TOSHIBA_TransMemory_0014780D094FBA508333016C-0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 May 22 22:54 wwn-0x5000c500464bb542 -> ../../sda
lrwxrwxrwx 1 root root 10 May 22 22:54 wwn-0x5000c500464bb542-part1 ->
../../sda1
I have tried feeding all 3 entries into /boot/grub/device.map, at
install time grub chooses ata-ST1000LM010-9YH146_Z110VXRS
if I enter
(hd0) /dev/disk/by-id/scsi-SSeagatePortable
into /boot/grub/device.map grub-install /dev/sda works with no errors
but I still end up at grub> on reboot
if I enter
(hd0) /dev/disk/by-id/wwn-0x5000c500464bb542
into /boot/grub/device.map grub-install /dev/sda works with no errors
but I still end up at grub> on reboot
Any other ideas?
Thanks for your help.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4fbc54eb.2090...@homeurl.co.uk