Skip to content

postmarketos-mkinitfs: mount /sysroot/boot from initramfs, not via fstab

Administrator requested to merge fix-fstab into master

Modify postmarketos-mkinitfs and postmarketos-base to mount the boot partition in the initramfs and not in /etc/fstab anymore.

While at it, remove the write_unless_modified logic from postmarketos-base.post-install, because the codepath of not modifying the given file is not useful and even got triggered once although it should not have been (#661 (closed)). The new /etc/fstab modifications are harmless now (and /etc/issue and /etc/motd aren't that important), but it's better to remove the function altogether, before we end up using it for something that is critical in the future.

Find the details in the commit messages.

Documentation

While implementing these fixes, I've updated the boot process and partition layout wiki pages. In particular, they have information about the pmos_boot and pmos_root kernel parameters now, and about the use case of having postmarketOS installed on SD and on eMMC at the same time.

Test plan

$ pmbootstrap install
(boot up)
$ cat /etc/fstab
$ mount | grep boot  # pay attention to rw/ro

I've verified it myself on qemu-amd64 and pine64-pinephone.

qemu-amd64:~$ cat /etc/fstab 
/dev/cdrom      /media/cdrom    iso9660 noauto,ro 0 0
/dev/usbdisk    /media/usb      vfat    noauto,ro 0 0

# This file is *not* used to mount / or /boot.
# More information: https://postmarketos.org/fstab
qemu-amd64:~$ mount | grep /boot
/dev/vda1 on /boot type ext4 (rw,relatime)

Fixes: #664 (closed), #661 (closed), #258 (closed), #586 (closed)

Edited by Administrator

Merge request reports

Loading