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)
Wed, Dec 4, 9:53 PM
Unknown Object (File)
Tue, Dec 3, 7:43 PM
Unknown Object (File)
Sat, Nov 30, 1:51 PM
Unknown Object (File)
Thu, Nov 28, 3:58 PM
Unknown Object (File)
Nov 24 2024, 9:36 PM
Unknown Object (File)
Nov 24 2024, 3:03 AM
Unknown Object (File)
Nov 24 2024, 2:58 AM
Unknown Object (File)
Nov 23 2024, 1:02 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
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.