make on-device-installer work with pinephonepro
- New postmarketos-ondev version supports gpt: https://gitlab.com/postmarketOS/postmarketos-ondev/-/commit/ab5998de69abc149bd0740a3bc363560c8247192
- Fix the internal storage device name for the PPP
TODO:
-
test that installing with "msdos" partition type still works -
test installing from emmc to emmc -
test installing from sd to emmc -
test installing from sd to sd
How to test installing from emmc to emmc:
- I tried the blockdevice mode built into tow-boot, but flashing with dd was slow (891 kb/s) and aborted after 655 MiB
- After considering other various methods, the fastest was was:
- create the installer image (
pmbootstrap install --ondev
) - flash a regular pmOS install to SD card (e.g. with UI=console so you have networkmanager to connect to wifi etc. if needed)
- keep the SD plugged into your computer
- (extend the root partition to fill the whole SD card)
- copy the installer image to the SD card, e.g. to /root/installer.img
- plug the SD into the PPP and boot
- login via serial
dd if=/root/installer.img of=/dev/mmcblk0
- unplug the SD (otherwise the initramfs may get confused, see #1531)
- create the installer image (
I tested this with kernel 5.16.7, and it showed the pmOS splash, but then continued booting into a black screen instead of Xorg with calamares. Calamares launched though, and reacted to touch inputs, I was able to move to the next page by hitting where the continue button would be. Maybe this magically is fixed with the 5.17.9 kernel already that was just merged, we'll need to try again and fix it if needed.
Merge request reports
Activity
added device-pine64-pinephonepro label
- Resolved by Administrator
I tried running it on 5.17.9 and the display works fine. Testing the installer with an eMMC->eMMC install produced an error at the end of the installation process though:
State at that point:
localhost:~$ mount /dev/mmcblk0p3 on / type ext4 (rw,relatime) /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) tmpfs on /run type tmpfs (rw,nosuid,nodev,size=792780k,nr_inodes=819200,mode=755,inode64) dev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=10240k,nr_inodes=461807,mode=755,inode64) mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,inode64) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) efivarfs on /sys/firmware/efi/efivars type efivarfs (ro,nosuid,nodev,noexec,relatime) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755,inode64) cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate) cgroup on /sys/fs/cgroup/elogind type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/libexec/elogind/elogind-cgroups-agent,name=elogind) /dev/loop0 on /mnt/postmarketos-ondev-rootfs type ext4 (rw,relatime) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=396388k,nr_inodes=99097,mode=700,inode64) /dev/mmcblk0p2 on /mnt/install type ext4 (rw,relatime) /dev/mmcblk0p2 on /tmp/calamares-root-sjzvqtz3 type ext4 (rw,relatime) dev on /tmp/calamares-root-sjzvqtz3/dev type devtmpfs (rw,nosuid,noexec,relatime,size=10240k,nr_inodes=461807,mode=755,inode64) proc on /tmp/calamares-root-sjzvqtz3/proc type proc (rw,relatime) tmpfs on /tmp/calamares-root-sjzvqtz3/run type tmpfs (rw,relatime,inode64) tmpfs on /tmp/calamares-root-sjzvqtz3/run/udev type tmpfs (rw,nosuid,nodev,size=792780k,nr_inodes=819200,mode=755,inode64) sys on /tmp/calamares-root-sjzvqtz3/sys type sysfs (rw,relatime) localhost:~$ id uid=1000(user) gid=10(wheel) groups=10(wheel),10(wheel) localhost:~$ sudo blkid /dev/loop0: LABEL="pmOS_root" UUID="7b9fcd78-4863-4b91-afaa-6abd5e8e5aad" TYPE="ext4" /dev/mmcblk0p3: LABEL="pmOS_deleteme" UUID="8a748807-be95-4243-bcba-7f0e9c1fbca2" TYPE="ext4" /dev/mmcblk0p2: LABEL="pmOS_root" UUID="13230a61-bf63-4263-9147-0ccb4b407f28" TYPE="ext4" /dev/mmcblk0p1: LABEL="pmOS_i_boot" UUID="BBD8-E9A6" TYPE="vfat"
Edit: after rebooting the phone, it seems like the install was actually sucessfull. But the boot partition has the wrong label which somehow still produces a bootable system.
By Martijn Braam on 2022-07-08T06:35:04
Edited by Administrator
added 5 commits
-
70386287...724f4dc8 - 3 commits from branch
master
- 05ed22e0 - pine64-pinephonepro: fix dev_internal_storage (MR 3280)
- f4cdfcef - main/postmarketos-ondev: upgrade to 0.8.1 (MR 3280)
By Oliver Smith on 2022-07-10T13:49:46
-
70386287...724f4dc8 - 3 commits from branch
I'm still getting the black screen, even with the 5.17.9 kernel :\ Created a separate issue #1603 for that.
It happens almost every time. Once I was able to boot the on-device installer and go through the installation, but sadly I didn't use an image with the 0.8.1 version yet where I fixed the bug above and so I just ran into the same bug... then I build a new image with the bug fixed, but always got the black screen again.
@MartijnBraam: updated the MR to include the fix for the bug above. Can you verify that these work?
- eMMC -> eMMC
- (better wipe partition tables from eMMC after this test, or else you may later on boot into that installation insted of the new installation. should work with tow-boot exposing the storage devices + wipefs.)
- SD -> eMMC
- (use wipefs)
- SD -> SD
By Oliver Smith on 2022-07-10T13:55:04
- Resolved by Administrator
Tried the eMMC -> eMMC install first, the install process works fine except that the rootfs isn't resized on boot, that should be an initfs issue though
SD -> SD has the same behavior
By Martijn Braam on 2022-07-10T19:41:52
Edited by Administrator
SD -> eMMC install fails with mkfs.ext4 failing. It seems like the mkfs command runs into a timeout and gets killed
09:04:03 [2]: Hunspell dictionarh paths ("/usr/share/qt5/qtvirtue/hunspell", "/usr/share/myspelldisabled in config): sshd 09:04:16 [6]: Skipping feature (disab 09:04:16 [6]: Navigating to screen: fde_confirm 09:04:18 [6]: Navigating to feature: installConfirm 09:04:18 [6]: Navigating to screen: install_confirm 09:04:18 [2]: QQmlExpression: Expression qrc:/install_ [2]: Config::installFromExternalToInternal 09:04:19 [6]: Navigating to screen: wait ProcessResult Calamares::Utils::Runner::run() WARNING: Process "sh" timed out after 120000 ice blocks26738688/30145done Creating filesystem with 301block backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Allocating group tables: done Wr610/920/920 09:06:27 [2]: QProcess: Destroyed while process ("env") is still running. 09:06:27 [1]: void Calamares::ViewManager::onInstallationFaile) ERROR: Installation failed: "Command failed:<br><br>'sh -c mkfs.ext4 -O '^metadata_csum,^huge_file' -L 'pmOS_root' /tmp/ondev-internal-storage'<br><br> with output:<br><br>''" .. - message: "Command failed:<br><br>'sh -c mkfs.ext4 -O '^metadata_csum,^huge_file' -L 'pmOS_root' /tmp/ondev-internal-storage'< .. - details: 09:06:28 [6]: void Calamares::ViewManager::onInstallationFailed(e dialog closes. localhost:~$ ls -lah poot root 4.0K Jan 18 09:04 . drwxr-xr-x 21 root root 4.0K Jul 10 2022 .. drwxrwxrwt 2 root root 4.0t root 11 Jan 18 09:03 .X0-lock drwxrwxrwt 2 root root 4.0K Jan 18 09:03 .X11-unix lrwxrwxrwx 1 root root 14 Jan 18 09:04 ondev-internal-storage -> /dev/mmcblk0p2 -rw-r----- 1 root root 0 Jan 18 09:03 qipc_sharedmemory_calamares57a313c31732669128ce49271614e1e88c7e8e7c -rw-r----- 1 root root 0 Jan 18 09:03 qipc_systemsem_calamares57a313c31732669128ce49271614e1e88c7e8e7c -rw------- 1 root root 108 Jan 18 09:03 serverauth.XXXXEijMFH localhost:~$ fdisk /dev/mmcblk0 Welcome to fdisk (util-linux 2.38). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. fdisk: cannot open /dev/mmcblk0: Permission denied localhost:~$ p -ash: p: not found localhost:~$ fddo fdisk /dev/mmcblk0 [sudo] password for user: 123731968000 bytes, 241664000 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 0FE3F82B-93DC-4304-A37A-07541C2D6EBE Device Start End Sectors Size Type /dev/mmcblk0p1 2048 499711 497664 243M EFI System /dev/mmcblk0p2 499712 241661951 241162240 115G Linux filesystem Command (m for help):
By Martijn Braam on 2022-07-10T16:27:48
added 6 commits
-
f4cdfcef...0737d308 - 2 commits from branch
master
- f608015e - pine64-pinephonepro: fix dev_internal_storage (MR 3280)
- aa996d27 - main/postmarketos-ondev: upgrade to 0.8.1 (MR 3280)
- c798839c - pine64-pinephonepro: tweak kernel parameters (MR 3280)
- 34519013 - temp/calamares-extensions: fork, increase timeout (MR 3280)
By Oliver Smith on 2022-07-11T06:32:47
Toggle commit list-
f4cdfcef...0737d308 - 2 commits from branch
added 1 commit
- f50d8b96 - temp/calamares-extensions: fork, increase timeout (MR 3280)
By Oliver Smith on 2022-07-11T06:39:24
All the combinations with and without FDE seem to work great now for me :D
By Martijn Braam on 2022-07-12T05:28:48
Edited by Ghost Usermentioned in issue #1613 (closed)
By Oliver Smith on 2022-07-17T14:10:42