Skip to content

feat: add live CD ISO creation steps#8

Open
ArchieMeng wants to merge 2 commits into
asahi-alarm:mainfrom
ArchieMeng:main
Open

feat: add live CD ISO creation steps#8
ArchieMeng wants to merge 2 commits into
asahi-alarm:mainfrom
ArchieMeng:main

Conversation

@ArchieMeng

Copy link
Copy Markdown
  • Implement make_live_image in build.sh for ISO packaging and SquashFS creation.
  • Add scripts/livecd/ directory for in-chroot environment preparation.
  • Dynamically modify mkinitcpio.conf in 10-initcpio.sh to include archiso hooks and USB drivers.
  • Ensure base image remains clean by removing live-specific packages in 99-cleanup.sh.
  • Set fstab=no and archisobasedir in GRUB configuration for better live booting.

@joske

joske commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Thx, looks good, I'll merge once I have a chance to test.

@joske

joske commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

ok, so you need to also bootflow list, bootflow select <nr> and then bootflow boot

it boots from the USB then, but it fails to access/mount? /dev/disk/by-label/ASAHI-BASE-LIVECD device did not show up after 30 seconds and drops me in a shell
lsblk doesn't show the USB device

lsusb, nmcli and pacman are not available in this shell

@ArchieMeng

ArchieMeng commented Feb 5, 2026

Copy link
Copy Markdown
Author

ok, so you need to also bootflow list, bootflow select <nr> and then bootflow boot

it boots from the USB then, but it fails to access/mount? /dev/disk/by-label/ASAHI-BASE-LIVECD device did not show up after 30 seconds and drops me in a shell lsblk doesn't show the USB device

lsusb, nmcli and pacman are not available in this shell

Did you use my branch to build the image? This didn't happen to me. Anyway, I will retest later.

@joske

joske commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

yes, I used your branch.

@ArchieMeng

Copy link
Copy Markdown
Author

yes, I used your branch.

I realized something. Did you miss some dependencies that are required by the new livecd steps? Please check the build log and see if there is any errors.

@ArchieMeng

Copy link
Copy Markdown
Author

I have done my modifications, please review my changes when you are free.

@joske

joske commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

PXL_20260218_124712834 MV
rebuilt - same issue

@ArchieMeng

Copy link
Copy Markdown
Author

How did you make your bootable USB stick? And how is your built ISO look like?

$ file images/asahi-base-livecd.iso 
images/asahi-base-livecd.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'ASAHI-BASE-LIVECD' (bootable)

@joske

joske commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

I wrote it with balena etcher.

$ file asahi-base-livecd.iso 
asahi-base-livecd.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'ASAHI-BASE-LIVECD' (bootable)
$ ll asahi-base-livecd.iso
-rw-r--r--@ 1 jos  wheel   1.1G Feb 18 12:41 asahi-base-livecd.iso

@ArchieMeng

ArchieMeng commented Feb 22, 2026

Copy link
Copy Markdown
Author

The ISO file seems correct. I guess the problem is on your installation USB drive.
Could you show the partition info of your bootable USB drive? The disk should be labeled as ASAHI-BASE-LIVECD. And I used dd to burn the installation disk.

$ lsblk --fs /dev/sda
NAME   FSTYPE  FSVER LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda    iso9660       ASAHI-BASE-LIVECD 2026-02-21-14-52-12-00                              
├─sda1                                                                                     
├─sda2 vfat    FAT12                   553A-8DA4                                           
└─sda3                                                                                     

@ArchieMeng

ArchieMeng commented Feb 22, 2026

Copy link
Copy Markdown
Author

OK, I ran into the same problem as yours. I will look into it later.

@ArchieMeng

Copy link
Copy Markdown
Author

I found the cause: The new 6.18.10 kernel has something wrong with detecting USB drives. Switch back to 6.17.12 will fix this issue. @joske

@joske

joske commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

There's no easy way to rollback the kernel, once released, the old versions are deleted from the release.

It probably means we are missing some config option in the kernel, @mkurz do you remember changing anything USB or iso9660 related in the kernel config?

@mkurz

mkurz commented Feb 22, 2026

Copy link
Copy Markdown

Maybe upstream problem

@joske

joske commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

yeah that looks plausible, thx.

- Implement `make_live_image` in `build.sh` for ISO packaging and SquashFS creation.
- Add `scripts/livecd/` directory for in-chroot environment preparation.
- Dynamically modify `mkinitcpio.conf` in `10-initcpio.sh` to include archiso hooks and USB drivers.
- Ensure base image remains clean by removing live-specific packages in `99-cleanup.sh`.
- Set `fstab=no` and `archisobasedir` in GRUB configuration for better live booting.
@ArchieMeng

Copy link
Copy Markdown
Author

@joske From upstream discussion, the issue will probably be solved with AsahiLinux/asahi-installer#414. After this PR got merged, the asahi-alarm/asahi-installer repo should also sync with upstream in order to include this PR.

@joske

joske commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

yeah I need to rebase our installer on the upstream one anyway. I can wait on that PR

@joske

joske commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

I rebased our installer, but not sure how the PR you mention is going to help? The builder doesn't depend on the installer.

@ArchieMeng

ArchieMeng commented Mar 10, 2026

Copy link
Copy Markdown
Author

I rebased our installer, but not sure how the PR you mention is going to help? The builder doesn't depend on the installer.

The upstream (Asahi Linux) dev said that the problem is relevant to the DTBs' version. So, the M1N1 on the machine needs to be updated. But it is still not fixed. I will keep watching on any updates on the issue AsahiLinux/linux#454 . And if it is confirmed fixed, I will let you know.

@joske

joske commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Well, if it's the stage 1 m1n1 (the one that actually boots the machine), then there's nothing we can do, the user must update that manually. If it's the stage 2 m1n1, we do have control over that, but it would need to be fixed in m1n1 first, and then we can release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants