chadmed / asahi-gentoosupport

Gentoo support files for Apple Silicon devices
61 stars 16 forks source link

Using the Asahi Linux Edge kernel creates a broken Install CD (genstrap.sh) #11

Closed JacksonChen666 closed 1 year ago

JacksonChen666 commented 1 year ago

The resulting Install CD will error during boot (post-bootloader) with an error like this:

dracut-initqueue[565]: modprobe: FATAL: Module squashfs not found in directory /lib/modules/6.1.0-asahi-2-2-ARCH
dracut-initqueue[570]: modprobe: FATAL: Module squashfs not found in directory /lib/modules/6.1.0-asahi-2-2-ARCH
dracut-initqueue[571]: losetup: cannot find an unused loop device: No such device
dracut-initqueue[572]: losetup: /squash.img: failed to setup loop device: Inappropriate ioctl for device
dracut-initqueue[574]: mount: /run/initramfs/squashfs: unknown filesystem type 'squashfs'.
dracut: FATAL: failed to find a root filesystem in /squash.img
dracut: Refusing to continue

(output may contain typos)

The image was generated with the Asahi Linux Edge kernel/package (installed with pacman -S linux-asahi-edge). It works fine if the image was generated with the not-edge kernel.

chadmed commented 1 year ago

Please don't use -edge to build installer images. The ebuild in the overlay pulls in the latest tagged sources, with which you can build the -edge config after you've installed if that's what you want.

I won't consider this a bug until it happens with the stable kernel. You should not be using unstable kernel builds to generate OS installers.

JacksonChen666 commented 1 year ago

Please don't use -edge to build installer images.

would you mind explaining why this exists?

*additional: the script (more recently) does not work because the brd module is missing (on stable IIRC). i've had to rewrite the parts that creates and uses /dev/ram0 devices into using loops. if the issue i just described persists on the stable kernel with the current script, i may send a PR.

chadmed commented 1 year ago

would you mind explaining why this exists?

At the time that was written, the -dev kernel was just the base kernel with some extra peripheral drivers, and the brd module. It still should be that, -edge contains further unstable features on top.

I've asked marcan to enable the missing modules in the stable kernel, they did at one point work so their omission is likely an oversight.

chadmed commented 1 year ago

I actually just tested this last night with a fresh Asahi install and it worked fine with linux-asahi-6.1-2