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

Re: Wheezy USB Harddrive install grub2 issues



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)

As Ian Fleming might have written: One drive is happenstance, two is
coincidence but three is enemy action.

> Bug report?

Come, come - where is your spirit of adventure and discovery?

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)

   mount /dev/sdb1 /mnt

and delete the /boot/grub directory on it

   rm -r /mnt/boot/grub

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



Reply to: