| Summary: | Feature request: Make bsdinstall eject install ISO | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Jason W. Bacon <jwb> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | New --- | ||
| Severity: | Affects Some People | CC: | brooks, emaste, freebsd |
| Priority: | --- | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Jason W. Bacon
2023-05-25 16:48:58 UTC
Last I looked, which I admit was quite some time ago, removing the installer before reboot(8) or shutdown(8) ended up constantly spewing garbage on the console until the system (VM or not) was forcibly reset. FWIW, when using VirtualBox, I always set the first hard drive as the first boot device and fall back to CD-ROM as the last option, which does not exhibit the problem of booting back into the installer. virt-manager, smartly, ejects the installation Medium when the VM is rebooted During the invocation of reboot(8), or when the system is reset and is about to boot again? (In reply to Glen Barber from comment #3) pretty sure it's the latter. I don't think qemu knows the system is rebooting until it resets, and probably takes that as cue that the installation is finished, and the installation medium can be removed Then, IMHO, this is a feature request for the VirtualBox developers. In short, you cannot take away the root mountpoint (in this case, a CD-ROM ISO) prior to or during a system reboot. At that point, it would be up to the hypervisor to determine if the media should still be mounted. (In reply to Glen Barber from comment #1) I had thought about making the CD secondary, but I'm mainly looking at this from the perspective of new users trying out FreeBSD for the first time. Some of the Linux systems I've installed recently eject the media without any issues, so they appear more user-friendly in that sense right off the bat. Maybe there's a way we can trigger an eject upon the next reset, or incorporate an eject as a command-line flag of reboot(8) or shutdown(8), which I presume could unmount the media first. I haven't looked into any of the code yet, so I'm just hypothesizing here. (In reply to Glen Barber from comment #5) VirtualBox is only an example here. The same problem exists for any VM, or for bare metal if the user gets distracted. (In reply to Jason W. Bacon from comment #7) true. my biggest problem is telling the installer from the boot actually boot screen apart (In reply to Mina Galić from comment #8) FWIW, jtrc27 made some improvements to the loader menu recently so it's possible to tell the installer loader from the installed loader, but it's still fairly subtle (IIRC two lines differ). If it's not obvious to anyone how to add an eject option, I can figure it out and send a suggested patch. At some point in the reboot sequence, there must be a "umount /". I think inserting an optional eject command after that and before the reset should solve the problem across the board (assuming eject is possible for the given media). How we get there from bsdinstall I don't know yet (shutdown -r, reboot, init 6?), but I can track it down and figure out a tweak. |