An early xmas present: 6.1 kernel
#10
Sad 
Current status: Fixed it. Hooking up the serial-to-USB diag cable while booting up yielded a bunch of module errors. I had forgotten that I'd run updates AFTER making my image backup, and the whole space problem was caused by a 5.15 kernel update coming in - so the modules on the backed-up root filesystem were now out of sync with the running kernel in /boot! D'oh!! Cry

So, I replaced the entire contents of /boot with the /boot files from my image backup and now the phone works as it should. (Well, as it was working before anyway.)

Then I went ahead and installed the 6.1 kernel with plenty of space left on /boot for future kernel updates. Was it worth the aggravation? Are there any current advantages to running 6.1 at this time? Beats me, time will tell. But it's likely that at some point the small /boot partition would be a problem.

At least now I know it is possible to expand /boot when using full disk encryption with this method. It was just a bit less trouble than pulling teeth but knowing the "gotchas" now it would not take as long to do it again. Still, if you don't have a highly customized installation it might be faster and easier to just reinstall from scratch. Big Grin

Steps are basically the following, done from a desktop Linux system or booted from an SD card:

1. Make image backup of eMMC. Make sure you can mount the root filesystem in the image.

2. Record UUIDs of the existing root LUKS partition and ext4 filesystem.

3. Delete root partition from eMMC

4. Expand /boot partition on the eMMC to desired size (I used Gparted and set the size to 512MB which is a bit of overkill. Might want to be more conservative with space on a 16GB eMMC.)

5. Create LUKS partition on remaining eMMC space using cryptsetup. Set UUID to be the same as the old LUKS partition.

6. Open the LUKS partition with cryptsetup and create an ext4 filesystem. Set UUID to be the same as the old filesystem and mount it. (I think it was the same as the UUID of the LUKS partition. At least that's the way it is now.)

7. From a root shell, "cp -a /old/root/filesystem /new/root/filesystem

8. Umount and close the new root filesystem on the eMMC and reboot.

Test the phone - if it works immediately make an image backup of the new setup!
  Reply


Messages In This Thread
An early xmas present: 6.1 kernel - by treebeard - 12-14-2022, 09:23 AM
RE: An early xmas present: 6.1 kernel - by wibble - 12-15-2022, 01:51 AM
RE: An early xmas present: 6.1 kernel - by Zebulon Walton - 12-16-2022, 10:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to disable ipv6 at kernel level with towboot? vusra 2 967 07-09-2023, 01:25 AM
Last Post: vusra
  Stability problems with 6.1 kernel Zebulon Walton 9 2,733 05-12-2023, 08:09 AM
Last Post: zetabeta
  Kernel 5.15 Zebulon Walton 10 6,467 11-27-2021, 01:10 PM
Last Post: LibrePhoneUser
  Mobian kernel upgrade user641 4 3,931 11-10-2021, 01:22 PM
Last Post: user641
  kernel upgrade user641 2 2,602 09-13-2021, 08:26 AM
Last Post: user641
  [Solved] How to get a kernel newer than 5.10 on Mobian ? gab 0 1,410 08-26-2021, 04:08 PM
Last Post: gab
  Kernel fault on adapter connect pinephone.damiano 0 1,105 08-15-2021, 04:25 AM
Last Post: pinephone.damiano
  Is the A64’s true hardware random generator activated in Mobian’s 5.10 kernel build? LibrePhoneUser 3 4,073 01-17-2021, 12:44 PM
Last Post: LibrePhoneUser
  Phone doesn't boot after latest kernel update Boern 12 13,722 08-06-2020, 11:34 AM
Last Post: Boern
  How to compile the kernel? Boern 3 4,851 08-04-2020, 08:38 AM
Last Post: Boern

Forum Jump:


Users browsing this thread: 1 Guest(s)