Re: Miniroot
"Valeriy E. Ushakov" <[email protected]> Wed, 4 Jan 2006 01:42:50 +0300
| Newsgroups | gmane.os.netbsd.ports.hpcsh |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jan 03, 2006 at 22:10:20 +0100, Christer O. Andersson wrote: > On Tue, Jan 03, 2006 at 06:35:58PM +0300, Valeriy E. Ushakov wrote: > > > Right, you can still used embedded miniroot. There's a kernel option > > MEMORY_DISK_IS_ROOT that tells kernel to ignore the root fs option and > > to always use the embedded miniroot. > > > What are the MEMORY_DISK_* kernel options that you use? > > options MEMORY_DISK_HOOKS > options MEMORY_DISK_IS_ROOT # force root on memory disk > options MEMORY_DISK_SERVER=0 # no userspace memory disk support > #options MEMORY_DISK_IMAGE > #options MEMORY_DISK_DYNAMIC # fs image don't exist in data section. > options MEMORY_DISK_ROOT_SIZE=2048 # size of memory disk, in blocks > > I think I had MEMORY_DISK_DYNAMIC active and MEMORY_DISK_ROOT_SIZE=2048 > commented while trying a detached miniroot. > > So, next time I'll try commenting MEMORY_DISK_IS_ROOT. From a cursory look at md_root.c and hpcsh machdep.c and autoconf.c I think that enabling MEMORY_DISK_DYNAMIC and disabling MEMORY_DISK_IS_ROOT should result in a kernel that would boot from the detached miniroot if one is supplied and only then, but I haven't tried it. The idea is that hpcboot copies the miniroot image, and tells the kernel it has one. The kernel then should pick it up with md_root_setconf in machdep.c. > But this is the same as RAMDISK use, at least -current, except that > it uses MEMORY_DISK_ROOT_SIZE=8192. Doesn't that indicate that the > miniroot is embedded? I also seem to recall that somebody on the > list mentioned booting an install kernel without a detached miniroot. Doh! I always looked at this from the hpcboot side, so I didn't looked into md_root.c that thoroughly. Shame on me. Oh, and autoconf.h doesn't even bother to include opt_md.h (to pick up MEMORY_DISK_IS_ROOT)! This needs some fixing... SY, Uwe -- [email protected] | Zu Grunde kommen http://snark.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen