Showing posts with label grub. Show all posts
Showing posts with label grub. Show all posts

2025/02/03

grub2 vs xfs

So I just tried

# grub2-install --boot-directory=/boot2 /dev/sdb1
Installing for i386-pc platform.
grub2-install: error: hd0 appears to contain a xfs filesystem which isn't known to reserve space for DOS-style boot.  Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by grub-setup (--skip-fs-probe disables this check, use at your own risk).

And then I did

# grub2-install --boot-directory=/boot2 /dev/sdb1 --skip-fs-probe
Installing for i386-pc platform.
grub2-install: warning: File system `xfs' doesn't support embedding.
grub2-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub2-install: error: will not proceed with blocklists.

But of course I'm an idiot; I don't want to install the grub loader on sdb1, I want to install it on sdb, where the BIOS can actually find it

# grub2-install --boot-directory=/boot2 /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.

2013/01/30

All the little houses falling over just right

To boot CentOS 5, all the following needs to be set up and running BEFORE you reboot your computer.

  1. GRUB installed on the boot drive (aka sda, ata1, sata1);
  2. a /boot that grub can find and read. In particular, it must be small and at the front of the boot drive;
  3. a kernel+initrd that contains the drivers to find and mount the final root filesystem (aka /); this can involve swearing, repeated applications of mkinitrd. At worse, you can pull initrd apart with gzip+cpio, add the drivers, modify init and repack it. Note that this is not a shell script but a nash script. CentOS 6 has moved to dash;
  4. a / that has a working init and all that entails (obviously);
  5. an /etc/fstab that won't fail out because fsck -A can't find a drive or partition. If you've moved / to another partition or to LVM, then you need to update fstab. You can set the last 2 columns to 0 if you don't want fsck to check that mount.