Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub-install: error: unknown filesystem #69

Open
proligde opened this issue Jan 3, 2024 · 4 comments · May be fixed by #75
Open

grub-install: error: unknown filesystem #69

proligde opened this issue Jan 3, 2024 · 4 comments · May be fixed by #75

Comments

@proligde
Copy link

proligde commented Jan 3, 2024

Hi there,

first of all - thanks for the great script! Unfortunately, I stumbled across a problem I seem to be unable to fix myself: After the majority of the installation finished without issues, it crashes while installing grub with:

Creating config file /etc/default/grub with new version
Processing triggers for man-db (2.11.2-2) ...
Installing for i386-pc platform.
grub-install: error: unknown filesystem.

I tried it with both Ubuntu 22.04 and Debian12, but got the same result. The rescue system on hetzner itself is currently a Debian12, too.

I switched to the chrooted environment manually and run the command again with verbose output (see attached File)

log.txt

Additional info: The server is a new AX52 with two nvme's and as far as I can tell, it boots in UEFI mode. Maybe that is an issue?

@cmadh
Copy link

cmadh commented Jan 7, 2024

Reverting latest commit seems to fix this issue.

Unfortunately scripts then fails when installing zst with "zfs command not found" on line 479 or so.

@russgh
Copy link

russgh commented Jan 7, 2024

I worked around this with the latest commit by:

  1. Installing ZFS from the hetzner rescue script (on server in rescue mode just type zfs and hit y. This compiles from latest openzfs release, and so takes some time. Hetzner script can be viewed here

  2. Then apt get update && apt get upgrade

  3. I then commented out lines 499 to 510 in this Debian 12 script to stop it replacing the ZFS we've just compiled:

echo "======= installing zfs on rescue system =========="
# echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections  
#  echo "y" | zfs
# linux-headers-generic linux-image-generic
#  apt install --yes software-properties-common dpkg-dev dkms
#  rm -f "$(which zfs)"
#  rm -f "$(which zpool)"
#  echo -e "deb http://deb.debian.org/debian/ testing main contrib non-free\ndeb http://deb.debian.org/debian/ testing main contrib non-free\n" >/etc/apt/sources.list.d/bookworm-testing.list
#  echo -e "Package: src:zfs-linux\nPin: release n=testing\nPin-Priority: 990\n" > /etc/apt/preferences.d/90_zfs
#  apt update  
#  apt install -t testing --yes zfs-dkms zfsutils-linux
#  rm /etc/apt/sources.list.d/bookworm-testing.list
#  rm /etc/apt/preferences.d/90_zfs
  apt update
  export PATH=$PATH:/usr/sbin
  zfs --version
  1. I also added -o compatibility=grub2 \ to the boot pool zpool create on line 554. This was based on the OpenZFS HOWTO for Debian bookworm. This stops flags being add from newer versions of ZFS which are incompatible with GRUB2
# shellcheck disable=SC2086
zpool create \
  $v_bpool_tweaks -O canmount=off -O devices=off \
  -o compatibility=grub2 \
  -o autotrim=on \
  -O normalization=formD \
  -O relatime=on \
  -O acltype=posixacl -O xattr=sa \
  -o cachefile=/etc/zpool.cache \
  -O mountpoint=/boot -R $c_zfs_mount_dir -f \
  $v_bpool_name $pools_mirror_option "${bpool_disks_partitions[@]}"

Tested on a Hetzner with legacy BIOS with nvmes but obviously this is all at your own risk.

It looked to me like the issue was flags on the boot pool from the newer version of ZFS not being compatible with GRUB2. Specifically for me: com.klarasystems:vdev_zaps_v2

d3routr added a commit to d3routr/zfs-hetzner-vm that referenced this issue Jan 7, 2024
d3routr added a commit to d3routr/zfs-hetzner-vm that referenced this issue Jan 7, 2024
@bitcrush
Copy link
Contributor

bitcrush commented Jan 23, 2024

On Ubuntu 20.04 I had to also configure the zpool create command for the rpool to deactivate a couple of features:

# shellcheck disable=SC2086
echo -n "$v_passphrase" | zpool create \
  $v_rpool_tweaks \
  -o feature@head_errlog=disabled \
  -o feature@vdev_zaps_v2=disabled \
  -o feature@zilsaxattr=disabled \
  -o cachefile=/etc/zpool.cache \
  "${encryption_options[@]}" \
  -O mountpoint=/ -R $c_zfs_mount_dir -f \
  $v_rpool_name $pools_mirror_option "${rpool_disks_partitions[@]}"

@chuegel
Copy link

chuegel commented Apr 20, 2024

Hit this issue on Ubuntu 22.04 as well.

Edit: this PR fixed it: #71

@congzhangzh congzhangzh linked a pull request Jun 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants