Subject: Re: Miniroot
To: None <port-hpcsh@NetBSD.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-hpcsh
Date: 01/03/2006 18:35:58
On Tue, Jan 03, 2006 at 16:02:00 +0100, Christer O. Andersson wrote:

> On Tue, Jan 03, 2006 at 12:37:00AM +0300, Valeriy E. Ushakov wrote:
> 
> > I saw several complains about booting install kernels with miniroot.
> > I've just grabbed installation stuff from 3.0 and it works ok, so I'd
> > be interested in detailed description of what's going on.
> > 
> > What I did was:
> > 
> > . set kernel name to netbsd.gz
> > . select "md" root
> > . set file name to miniroot.fs.gz
> > . boot
> > 
> > It boots just fine with root on md0a.
> 
> I thought the install kernel had an embedded miniroot?

No.  It has "detached" miniroot - miniroot.fs.gz

Many platforms have bootloaders that can only load a single file.  In
that case you have no choice but embed the miniroot image into the
kernel itself.  On hpcsh the bootloader can combine the kernel and
detached miniroot image at boot time.  Detached miniroot image is
convenient in that you can use different images with the same kernel.


> I have launched my homebrew kernel with embedded miniroot by
> selecting wd0. This might be a bit confusing, even if I think I
> understand why now; it is a matter of telling hpcboot you don't want
> to load a separate miniroot, and hpcboot don't need to know that you
> use an md root if it is embedded in the kernel.

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.


> The feature with a separate miniroot seems like a very good idea,
> but with the install kernel I don't think you use the separate
> miniroot, although I believe you load it to memory with hpcboot
> just the same if you select md0 and provide a file name.

Distributed installation kernel (RAMDISK config) doesn't have miniroot
embedded.


> For some reason I couldn't use my own kernel and miniroot without
> embedding the miniroot. It would have been very convenient to be
> able to just transfer either one of them to the cf after yet a
> modification, but the kernel didn't recognize the separate miniroot
> as a filesystem for some reason.

What are the MEMORY_DISK_* kernel options that you use?


> By the way, man hpcboot says you can load the kernel and the miniroot
> over http. What would be the syntax and what interfaces could be
> used? ppp? That's the only interface I have on my MC16 and actually
> use from winCE to transfer the kernel to cf. It would be better to
> transfer it directly to ram in hpcboot, if possible. At least while
> booting a new kernel each time.

Ugh... I wish I remembered.  I tried once and it and it worked.  I
think you need to specify the host part as the directory, and the rest
as the file name.

If i read sys/arch/hpc/stand/hpcboot/file_http.cpp correctly you need
something like:

    Location: http://www.my.org   or http://www.my.org:8888
    Kernel name: /~me/path/to/kernel
    Image: /~me/path/to/miniroot


SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen