Michael Gisbers
2021-03-16
The following procedure may be used to move the GRUB2 bootloader from
/boot
within the standard ZFS root filesystem to a
partition using ext4 instead.
On an standard installation of Proxmox VE with ZFS in mode RAID-1 the second partition of both hard disks is used for UEFI.
If UEFI is not needed that partition can be used to install GRUB2 to that partition.
The following steps use the partitions /dev/sda2
and
/dev/sdb2
for the software raid and ext4 filesystem.
Check before using that partitions and change within the commands accordingly.
root@linux # mv /boot /boot.old
root@linux # mkdir /boot
root@linux # apt install -y mdadm
root@linux # mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
root@linux # mdadm --detail --scan /dev/md0 >/etc/mdadm/mdadm.conf
root@linux # mkfs.ext4 -L boot /dev/md0
root@linux # echo "/dev/md0 /boot ext4 defaults 0 0" >>/etc/fstab
root@linux # mount /boot
Search for currently installed kernel version using
dpkg -l 'pve-kernel-*'
and change command accordingly.
root@linux # apt reinstall pve-kernel-5.4.103-1-pve
root@linux # mv /etc/kernel/pve-efiboot-uuids /etc/kernel/pve-efiboot-uuids.old
root@linux # update-initramfs -u
root@linux # grub-install /dev/sda
root@linux # grub-install /dev/sdb
root@linux # update-grub2