Continuing yesterday's thread: we left off with dinit launching, but /etc being messed up.
I fixed /etc! The trick ended up mounting shit on top of each other after chrooting.
Next step: make the netbsd core stuff read-only.
Discussion
Continuing yesterday's thread: we left off with dinit launching, but /etc being messed up.
I fixed /etc! The trick ended up mounting shit on top of each other after chrooting.
Next step: make the netbsd core stuff read-only.
Also, I will slowly start publishing my current experiments. I'll call the repo fuck/fuckery.
Soo... I currently have:
/etc layered on top of NetBSD's etcdinit booting into a system that has getty on constty for root loginI basically have all the tools to make a bootable system that then I can use to develop itself. It's not there yet, because at a minimum, I need a network, and either ssh or git. Since ssh is in the NetBSD base, that's a whole lot easier.
With ssh, I can TRAMP into the system and edit the code. I can't commit locally, but I can edit things remotely, and that's good enough.
...except I don't have a user yet. Oops.
Next steps are:
/var from persistence, union mounted over NetBSD's /vargitI (well, @doctor) was also thinking about packaging and bootstrapping last night, and I think we have arrived to a plan that could make the whole distribution building a little easier!
I'll have a few special builders!
A builder for NetBSD sets: you give it a NetBSD version, a list of sets, and it downloads the binaries, and extracts them. The hash will be the NetBSD version + setlist + arch.
A builder for pkgsrc: give it a pkgsrc, $category/$program, and it builds that. Hash will be the hash of all files in the given package's pkgsrc dir.
The pkgsrc builds will not be reproducable, as they will depend on local state. They're a hack to let me bootstrap the rest of the system more easily.
This is more complicated than anticipated! Setting up the network is non-trivial work.
I might cheat there a bit.
Lets go with even smaller steps... first: adjust dinit to take care of mounting the necessary kernel filesystems like /proc, /kern, etc.
Done!
Now we'll do a bit of cheating.
Oh. I need to do the /var mounting sooner, because dhcpcd requires that.
Hrm. /etc/rc.d/dhcpcd onestart runs, but doesn't get an IP.
Aand I have network!
Uhhuh. Hm. Users will be a bit of a bother in the longer run, because the passwords are in a binary thingamajiggy. But for now, I'll shove it onto persistence.
Haha. Funny. I have no $HOME and I want to scream.
In the long run, $HOME will be tmpfs too - but not today yet.
$HOME sweet $HOME.
❯ ssh carrot -- pwd
/sexshop/bdsm/homes/algernon
I could null-mount it, so it would appear as /home/algernon, but... I like it this way.
Now to set -o hidden for most of the null mounts, because...
❯ ssh carrot -- df -h
Filesystem Size Used Avail %Cap Mounted on
tmpfs 4.0M 12K 4.0M 1% /
/dev/dk0 9.7G 1.0G 8.2G 11% /sexshop/bondage
/dev/dk2 39G 28M 37G 1% /sexshop/toys
/dev/dk3 39G 3.3M 37G 1% /sexshop/bdsm
/sexshop/bondage/dev 9.7G 1.0G 8.2G 11% /dev
/sexshop/bondage/bin 9.7G 1.0G 8.2G 11% /bin
/sexshop/bondage/sbin 9.7G 1.0G 8.2G 11% /sbin
/sexshop/bondage/lib 9.7G 1.0G 8.2G 11% /lib
/sexshop/bondage/libdata 9.7G 1.0G 8.2G 11% /libdata
/sexshop/bondage/libexec 9.7G 1.0G 8.2G 11% /libexec
/sexshop/bondage/usr/bin 9.7G 1.0G 8.2G 11% /usr/bin
/sexshop/bondage/usr/sbin 9.7G 1.0G 8.2G 11% /usr/sbin
/sexshop/bondage/usr/include 9.7G 1.0G 8.2G 11% /usr/include
/sexshop/bondage/usr/lib 9.7G 1.0G 8.2G 11% /usr/lib
/sexshop/bondage/usr/libdata 9.7G 1.0G 8.2G 11% /usr/libdata
/sexshop/bondage/usr/libexec 9.7G 1.0G 8.2G 11% /usr/libexec
/sexshop/bondage/usr/mdec 9.7G 1.0G 8.2G 11% /usr/mdec
/sexshop/bondage/usr/share 9.7G 1.0G 8.2G 11% /usr/share
/sexshop/bondage/rescue 9.7G 1.0G 8.2G 11% /rescue
<above>:/sexshop/bdsm/system/etc 40G 1.0G 37G 3% /sexshop/bondage/etc
tmpfs 4.0G 0B 4.0G 0% /tmp
kernfs 1.0K 1.0K 0B 100% /kern
procfs 4.0K 4.0K 0B 100% /proc
ptyfs 1.0K 1.0K 0B 100% /dev/pts
<above>:/sexshop/bdsm/system/var 40G 1.0G 37G 3% /sexshop/bondage/var
This is very silly.
❯ ssh carrot -- df -h
Filesystem Size Used Avail %Cap Mounted on
tmpfs 4.0M 12K 4.0M 1% /
/dev/dk0 9.7G 1.0G 8.2G 11% /sexshop/bondage
/dev/dk2 39G 28M 37G 1% /sexshop/toys
/dev/dk3 39G 3.3M 37G 1% /sexshop/bdsm
procfs 4.0K 4.0K 0B 100% /proc
tmpfs 4.0G 0B 4.0G 0% /tmp
ptyfs 1.0K 1.0K 0B 100% /dev/pts
kernfs 1.0K 1.0K 0B 100% /kern
/dev/dk4 93G 14G 74G 17% /legacy
Much better.
re: mouse makes rocks do math (fuckboi edition)
@algernon
multi layer mounting