Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Alpine on ZFS root issues in wiki procedure
- ===========================================
- # Generic
- enable networking after booting in the alpine extended iso:
- $ mkdir -p /etc/networking
- --> /etc/network/interfaces
- """
- auto eth0
- iface eth0 inet dhcp
- """
- $ /etc/init.d/networking restart
- # Notes in the install guide:
- ## Part 1
- Guide: https://wiki.alpinelinux.org/wiki/Setting_up_ZFS_with_native_encryption
- The installation is from the current alppine extended iso.
- I add the part where I need to install ext4 and zfs (apk add e2fsprogs zfs).
- I load the zfs module (modprobe zfs).
- and than start with following the setps described in:
- 2 Setting up Alpine Linux Using ZFS with native encryption
- 2.1 Creating the Partition Layout
- 2.2 Setting up the root pool
- 2.2.1 Creating the required datasets
- 2.3 Creating the /boot filesystem
- 2.4 Mounting the /boot filesystem
- The only change I made, is that I name my zpool 'tank'instead of 'rpool'.
- ## Part 2
- Guide: https://wiki.alpinelinux.org/wiki/Alpine_Linux_in_a_chroot
- Issues:
- Entering your chroot
- $ chroot /mnt /bin/bash -l
- --> chroot: can't execute '/bin/bash': No such file or directory
- --> resolved using /bin/sh
- $ chroot /mnt /bin/sh -l
- ## Part 3
- Guide: https://wiki.alpinelinux.org/wiki/Setting_up_ZFS_with_native_encryption
- I following the setps described in:
- 2.5 Installing Alpine Linux
- 2.6 Unmounting the filesystems
- 2.7 Booting the system
- I start where the previous part ends, so I am still in the chroot environment.
- Issues:
- Install the ZoL and linux-vanilla package: apk add linux-vanilla zfs
- $ apk add linux-vanilla zfs
- --> ERROR: unsatisfiable constraints
- linux-vanilla (missing)
- required by: world[linux-vanilla]
- --> resolved by installing linux-lts
- $ apk add linux-lts zfs
- Edit the /etc/mkinitfs/mkinitfs.conf file and append zfs module to the features parameter:
- $ vi /etc/mkinitfs/mkinitfs.conf
- --> The folder /etc/mkinitfs does not exist
- --> Resolved by installing mkinitfs
- $ apk add mkinitfs
- --> Than the folder and file exist and can be edited
- Rebuild the initial RAM disk: # mkinitfs $(ls /lib/modules/)
- --> ls: /lib/modules/: No such file or directory
- /lib/modules/5.4.5-0-lts does not exist or is not a directory
- --> resolved by installing linux-lts
- $ apk add linux-lts
- --> Than the folder exist and the command finishes
- Edit the /etc/update-extlinux.conf file, set the root ZFS dataset and append the following kernel options to the default_kernel_opts parameter:
- $ vi /etc/update-extlinux.conf
- --> the folder and file do not exist
- --> resolved by installing syslinux
- # apk add syslinux
- --> Than the folder and file exist and can be edited
- Edit the /etc/update-extlinux.conf file, set the root ZFS dataset and append the following kernel options to the default_kernel_opts parameter:
- --> The wiki instructs to add: root=rpool/ROOT/alpine
- --> This should instead be: root=ZFS=rpool/ROOT/alpine
- Update extlinux's config (if you're not using a different bootloader)
- $ update-extlinux
- --> /boot is device /dev/sda1
- extlinux: no previous syslinux boot sector found
- --> Is this command output expected? Or does it point to an error?
- Reboot the system:
- --> After reboot the following message appears:
- --> Missing operating system.
- FATAL: INT18: BOOT FAILURE
- To go an fix this I did:
- - Reboot with iso
- - $ apk add e2fsprogs zfs
- - $ modprobe zfs
- - $ zpool import -a
- - $ mount -t zfs tank/ROOT/alpine /mnt/
- - $ mount -t ext4 /dev/sda1 /mnt/boot/
- - Redo steps from: Update extlinux's config...
- Update extlinux's config (if you're not using a different bootloader)
- $ update-extlinux
- --> /boot is device /dev/sda1
- extlinux: no previous syslinux boot sector found
- --> resolved by installing extlinux from the chroot environment
- $ extlinux --install /boot
- --> /boot is device /dev/sda1
- --> than exit, umount, and reboot
- Result after reboot:
- --> The ZFS modules are not loaded.
- Try running '/sbin/modprobe zfs' as root to load them.
- mount: mounting tank/ROOT/alpine on /sysroot failed: No such file or directory
- Mounting root failed.
- initramfs emergency recovery shell launched. Type 'exit' to continue boot
- etc. etc. etc.
- ## Part 4
- I think it is useful go give some more hints on how to get it running again in the installation environment after a reboot.
- Therefore these steps could be added/clarified in the troubleshooting section of the wiki:
- - Reboot with iso
- - $ apk add e2fsprogs zfs
- - $ modprobe zfs
- - $ zpool import -a
- - $ mount -t zfs tank/ROOT/alpine /mnt/
- - $ mount -t ext4 /dev/sda1 /mnt/boot/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement