Fix fstab by using a UUID for boot

This commit is contained in:
Kris Lamoureux 2022-10-27 01:16:57 -04:00
parent 3fffb1c169
commit 6658fbf36d
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
2 changed files with 14 additions and 7 deletions

View File

@ -37,13 +37,19 @@ Due to [licensing concerns with OpenZFS and Linux](https://openzfs.github.io/ope
--graphics vnc,listen=127.0.0.1,port=5901 \
--boot uefi,loader=/usr/shar/OVMF/OVMF_CODE.fd
```
6. If dropped into initramfs
6. If dropped into UEFI shell
```
Shell> FS0:
FS0:\> EFI\debian\grubx64.efi
```
7. If dropped into initramfs
```
zpool import -f rpool
exit
```
7. Enter rpool password
8. Login with root's password
8. Enter rpool password
9. Login with root's password
### License
- DebianZFS is licensed under 0BSD, a public domain equivalent license; see the `LICENSE` file for more information

View File

@ -176,9 +176,10 @@ echo REMAKE_INITRD=yes > /etc/dkms/zfs.conf
# Install Grub for UEFI
apt-get install -y dosfstools
echo REMAKE_INITRD=yes > /etc/dkms/zfs.conf
mkdosfs -F 32 -s 1 -n EFI "${DISK}2"
mkdosfs -F 32 -s 1 -n EFI "\${DISK}2"
mkdir /boot/efi
echo "${DISK}2" /boot/efi vfat defaults 0 0 >> /etc/fstab
BLKID_BOOT="/dev/disk/by-uuid/\$(blkid -s UUID -o value \${DISK}2)"
echo "\${BLKID_BOOT} /boot/efi vfat defaults 0 0" >> /etc/fstab
mount /boot/efi
apt-get install -y grub-efi-amd64 shim-signed
apt-get purge -y os-prober