Skip to content
Snippets Groups Projects

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

Merged Imported Administrator requested to merge fix-fstab into master
All threads resolved!

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator approved this merge request · Imported

    approved this merge request

    By Alexey Min on 2020-07-08T06:52:42

  • Administrator resolved all threads · Imported

    resolved all threads

    By Oliver Smith on 2020-07-08T07:58:57

  • Author Owner

    Tested on a5lte and PineTab, both are booting fine..

    By Alexey Min on 2020-07-08T10:04:21

  • Administrator approved this merge request · Imported

    approved this merge request

    By Bart Ribbers on 2020-07-08T16:02:35

  • Administrator added 14 commits · Imported

    added 14 commits

    • d82bb1d1...4cff95a5 - 11 commits from branch master
    • 58ae4df2 - main/postmarketos-base: rm write_unless_modified (MR 1398)
    • 863ec713 - main/postmarketos-mkinitfs: mount /sysroot/boot (MR 1398)
    • 784782f5 - main/postmarketos-base: keep /etc/fstab (MR 1398)

    Compare with previous version

    By Bart Ribbers on 2020-07-08T16:03:36

  • Administrator enabled an automatic merge when the pipeline for 784782f5 succeeds · Imported

    enabled an automatic merge when the pipeline for 784782f5 succeeds

    By Bart Ribbers on 2020-07-08T16:03:48

  • Administrator merged · Imported

    merged

    By Bart Ribbers on 2020-07-08T16:05:15

  • Author Owner

    Somehow I forgot the cherry pick label.

    I've just verified that it works on the v20.05 branch too, with a pinephone and internal eMMC installation.

    I'll cherry pick it now.

    EDIT: cherry-picked, along with other patches touching postmarketos-base, so we have the same state as in master and patches apply cleanly.

    By Oliver Smith on 2020-07-13T22:46:41

    Edited by Administrator
  • added backport-to-v20.05 label

  • Administrator added 1 deleted label and removed type::feature label · Imported

    added 1 deleted label and removed type::feature label

  • Administrator mentioned in merge request !1850 (merged) · Imported

    mentioned in merge request !1850 (merged)

    By Oliver Smith on 2021-01-07T23:37:39

  • Please register or sign in to reply
    Loading