SOLVED: grub2 on usb, no corresponding BIOS drive
Posted: 12 Sep 2014, 22:24
Trying to install grub2 on usb where I already had a grub legacy installation, I got the following error message:
Googling on the net I did not found much direct information. Except that:
http://phoxis.org/2010/02/03/installing ... ootloader/
Check if the BIOS drive and device file mapping is correct. If it is correct then it is all successful. Else you need to fix the mapping and rerun the script, and probably if the mapping showed is wrong, some other partition’s boot sector which was wrongly mapped might be wiped out.
and hyperlink to a device map section:
http://phoxis.org/2010/02/03/installing ... er/#devmap
You can edit, or create or edit and add correct device mappings in such a device.map file manually, in "boot/grub" of the partition where you want to install grub and invoke grub-install.
Looking in /mnt/sdb1/boot/grub/device.map I had:
Changing for (hd1) /dev/sdb does the job:
Code: Select all
root@porteus:~# grub-install --no-floppy --root-directory="/mnt/tmp" /dev/sdb
/dev/sdb does not have any corresponding BIOS drive.
http://phoxis.org/2010/02/03/installing ... ootloader/
Check if the BIOS drive and device file mapping is correct. If it is correct then it is all successful. Else you need to fix the mapping and rerun the script, and probably if the mapping showed is wrong, some other partition’s boot sector which was wrongly mapped might be wiped out.
and hyperlink to a device map section:
http://phoxis.org/2010/02/03/installing ... er/#devmap
You can edit, or create or edit and add correct device mappings in such a device.map file manually, in "boot/grub" of the partition where you want to install grub and invoke grub-install.
Code: Select all
root@porteus:~# mkdir /mnt/tmp
root@porteus:~# fdisk -l
...
...
Device Boot Start End Blocks Id System
/dev/sdb1 2048 15663103 7830528 83 Linux
root@porteus:~# mount /dev/sdb1 /mnt/tmp
root@porteus:~# grub-install --no-floppy --root-directory="/mnt/tmp" /dev/sdb
/dev/sdb does not have any corresponding BIOS drive.
Code: Select all
(hd0) /dev/sda
(hd1) /dev/sdc
Code: Select all
root@porteus:~# grub-install --no-floppy --root-directory="/mnt/tmp" /dev/sdb
Installation finished. No error reported.
This is the contents of the device map /mnt/tmp/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) /dev/sda
(hd1) /dev/sdb
root@porteus:~#