tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

automatic vnd'ing on kernel boot


I'm soliciting the idea abou how to implement the possible
new feature to do "automatic vnd'ing on kernel bootoff stage."

/// the aim and its background ///
- to allow NetBSD rootfs reside in a single SD media FAT
as an ordinary file.
- Xen users have been enjoying FFS rootfs on a single file
with the help of vnd in daily operations.
- rootfs images on SD FAT will compensate the lack of
NetBSD NAND driver.  No badblock nor wear-leveling
management is necessary; the media itself should be
smart enough about the glory details about ever-changing
awesome NAND technology.
- also makes sense for USB memstick or AnyLiveCDimage.iso

/// the requested feature
- to implement a mounting rootfs hook which does vnding.
The command line equivalent is;
   # vndconfig -c vnd0 <The FFS rootfs image to be vnd'ed'>
   # mount_ffs /dev/vnd0c /  <==== hey!
This should be done *priror to* running initial /sbin/init.
- In the resulting runtime environment, /sbin/mount may show
/dev/vnd0c on type ffs (local, vnd on xxx:/rootfs.img)

The last line would be handy to notify users where rootfs

I'm aware of similar attempts were made as sysctl init.root=
a whole ago. I think the solution rather awkward and a kind
of black magic.  The sysctl stuff is for "name space translation
hook" which will be addressed by proposed openat(2) system
call or equivs, not be a straightforward solution of "vnd'ing at
boot stage."

Qualified NetBSD hacker will be able to add the feature
in days, I guess, to extend domountroothook() loop in

The way to provide vnd'ing info should be machine dependent.
My idea is to have a BOOTINFO entry like BTINFO_VNDROOT.
Another way is to use a dedicated proplib entry, or the mixture
of the two.

I have little time for myself this month and ask here
someone steps forward to implement this.

Comments and challening sprites are welcome.

Toru Nishimura / ALKYL Technology

Home | Main Index | Thread Index | Old Index