Re: How do I build a custom installer?
Havard Eidnes <[email protected]> Tue, 11 Feb 2025 15:57:51 +0100 (CET)
| Newsgroups | gmane.os.netbsd.ports.macppc |
|---|---|
| Message-ID | <[email protected]> |
> I have installed NetBSD/macppc on my Mac using the netbsd ISO. I can > boot off the cd using ofwboot.xcf and "netbsd". > > However, I'd like to modify the "netbsd" kernel options. Which kernel? The one you boot from once the system is installed, or the kernel you boot from the CD-ROM, to get into the installer? > I've successfully modified regular kernels just fine. > > However, I've not been able to figure out how to do this for the inst= aller. > > To make my installer kernel, I lightly modified GENERIC_MD and built = it. > > When I boot, the system boots normally at first, then complains "no > file system for md0". That's because of these options in GENERIC_MD, which is "GENERIC but with the root file system on a memory disk", and that memory disk area in the kernel image naturally needs to be populated for "useful stuff to happen": # Enable the hooks used for initializing the ram-disk. options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # Force root on ram-disk options MEMORY_DISK_ROOT_SIZE=3D5760 # 2880 KiB options MEMORY_DISK_RBFLAGS=3DRB_SINGLE # boot in single-user= mode If you are instead modifying the kernel to boot from your host's disk drive after initial installation, let me suggest that a better starting-point might be the GENERIC config file (or include it and use config directives to delete or modify devices or options). > I noticed that the ISO installer file includes /bin, /etc, /sbin, and= > several other files that aren't a kernel. ( I presume this is on the > memory disk, but not sure how it gets there, or if it's part of the > kernel build somehow ...) That's placed there by the "make a bootable image" Makefile setup in the distrib/macppc/ file tree, and you get that built via the method which Greg Troxel pointed you to. Regards, - H=E5vard