AlmaLinux / raspberry-pi

AlmaLinux Raspberry Pi
122 stars 17 forks source link

Using AL9.0 image with 3b+ #17

Closed GrigoryPrutskov closed 1 month ago

GrigoryPrutskov commented 1 year ago

Hi

I'm trying to run AL9 on rpi 3b+ using these images. On the first run boot stucks at "a start job is running for security auditing service". After hard reset all next boots stuck on "(1 of 2) a start job is running for user login management/ (2 of 2) a start job is running for d-bus system message bus". The issue is reproduced on different boards/power supplies/sd cards. May be I waste my time cause AL9 just doesn't support rpi < 4?

Thanks

srbala commented 1 year ago

@GrigoryPrutskov are both text and graphical images that cause this issue for you. I do not own a 3b+ pi device to validate images.

https://github.com/AlmaLinux/raspberry-pi/blob/master/AlmaLinux-9-RaspberryPi-console.aarch64.ks#L53-L71

You may need some adjustments on your SD card written from the above steps.

GrigoryPrutskov commented 1 year ago

@srbala I described behavior of cli image. Another one turns off a display during boot, so I'm not sure about it.

I checked cmdline.txt from the image and it already has parameters with values from you example. Additionally, I extended root partition size before boot manually with fdisk and resize2fs, but the issue still exist.

Also I've tried to create my own image file using "build_al9_console" script from this git repo on the clean AL9 aarch system running via qemu (with EPEL for aplliance-progs). At the very end of the installation I've got following error:


Backup stored at /var/lib/authselect/backups/2022-10-25-17-42-27.b4iIX3
Profile "sssd" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
- netgroup
- automount
- services

Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.

Adding port '22/tcp' to default zone.
success
Writing kickstart file.
Writing GRUB Legacy config.

Traceback (most recent call last):
  File "/bin/appliance-creator", line 193, in <module>
    sys.exit(main())
  File "/bin/appliance-creator", line 155, in main
    creator.configure()
  File "/usr/lib/python3.9/site-packages/imgcreate/creator.py", line 799, in configure
    self._create_bootconfig()
  File "/usr/lib/python3.9/site-packages/appcreate/appliance.py", line 619, in _create_bootconfig
    self._create_grub_config()
  File "/usr/lib/python3.9/site-packages/appcreate/appliance.py", line 337, in _create_grub_config
    options = self._kernel_cmdline_append()
  File "/usr/lib/python3.9/site-packages/appcreate/appliance.py", line 268, in _kernel_cmdline_append
    for s in self.ks.handler.btrfs.btrfsList:
AttributeError: 'RHEL9_BTRFS' object has no attribute 'btrfsList'
Unmounting directory /var/tmp/imgcreate-tyyf6nmn/install_root/boot
Unmounting directory /var/tmp/imgcreate-tyyf6nmn/install_root/
Removing compat symlinks
Unmapping /dev/loop0
Losetup remove /dev/loop0
GrigoryPrutskov commented 1 year ago

upd: RockyLinux 9 for rpi demonstrates same problem. But at the same time Oracle Linux 9 with UEK kernel works fine. So I'm leaning towards that is RHEL9 issue (at least it kernel) not AlmaLinux.

GrigoryPrutskov commented 1 year ago

Adding brcmfmac module to blacklist solved the problem. (On RockyLinux too). Please close this issue.

jaboutboul commented 1 year ago

Hmm, maybe we should build a separate image for the 3 models with this blacklisted?

GrigoryPrutskov commented 1 year ago

Or at least add this to readme

metalefty commented 1 year ago

Hi, I wrote up how to modify RasPi images RasPi 3 capable. I would be happy if it helps someone encountered the same issue.

1. Download Image

wget https://repo.almalinux.org/rpi/9/images/AlmaLinux-9-RaspberryPi-latest.aarch64.raw.xz
xz -d AlmaLinux-9-RaspberryPi-latest.aarch64.raw.xz

2. Mount Image to Modify

LODEV=$(losetup -f)
sudo partx -a AlmaLinux-9-RaspberryPi-latest.aarch64.raw
sudo fdisk -lu ${LODEV}
Disk /dev/loop0: 2.75 GiB, 2936012800 bytes, 5734400 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: dos
Disk identifier: 0x5ea2038d

Device       Boot  Start     End Sectors  Size Id Type
/dev/loop0p1 *      8192  593919  585728  286M  c W95 FAT32 (LBA)
/dev/loop0p2      593920  788479  194560   95M 82 Linux swap / Solaris
/dev/loop0p3      788480 5476351 4687872  2.2G 83 Linux                        <----- This is the mount target
sudo mount ${LODEV}p3 /mnt

3. Add brcmfmac to blacklist

sudo bash -c "echo 'blacklist brcmfmac' > /mnt/etc/modprobe.d/raspi-blacklist.conf"

4. Unmount and cleanup

sudo umount /mnt
sudo losetup -d ${LODEV}

Finally, write the modified AlmaLinux-9-RaspberryPi-latest.aarch64.raw to SD card any way you like.

metalefty commented 1 year ago

This script would also help modifying the image Pi 3 capable. https://gist.github.com/metalefty/3a52837be28da46f2abd268f23ccf75a

josueneo commented 1 year ago

Blacklisting brcmfmac will disable WIFI capabilities on the RPI 3B.

psgreco commented 1 year ago

if you need to use the module, what you can do is decompress the txt.xz firmware file, that should avoid the crash too

metalefty commented 1 year ago

I think the issue is identical to: https://github.com/NixOS/nixpkgs/issues/200326

However, I don't understand why decompressing brcmfmac43430-sdio.raspberrypi,3-model-b.txt.xz can avoid the crash.

metalefty commented 1 year ago

Here's the boot log.

https://github.com/AlmaLinux/raspberry-pi/assets/941609/8c3074a2-310f-475a-b932-54dfac0fe539

metalefty commented 1 year ago

@andrewlukoshko While I'm testing kernel updates you asked me, I found that updating kernel to 6.1.31 solved this issue.

https://build.almalinux.org/build/6846 https://build.almalinux.org/build/6847

metalefty commented 1 year ago

This was my mistake in testing, the issue is not solved.

metalefty commented 1 month ago

The issue is resolved now on RPi 3B+