Skip to content
Snippets Groups Projects

pmbootstrap install: support new ondev boot label

Merged Imported Administrator requested to merge ondev-fat32 into master
1 unresolved thread

In order to support FAT32 as boot partition, the label is shortened from pmOS_inst_boot to pmOS_i_boot in pmaports!2337. Read the value from pmaports.cfg and fall back to the old value, so both are supported (-> building v21.06 and v21.03 will use the old label).

Remove the old codepath that would set "pmOS_boot" as label for the install partition, if the postmarketos-ondev package was older than 0.4.0. This is only the case on the long unsupported v20.05 branch.

Fixes #2041 (closed)

(Order of merging doesn't really matter since it's all backwards compatible, but I've added the "fixes" here, so let's merge the pmaports MR first and then this one.)

Edited by Administrator

Merge request reports

Checking pipeline status.

Approved by

Merged by AdministratorAdministrator 3 years ago (Jul 13, 2021 6:08pm UTC)

Merge details

Pipeline #190579 passed

Pipeline passed for 68fe7df0 on master

Deployed to dep‎loy‎ 5 months ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator added type::feature label · Imported

    added type::feature label

  • Administrator assigned to @ollieparanoid · Imported

    assigned to @ollieparanoid

    By Oliver Smith on 2021-07-11T21:14:58

  • Administrator changed the description · Imported

    changed the description

    By Oliver Smith on 2021-07-11T21:15:20

  • Administrator mentioned in issue #2041 (closed) · Imported

    mentioned in issue #2041 (closed)

    By Oliver Smith on 2021-07-11T21:15:40

  • Administrator mentioned in merge request postmarketos-ondev!5 (merged) · Imported

    mentioned in merge request postmarketos-ondev!5 (merged)

    By Oliver Smith on 2021-07-11T21:20:37

  • Administrator approved this merge request · Imported

    approved this merge request

    By Alexey Min on 2021-07-12T02:10:56

  • Author Owner

    changes seem fine, but I don't think I have a device that this can be tested on.

    By clayton craft on 2021-07-12T07:49:21

  • Administrator approved this merge request · Imported

    approved this merge request

    By clayton craft on 2021-07-12T07:49:25

    • Author Owner
      Resolved by Administrator

      I have a device with uefi booting from fat32 and I tried this:

      • This doesn't break just booting a non-ondev image from usb
      • This lets an ondev image boot without issue

      Actually installing the ondev image seems to still be broken, possibly because I haven't figured out how to install from external usb to internal emmc. At any rate, I get this error at the very end of Calamares:

      Installation Failed
      
      Command ondev-post-install finished with exit code 1.
      Output:
      + '[' -e /tmp/ondev-internal-storage ]
      + tune2fs -L pmOS_deleteme /dev/disk/by-label/pmOS_install
      tune2fs 1.46.2 (28-Feb-2021)
      + part_path=/dev/disk/by-label/pmOS_i_boot
      /de/disk/by-label/pmOS_i_boot contains a vfat file system labelled 'pmOS_i_boot'

      (It's trying to rename a vfat file system with tune2fs and failing here: https://gitlab.com/postmarketOS/postmarketos-ondev/-/blob/master/ondev-post-install.sh#L23)

      By Théo Friberg on 2021-07-13T14:51:14

      Edited by Ghost User
  • Administrator mentioned in issue postmarketos-ondev#51 · Imported

    mentioned in issue postmarketos-ondev#51

    By Oliver Smith on 2021-07-13T17:49:24

  • Administrator resolved all threads · Imported

    resolved all threads

    By Oliver Smith on 2021-07-13T17:49:59

  • Administrator added 2 commits · Imported

    added 2 commits

    • f62242ae - 1 commit from branch master
    • 68fe7df0 - pmbootstrap install: support new ondev boot label (MR 2083)

    Compare with previous version

    By Oliver Smith on 2021-07-13T17:57:31

  • Administrator enabled an automatic merge when the pipeline for 68fe7df0 succeeds · Imported

    enabled an automatic merge when the pipeline for 68fe7df0 succeeds

    By Oliver Smith on 2021-07-13T17:59:48

    • Author Owner

      @jenneron:

      I have this error when installing to USB storage too. I didn't know about this before as i hadn't tried because installing to external storage is useless for EFI devices which can't boot from sd card.

      I'm curious, how do you boot into the installer then, if you can't boot from SD?

      Depending on that it might make sense to hide the "install to external" option for your device (we could implement that).

      By Oliver Smith on 2021-07-13T18:55:26

      Edited by Ghost User
    • Author Owner

      My device has USB type A port, it can boot only from USB or eMMC

      By jenneron on 2021-07-13T18:55:48

      Edited by Administrator
    • Author Owner

      "Install to external" installs pmOS to USB where installer booted from. But as we discussed it's currently broken and seems to me useless.

      By jenneron on 2021-07-13T19:00:58

    • Author Owner

      well, maybe somebody wants to install it to the usb disk. so I think it makes sense to keep it (doesn't really hurt your use case, you can just select the other option).

      regarding being broken, I guess it would get fixed once we fix installing to internal as well, it's probably the same issue with renaming the partition?

      By Oliver Smith on 2021-07-13T20:38:52

    • Author Owner

      Installing to internal works for me. Installing and booting installed OS. My device boots a \efi\boot\bootarm.efi file from any FAT32 partition on eMMC. I don't know how and why it does so because our efivars are encrypted, we can't read and write them. But i figured that out in experimental way.

      I don't know which device @fsmnarmosta uses and how it is configured. It may do same thing with different filename, but it also may require adding an EFI boot entry to efivars. This case would need additional changes in postmarketos-ondev with efibootmgr tool.

      BTW installing to external is not completely broken, system boots after installing, but installed system has messed up partition layout. We need to look deeper at the stage on which installer fails.

      Speaking of booting from SD card we can implement mixed installation by flashing boot partition to eMMC and root partition to SD card.

      By jenneron on 2021-07-13T20:51:02

      Edited by Administrator
    • Author Owner

      I have an acer aspire switch 10, its uefi lets you select what file to boot. I have only gotten it to work with fat32 partitions, tho I'm not certain what it supports exactly.

      By Théo Friberg on 2021-07-14T18:57:05

    • Please register or sign in to reply
  • Administrator merged · Imported

    merged

Please register or sign in to reply
Loading