You are not logged in.
Howdy-ha, folks. So I'm trying to install GRUB to a USB flash drive as a back-up boot disk while I clean up some of my UEFI boot entries--not to boot a system from the flash drive, but just to install GRUB to it. I did this successfully a couple weeks ago and then wiped the disk with dd for a LiveUSB. Now, when I try to install GRUB I keep getting the same set of error messages:
#grub-install --target=i386-pc --recheck --debug /dev/sdc
...
/usr/sbin/grub-bios-setup: info: guessed root_dev `hostdisk//dev/sdb' from dir `/boot/grub/i386-pc'.
/usr/sbin/grub-bios-setup: info: setting the root device to `hostdisk//dev/sdb,gpt2'.
/usr/sbin/grub-bios-setup: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet..
/usr/sbin/grub-bios-setup: error: filesystem `btrfs' doesn't support blocklists.
+ exit 1
The disk has an MBR table and a single fat32 partition with the label "Storage," so none of the conditions grub-install claims to be true actually is. Why does GRUB try to guess what my root device is? Why does it think I want to install to a multi-partition disk with multiple labels formatted to btrfs @ /dev/sdb, when I deliberately try not to do so?
Last edited by ANOKNUSA (2013-02-14 00:02:56)
Offline
I would try to back up all the data on the drive, and then try the "--force" flag. I don't really know what would cause this, though. '--force' makes it proceed without blocklists, although it might have some unforseen consequences.
EDIT: fixed typo
Last edited by alexanderthegre (2013-02-13 02:52:38)
Offline
The correct command is
# grub-install --target=i386-pc --boot-directory=<USB MOUNTPOINT>/boot --recheck --debug /dev/sdc
Without the --boot-directory= parameter, grub-install will by default use "--boot-directory=/boot" which is the /boot partition containing the kernels, irrespective of which device is passed at the end of grub-install command. This is not a bug but the way grub-install is designed. Perhaps the wiki article is not clear on the options.
Offline
@ the.ridikulus.rat: That presumes that I'm booting a system installed on the USB disk, which I'm not.
Anyhoo, I managed to install GRUB after zero-ing out the disk, writing a new partition table and reformatting. I haven't used GRUB(*2) in a very long time, and at some point it became substantially different. Thanks for the time, everyone.
Offline
@ the.ridikulus.rat: That presumes that I'm booting a system installed on the USB disk, which I'm not.
No, the --boot-directory parameter mentions where to install grub modules and its other files. It does not denote the /boot directory where the kernels reside. grub-install doesn't care about where you have installed the kernels as long as the file paths are defined correctly in grub.cfg . GRUB once installed is independent of the host OS from which it is installed. You can install GRUB to its own partition instead of /boot. I know this for sure because I interacted with GRUB upstream devs in irc few months back regarding the options present in grub-install.
Offline
Thanks for clarifying that; the string you posted gave me a different impression. I can't imagine why things need to be so complicated with it, but at least I got it installed. Thanks again for your time.
Offline