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
F89314595: D45000.diff
Fri, Jul 26, 1:02 PM
Unknown Object (File)
Sat, Jul 20, 4:01 AM
Unknown Object (File)
Sat, Jul 13, 12:48 PM
Unknown Object (File)
Wed, Jul 10, 5:18 PM
Unknown Object (File)
Mon, Jul 1, 5:16 AM
Unknown Object (File)
Fri, Jun 28, 11:55 PM
Unknown Object (File)
Jun 25 2024, 6:26 AM
Unknown Object (File)
Jun 13 2024, 6:28 PM
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
129

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.

143

This is always true?

151

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)

164

Obsolete

165

Space after # for comments

release/amd64/make-installer.sh
203

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.