Page MenuHomeFreeBSD

release: create a bootable image with the graphical installer
Needs ReviewPublic

Authored by khorben_defora.org on Apr 29 2024, 12:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 13, 1:20 AM
Unknown Object (File)
Tue, Aug 13, 1:20 AM
Unknown Object (File)
Tue, Aug 13, 1:19 AM
Unknown Object (File)
Aug 7 2024, 7:25 PM
Unknown Object (File)
Aug 7 2024, 9:25 AM
Unknown Object (File)
Jul 31 2024, 1:19 AM
Unknown Object (File)
Jul 26 2024, 1:02 PM
Unknown Object (File)
Jul 20 2024, 4:01 AM
Subscribers

Details

Summary

This commit adds an "installer" target to the amd64 release directory, generating a redistributable bootable image containing the graphical installer. This includes a graphical live environment, which currently defaults to the DeforaOS desktop environment. This should probably be changed for something lightweight enough while also more familiar to regular end users, such as XFCE.

The images currently generated are slightly below 4 GB in my tests.

This review depends on D44279, D44280, D44670, D44671, D44672, D44673, D44674.

Test Plan

To build:

src# make buildenv
Entering world for amd64:amd64
src# (cd release && make installer)
[...]

Possible way to test:

$ qemu-system-x86_64 -M type=q35,accel=hvf -cpu host -smp 2 -m 1024M -vga virtio \
        -drive if=none,id=usbstick,format=raw,file=installer.img \
        -usb \
        -device usb-ehci,id=ehci \
        -device usb-tablet,bus=usb-bus.0 \
        -device usb-storage,bus=ehci.0,drive=usbstick

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

khorben_defora.org edited the summary of this revision. (Show Details)

This avoids an issue with makefs(8) when building without a manifest file. (e.g., when building as root)
Consequently it should work both when using a manifest file as well as without, although it still requires root privileges in both cases, for e.g., chroot(8) and mount(8).

I feel like if you restructure things you should just be able to use the existing mkisoimages.sh:

  • make install the tree of config files
  • Have a script to install a per-arch set of packages
  • Then I don't think there's anything that needs to be done differently for the actual image part?
release/amd64/make-installer.sh
130

Please just put this in the existing rc.local and make it detect which it is at run time, having a second copy is a bad idea, and it's even worse when it's embedded as a heredoc.

144

This is always true?

152

Please just have a tree of config files that get overlaid (and if you do it with bsd.files.mk you can pick up all the METALOG bits for free)

165

Obsolete

166

Space after # for comments

release/amd64/make-installer.sh
204

This will make both the graphical installer and the primary serial console think they're the primary installer and run any automated installation config. Only one can be the primary.