From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Brian L. Stuart" To: 9fans@9fans.net Date: Fri, 18 Jul 2008 18:22:45 +0000 Message-Id: <071820081822.3544.4880DF75000734D900000DD822218675169B0A02D2089B9A019C04040A0DBF9B9D0E9A9B9C040D@att.net> Subject: [9fans] 9vx and local file systems Topicbox-Message-UUID: eb77f156-ead3-11e9-9d60-3106f5b1d025 A little while back Russ suggested that someone might want to look into making 9vx boot using a native fossil/venti file system partition for root. For anyone who's interested, as of this morning, that is working. It's a little kludgy in places, but mostly it's not too bad. When I've cleaned it up a bit I'll make some patches available. If you care about the gory details: - Putting fossil and venti in the 9vx image was the easy part. - Making sdloop identify the available disks on startup wasn't too bad. I couldn't think of a better way to search than to look for the common naming schemes: sd[a-j0-9], hd[a-j], wd[0-9], cciss/c[0-8]d[0-8]. The only gotcha was that this happened too early for namec() to work, so I deferred namec() until the first attempt to use the device. - boot/boot did bad things if the localroot wasn't set, so when using boot/boot it's now . - The kernel normally gets the partitioning for the root drive from 9load, but we don't have 9load here. So I stole part.c from /sys/src/boot and "adjusted" it and devsd.c to play nice together. - The messiest bit, though, is venti and networking. boot/boot figures it needs to set up the loopback interface for venti. But /net/ipifc doesn't exit and boot/boot considers this fatal. I suppose the Right Way(tm) to is to implement /net/ipifc and have it translate operations to the underlying network stack, but that seems an awful lot of work, for rather few applications. The not so right way would be to fake it, providing the interface, but just pretend all the messages succeed. But I copped out. I made one change to boot/boot. Now if it fails to open /net/ipifc/clone, it's not fatal. Thanks, BLS