Installing the kernel is not working
I'm trying to flash PostmarketOS to an Galaxy S2. flasher flash_kernel
is not working.
It seems like there is a bug when flashing the kernel, cause it writes files to /home/myUser/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100/boot
and looks for them at /mnt/rootfs_samsung-i9100/boot/initramfs
.
pmbootstrap flasher flash_kernel
- does not work
pmbootstrap flasher flash_rootfs
- works
I have tried creating a symlink, but that had no change at all, or I did the wrong symlink.
Troubleshooting is not helping and generally searching the internet did not get me any result.
I have cloned the git repo, because apt
installed a version that was way too old.
Debian 12.5, amd64
https://wiki.postmarketos.org/wiki/Samsung_Galaxy_SII_(samsung-i9100)
Side note: My phone identifies as GT-i9100, I'm not sure if that is the same as this one, but I'm trying my luck. Anyway the bug is independent of that.
My Terminal output:
myUser@laptop:~/temp-programs$ ll
total 4
lrwxrwxrwx 1 myUser myUser 30 Jun 18 22:04 pmbootstrap -> pmbootstrap.git/pmbootstrap.py
drwxr-xr-x 8 myUser myUser 4096 Jun 18 21:24 pmbootstrap.git
myUser@laptop:~/temp-programs$ ./pmbootstrap init
[18:45:21] Location of the 'work' path. Multiple chroots (native, device arch, device rootfs) will be created in there.
[18:45:21] Work path [/home/myUser/.local/var/pmbootstrap]:
[18:45:23] NOTE: pmaports path: /home/myUser/.local/var/pmbootstrap/cache_git/pmaports
[18:45:23] Choose the postmarketOS release channel.
[18:45:23] Available (10):
[18:45:23] * edge: Rolling release / Most devices / Occasional breakage: https://postmarketos.org/edge
[18:45:23] * v24.06: Latest release / Recommended for best stability
[18:45:23] * v23.12: Old release (supported until 2024-07-16)
[18:45:23] Channel [edge]:
[18:45:24] NOTE: pmaports is on master branch, copying git hooks.
[18:45:24] Choose your target device vendor (either an existing one, or a new one for porting).
[18:45:24] Available vendors (89): acer, alcatel, amazon, amediatech, apple, ark, arrow, asus, ayn, beelink, bq, clockworkpi, cubietech, cutiepi, dongshanpi, epson, essential, fairphone, finepower, fly, generic, goclever, google, gp, hisense, htc, huawei, inet, infocus, jolla, klipad, kobo, lark, leeco, lenovo, lg, librecomputer, linksys, mangopi, medion, meizu, microsoft, mobvoi, motorola, nextbit, nobby, nokia, nvidia, odroid, oneplus, oppo, ouya, pine64, planet, pocketbook, powkiddy, purism, qcom, qemu, qualcomm, radxa, raspberry, realme, samsung, semc, sharp, shift, sipeed, sony, sourceparts, surftab, t2m, thundercomm, tokio, tolino, trekstor, valve, vernee, videostrong, vivo, volla, wexler, wiko, wileyfox, xiaomi, xunlong, yu, zte, zuk
[18:45:24] Vendor [samsung]:
[18:45:25] Available codenames (137): a20, a2corelte, a3, a30, a32, a3y17lte, a5, a5xelte, a5y17lte, a6lte, a6plte, a7, a7y18lte, afyonltecan, apexq, ariesve, arubaslim, baffinlite, beyond1lte, chagallwifi, codina, codina-tmo, coreprimevelte, cprime, crespo, crownlte, d2vzw, degaswifi, dream, e7, espresso10, espresso7, expressatt, fortuna3g, fortunaltezt, gavini, golden, goyavewifi, goyawifi, gprimeltecan, gprimeltexx, grandmax, grandpplte, gt510, gt58, gta7litewifi, gtaxlwifi, gtel3g, gtelwifi, gtelwifiue, gtowifi, gts210lte, gts210velte, gts210vewifi, gts28velte, heatqlte, hero2lte, herolte, hlte, i747m, i8150, i8200, i9003, i9100, i9100g, i927, j1mini3g, j3ltetw, j3xnlte, j5, j5x, j5y17lte, j6lte, j6primelte, j7elte, j7eltetmo, j7y17lte, j8y18lte, jackpotlte, janice, jflte, jfvelte, jxelte, k3gxx, kccat6, kiran, klimtlte, klte, kminilte, kyle, kylepro, kyleprods, kylessopen, kylevess, logands, lt01, lt023g, m0, m3, maguro, manta, matisselte, matisseve, matissewifi, milletwifi, ms013g, n1awifi, n2awifi, n5110, nevisp, on7, on7xelte, p4note, p4wifi, royss, s3ve3g, s6500d, santos10wifi, serranodsdd, serranolte, serranove, skomer, star2lte, starlte, starqltechn, superior, t03g, t0lte, treltexx, trltexx, v1awifi, w767, xcover3lte, xcover4lte, zanin, zerofltexx, zeroltexx
[18:45:25] Device codename [i9100]:
[18:45:26] Which kernel do you want to use with your device?
[18:45:26] Downstream kernels are typically the outdated Android kernel forks.
[18:45:26] Upstream kernels (mainline, stable, ...) get security updates, but may have less working features than downstream kernels.
[18:45:26] Available kernels (2):
[18:45:26] * downstream: Downstream kernel
[18:45:26] * mainline: Close to mainline kernel
[18:45:26] Kernel [mainline]:
[18:45:27] Username [user]:
[18:45:28] Available providers for postmarketos-base-ui-wifi (2):
[18:45:28] * wpa_supplicant: Use wpa_supplicant as the WiFi backend. (default)
[18:45:28] * iwd: Use iwd as the WiFi backend (but may not work with all devices)
[18:45:28] Provider [default]:
[18:45:29] Update package index for armv7 (4 file(s))
0% [sudo] password for myUser:
[18:45:37] Available user interfaces (22):
[18:45:37] * none: Bare minimum OS image for testing and manual customization. The "console" UI should be selected if a graphical UI is not desired.
[18:45:37] * asteroid: (Wayland) Smartwatch UI from AsteroidOS
[18:45:37] * bananui: (Wayland) Keypad controlled UI for feature phones
[18:45:37] * cage: (Wayland) Kiosk WM
[18:45:37] * console: Console environment, with no graphical/touch UI
[18:45:37] * fbkeyboard: Plain framebuffer console with touchscreen keyboard support
[18:45:37] * gnome: (Wayland) Gnome Shell
[18:45:37] * gnome-mobile: (Wayland) Gnome Shell patched to adapt better to phones (Experimental)
[18:45:37] * i3wm: (X11) Tiling WM (keyboard required)
[18:45:37] * kodi: (GBM) 10-foot UI useful on TV's
[18:45:37] * lxqt: (X11) Lightweight Qt Desktop Environment (stylus recommended)
[18:45:37] * mate: (X11) MATE Desktop Environment, fork of GNOME2 (stylus recommended)
[18:45:37] * moonlight: (Wayland) Open Source PC client for NVIDIA GameStream, as used by the NVIDIA Shield
[18:45:37] * openbox: (X11) A highly configurable and lightweight X11 window manager (keyboard required)
[18:45:37] * phosh: (Wayland) Mobile UI initially developed for the Librem 5
[18:45:37] * plasma-desktop: (X11/Wayland) KDE Desktop Environment (works well with tablets)
[18:45:37] * plasma-mobile: (Wayland) Mobile variant of KDE Plasma (does not run without hardware acceleration)
[18:45:37] * shelli: Plain console with touchscreen gesture support
[18:45:37] * sway: (Wayland) Tiling WM, drop-in replacement for i3wm (DOES NOT RUN WITHOUT HW ACCELERATION!)
[18:45:37] * sxmo-de-dwm: Simple Mobile: Mobile environment based on SXMO and running on dwm
[18:45:37] * sxmo-de-sway: Simple Mobile: Mobile environment based on SXMO and running on sway
[18:45:37] * weston: (Wayland) Reference compositor (demo, not a phone interface)
[18:45:37] * xfce4: (X11) Lightweight desktop (stylus recommended)
[18:45:37] User interface [phosh]:
[18:45:39] Additional options: extra free space: 0 MB, boot partition size: 256 MB, parallel jobs: 9, ccache per arch: 5G, sudo timer: False, mirror: http://mirror.postmarketos.org/postmarketos/
[18:45:39] Change them? (y/n) [n]:
[18:45:41] Additional packages that will be installed to rootfs. Specify them in a comma separated list (e.g.: vim,file) or "none"
[18:45:41] Extra packages [vim,tree]:
[18:45:45] Your host timezone: Europe/Berlin
[18:45:45] Use this timezone instead of GMT? (y/n) [y]:
[18:45:46] Choose your preferred locale, like e.g. en_US. Only UTF-8 is supported, it gets appended automatically. Use tab-completion if needed.
[18:45:46] Locale [en_US]:
[18:45:47] Device hostname (short form, e.g. 'foo') [samsung-i9100]:
[18:45:49] After pmaports are changed, the binary packages may be outdated. If you want to install postmarketOS without changes, reply 'n' for a faster installation.
[18:45:49] Build outdated packages during 'pmbootstrap install'? (y/n) [n]:
[18:45:49] Zap existing chroots to apply configuration? (y/n) [y]:
[18:45:51] % rm -rf /home/myUser/.local/var/pmbootstrap/chroot_native
[18:45:51] % rm -rf /home/myUser/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100
[18:45:51] Cleared up ~2380 MB of space
[18:45:51] DONE!
myUser@laptop:~/temp-programs$ ./pmbootstrap install
[18:46:49] *** (1/4) PREPARE NATIVE CHROOT ***
[18:46:49] Update package index for x86_64 (4 file(s))
[18:46:51] Download http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/apk-tools-static-2.14.4-r1.apk
[18:46:51] (native) install alpine-base
[18:46:55] (native) install cryptsetup util-linux parted
[18:46:56] *** (2/4) CREATE DEVICE ROOTFS ("samsung-i9100") ***
[18:46:56] (native) install qemu-arm
[18:46:57] Register qemu binfmt (arm)
[18:46:57] (rootfs_samsung-i9100) install alpine-base
[18:47:06] (rootfs_samsung-i9100) install postmarketos-base device-samsung-i9100 postmarketos-ui-phosh device-samsung-i9100-kernel-mainline device-samsung-i9100-nonfree-firmware vim tree postmarketos-base-nofde calls chatty mobile-config-firefox phosh-mobile-settings portfolio postmarketos-default-camera postmarketos-tweaks postmarketos-welcome postprocessd ttyescape firefox-esr flatpak font-noto font-noto-emoji gnome-calculator gnome-calendar gnome-clocks gnome-console gnome-contacts gnome-maps gnome-software gnome-software-plugin-apk gnome-text-editor gnome-weather lollypop loupe papers font-twemoji
[18:49:03] (rootfs_samsung-i9100) install device-samsung-i9100 device-samsung-i9100-kernel-mainline
[18:49:08] (rootfs_samsung-i9100) install postmarketos-mkinitfs
[18:49:11] (rootfs_samsung-i9100) mkinitfs postmarketos-exynos4
[18:49:18] *** SET LOGIN PASSWORD FOR: 'user' ***
New password:
Retype new password:
passwd: password updated successfully
[18:56:04] NOTE: No valid keymap specified for device
[18:56:16] *** (3/4) PREPARE INSTALL BLOCKDEVICE ***
[18:56:16] (native) create samsung-i9100.img (1671M)
[18:56:16] (native) mount /dev/install (samsung-i9100.img)
[18:56:16] (native) partition /dev/install (boot: 256M, reserved: 0M, root: the rest)
[18:56:17] (native) install e2fsprogs
[18:56:17] (native) format /dev/installp2 (root, ext4)
[18:56:18] (native) mount /dev/installp2 to /mnt/install
[18:56:18] (native) install e2fsprogs
[18:56:18] (native) format /dev/installp1 (boot, ext2), mount to /mnt/install/boot
[18:56:18] (native) create /etc/fstab
[18:56:19] (rootfs_samsung-i9100) mkinitfs
[18:56:24] *** (4/4) FILL INSTALL BLOCKDEVICE ***
[18:56:24] (native) copy rootfs_samsung-i9100 to /mnt/install/
[18:56:27] (native) make sparse rootfs
[18:56:27] (native) install android-tools
[18:56:33]
[18:56:33] *** FLASHING INFORMATION ***
[18:56:33] Run the following to flash your installation to the target device:
[18:56:33] * pmbootstrap flasher flash_rootfs
[18:56:33] Flashes the generated rootfs image to your device:
[18:56:33] /home/myUser/.local/var/pmbootstrap/chroot_native/home/pmos/rootfs/samsung-i9100.img
[18:56:33] (NOTE: This file has a partition table, which contains /boot and / subpartitions. That way we don't need to change the partition layout on your device.)
[18:56:33] * pmbootstrap flasher flash_kernel
[18:56:33] Flashes the kernel + initramfs to your device:
[18:56:33] /home/myUser/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100/boot
[18:56:33] * If the above steps do not work, you can also create symlinks to the generated files with 'pmbootstrap export' and flash outside of pmbootstrap.
[18:56:33]
[18:56:33] *** SSH DAEMON INFORMATION ***
[18:56:33] SSH daemon is enabled (disable with --no-sshd).
[18:56:33] Login as 'user' with the password given during installation.
[18:56:33]
[18:56:33] *** FIREWALL INFORMATION ***
[18:56:33] Firewall is enabled, but will not work (no support in kernel config for nftables).
[18:56:33] If/when the kernel supports it in the future, it will work automatically.
[18:56:33] For more information: https://postmarketos.org/firewall
[18:56:33]
[18:56:33] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[18:56:33] DONE!
myUser@laptop:~/temp-programs$ ./pmbootstrap flasher flash_kernel
[18:57:13] WARNING: about to install boot-deploy 0.16.2-r0 (local pmaports: 0.16-r0, consider 'pmbootstrap pull')
[18:57:13] WARNING: about to install postmarketos-initramfs 3.1.0-r2 (local pmaports: 3.1.0-r0, consider 'pmbootstrap pull')
[18:57:13] WARNING: about to install device-samsung-i9100 7-r1 (local pmaports: 7-r0, consider 'pmbootstrap pull')
[18:57:13] WARNING: about to install device-samsung-i9100 7-r1 (local pmaports: 7-r0, consider 'pmbootstrap pull')
[18:57:13] WARNING: about to install postmarketos-initramfs-minimal 2.7.1-r0 (local pmaports: 2.5.6-r0, consider 'pmbootstrap pull')
[18:57:14] WARNING: about to install busybox-static-armv7 1.36.1-r31 (local pmaports: 1.36.1-r29, consider 'pmbootstrap pull')
[18:57:14] WARNING: about to install boot-deploy 0.16.2-r0 (local pmaports: 0.16-r0, consider 'pmbootstrap pull')
[18:57:14] (rootfs_samsung-i9100) install device-samsung-i9100 device-samsung-i9100-kernel-mainline
[18:57:19] (rootfs_samsung-i9100) install postmarketos-mkinitfs
[18:57:21] (rootfs_samsung-i9100) mkinitfs postmarketos-exynos4
[18:57:28] (native) flash kernel postmarketos-exynos4
[18:57:28] (native) install heimdall
ERROR: File /mnt/rootfs_samsung-i9100/boot/vmlinuz-dtb does not exist!
[18:57:29] NOTE: The failed command's output is above the ^^^ line in the log file: /home/myUser/.local/var/pmbootstrap/log.txt
[18:57:29] ERROR: Command failed (exit code 1): (native) % heimdall_flash_kernel.sh /mnt/rootfs_samsung-i9100/boot/initramfs RECOVERY /mnt/rootfs_samsung-i9100/boot/vmlinuz-dtb KERNEL
[18:57:29] See also: <https://postmarketos.org/troubleshooting>
Run 'pmbootstrap log' for details.
Before you report this error, ensure that pmbootstrap is up to date.
Find the latest version here: https://gitlab.com/postmarketOS/pmbootstrap/-/tags
Your version: 2.3.1
myUser@laptop:~/temp-programs$ ln -s /home/myUser/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100 /mnt/rootfs_samsung-i9100
ln: failed to create symbolic link '/mnt/rootfs_samsung-i9100/chroot_rootfs_samsung-i9100': Permission denied
myUser@laptop:~/temp-programs$ sudo !!
sudo ln -s /home/myUser/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100 /mnt/rootfs_samsung-i9100
[sudo] password for myUser:
myUser@laptop:~/temp-programs$ ll /mnt/
total 4
lrwxrwxrwx 1 root root 65 Jun 19 00:31 rootfs_samsung-i9100 -> /home/myUser/.local/var/pmbootstrap/chroot_rootfs_samsung-i9100/
myUser@laptop:~/temp-programs$ ./pmbootstrap flasher flash_kernel
[00:32:13] Update package index for armv7 (4 file(s))
[00:32:17] WARNING: about to install boot-deploy 0.16.2-r0 (local pmaports: 0.16-r0, consider 'pmbootstrap pull')
[00:32:17] WARNING: about to install postmarketos-initramfs 3.1.0-r2 (local pmaports: 3.1.0-r0, consider 'pmbootstrap pull')
[00:32:17] WARNING: about to install device-samsung-i9100 7-r1 (local pmaports: 7-r0, consider 'pmbootstrap pull')
[00:32:17] WARNING: about to install device-samsung-i9100 7-r1 (local pmaports: 7-r0, consider 'pmbootstrap pull')
[00:32:17] WARNING: about to install postmarketos-initramfs-minimal 2.7.1-r0 (local pmaports: 2.5.6-r0, consider 'pmbootstrap pull')
[00:32:17] Update package index for x86_64 (4 file(s))
[00:32:20] WARNING: about to install busybox-static-armv7 1.36.1-r31 (local pmaports: 1.36.1-r29, consider 'pmbootstrap pull')
[00:32:20] WARNING: about to install boot-deploy 0.16.2-r0 (local pmaports: 0.16-r0, consider 'pmbootstrap pull')
[00:32:20] (rootfs_samsung-i9100) install device-samsung-i9100 device-samsung-i9100-kernel-mainline
[00:32:27] (rootfs_samsung-i9100) install postmarketos-mkinitfs
[00:32:30] (rootfs_samsung-i9100) mkinitfs postmarketos-exynos4
[00:32:36] (native) flash kernel postmarketos-exynos4
[00:32:36] (native) install heimdall
ERROR: File /mnt/rootfs_samsung-i9100/boot/vmlinuz-dtb does not exist!
[00:32:39] NOTE: The failed command's output is above the ^^^ line in the log file: /home/myUser/.local/var/pmbootstrap/log.txt
[00:32:39] ERROR: Command failed (exit code 1): (native) % heimdall_flash_kernel.sh /mnt/rootfs_samsung-i9100/boot/initramfs RECOVERY /mnt/rootfs_samsung-i9100/boot/vmlinuz-dtb KERNEL
[00:32:39] See also: <https://postmarketos.org/troubleshooting>
Run 'pmbootstrap log' for details.
Before you report this error, ensure that pmbootstrap is up to date.
Find the latest version here: https://gitlab.com/postmarketOS/pmbootstrap/-/tags
Your version: 2.3.1
myUser@laptop:~/temp-programs$ ./pmbootstrap --version
2.3.1