7

My root partition is /dev/md0, I changed the size of the partition and filesystem. Now when I run update-grub and install-grub it fails:

# grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: unknown filesystem.

# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-67-generic
Found initrd image: /boot/initrd.img-4.4.0-67-generic
/usr/sbin/grub-probe: error: unknown filesystem.
Found linux image: /boot/vmlinuz-4.4.0-66-generic
Found initrd image: /boot/initrd.img-4.4.0-66-generic
/usr/sbin/grub-probe: error: unknown filesystem.
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

.

# cat /proc/mdstat
...
md0 : active raid1 sda1[1] sdb1[0]
      14553024 blocks [2/2] [UU]

unused devices: <none>

.

# cat /proc/partitions
major minor  #blocks  name

   8        0   39082680 sda
   8        1   14553088 sda1
   8       16   15646680 sdb
   8       17   14553088 sdb1
   9        0   14553024 md0

I don't dare reboot this server until this is fixed. Any suggestions?

Michael
  • 141
  • 2
  • 3
  • 8

2 Answers2

16

I had this error on a ext4 filesystem (without RAID). So maybe your problem is completely different. But in case it's useful for others landing here like I did:

When an ext4 filesystem has the metadata_csum_seed feature enabled, then grub-install will not work and report this grub-install: error: unknown filesystem error.

This is documented in Debian bug 866603 which also has a simple test for the problem:

grub-probe --target=fs --device /dev/sda1

It will give the same error if sda1 has that feature enabled.

You can also use tune2fs to check:

tune2fs -l /dev/sda1 | grep metadata_csum_seed

and you can disable the feature with

tune2fs -O ^metadata_csum_seed /dev/sda1
mivk
  • 5,811
0

I encountered this "grub-install: error: unknown filesystem." when I attempted to fix non-booting fresh installs of Debian11.6. (The Gparted help document on the Gparted live boot disk (USB) suggested trying grub-install, but it didn't work) I had used gparted to partition and mkfs my drives ahead of running the debian installer. The grub bootloaders installed would not work - they just booted to a black screen with the message "Error!" in lo-res text.

WORKAROUND: Perform the partitioning & mkfs(es) with the debian installer, NOT with gparted.

HTH someone installing Linux, plus support teams chasing this problem. Maybe try a byte-to-byte comparison of "identical" partitions set up by both methods

Rick
  • 1