Re: Improving bare-install
David Brownlee <[email protected]> Tue, 13 Nov 2018 11:08:26 +0000
| Newsgroups | gmane.os.netbsd.ports.hp300 |
|---|---|
| Message-ID | <CAGN_6pbt_ph_0X6z8uq3L7qM30wenmvqF_24AW0X_ezTtaV9sg@mail.gmail.com> |
On Tue, 13 Nov 2018 at 01:06, Chris Hanson <[email protected]> wrote: > > I’ve acquired an HP 9000/425t and one of the systems I want to put on it is NetBSD. I’m starting with 8.0 under the assumption using the most recently released not-in-development version will be the most-supported route. "Probably" :) though you should probably switch to current once you start making changes (assuming it works for you) > I’ve managed to netboot the 425t from my Mac and can run both of the available boot programs, SYS_UBOOT and SYS_INST. However, neither of them will let me easily install via the NetBSD 8.0 hp300 ISO, which is what I was hoping for. I also can’t just put miniroot.fs onto a CD-ROM and tell SYS_INST to install it to the swap partition from there, because miniroot.fs is a filesystem image rather than a partitioned device image. > > Given that, does anyone who knows more about the constraints under which they operate have an idea of what it would take to make it easier to get a bare install working? I can see a couple of routes to start with: > > (0) When generating the ISO maybe don’t gzip the kernel or miniroot.fs to make the below easier. > > (1) Make SYS_UBOOT support booting from a kernel on an ISO-9660 image, e.g. when it asks for a kernel allow typing in sd5:/hp300/binary/kernel/netbsd_RAMDISK and make it feasible for that to boot. > > (2) Make SYS_INST support installing a miniroot from a raw device, e.g. if I just burn miniroot.fs onto a CD-ROM and tell SYS_INST the SCSI ID of the CD-ROM drive, it should be able to look at the device contents and install the miniroot.fs from there. > > (3) Make SYS_INST support installing a miniroot.fs from an ISO-9660 image, e.g. let me type sd5:/hp300/installation/miniroot/miniroot.fs as the location of the miniroot. > > (4) Make the ISO itself bootable. I think this would require at minimum wrapping it in an oldschool HP partition layout/filesystem, so SYS_UBOOT and/or SYS_INST could be loaded from it. It’d probably also require at least some if not all of the above. > > (5) Provide netboot-to-install instructions in addition to netboot-diskless-workstation instructions. I’m trying to figure out how to do an install when netbooted; my impression is that I should be able to boot via NFS and then start an install on local disk somehow. But I’m not entirely sure how. > > Anyone have any suggestions, walkthroughs, “no way that could be made to happen, we only have space for 12KB of code” comments, etc.? Thanks! If space turns out to be a limitation we could easily split the inst/uboot functionality into more files, but I would not expect that to be needed. 1) and 3) would involve adding ISO-9660 support to inst/uboot (which strangely enough NetBSD already has in libsa and used by other ports :) and would probably be a good place to start. For 0) - both inst/uboot should have support for gzipped miniroot/kernels already, so we should be good. How do you feel about poking at code? :-p The inst/uboot sources live in sys/arch/hp300/stand (Apologies if you already know this bit) You should be able to easily cross build NetBSD/hp300 from your mac by downloading the source and running "./build.sh -U -m hp300 build" Once you have a build you should find the tools in .../obj/tooldir.something-something-something/bin You can then edit the source for uboot or inst and quickly rebuild by running nbmake-hp300 (from that bin dir) sys/arch/vax/boot might be a good place to look for some sample code for cd9660 handling Mmm, I've just taken a look in sys/arch/hp300/common/conf.c... its a little gnarly in there, so probably due a refactor :-p David