Subject: Re: Net boot question
To: Andy Ruhl <acruhl@gmail.com>
From: Alex Pelts <alexp@broadcom.com>
List: port-cobalt
Date: 11/14/2005 20:38:45
Andy,

I would hate to correct you, but this time you are not entirely correct. 
The procedure is definitely qube specific. Well to be entirely correct 
it can be reproduced on many platforms but qube has very piculiar 
requirements for netboot, and here they are:
1. It obtains the address from dhcp (nothing unusual here)
2. It mounts nfs filesystem of the dhcp server, and it only mounts 
particular location - /nfsroot
3. It loads kernel, specific to the device, like raq loads one qube another.
4. The kernel has a limit on its size, different sources provide 
different numbers but they all agree it should be less than 1000000 
bytes compessed and 2500000 uncompressed. I personally think it is even 
smaller.
5. Kernel then must mount the same /nfsroot as a root filesystem and 
keep on booting.

That is basically the process, and someone can correct me if I am wrong. 
I think though, that I am wrong not by much.

So the page you are refering to provides no help to qube owners as far 
as I can see. Although there is a posibility that before mounting nfs 
qube does something with tftp. I need to explore that. Regardless of 
tftp, ramdisk is not an option.

So the consequences of the sequence above are following:
1. Later kernels are large and have a hard time booting on the qube 
without a smaller bootloader.
2. Ramdisk is not an option due to the small kernel size.
3. Filesystem that serves nfs must be capable of serving device nodes. 
This is where cygwin comes in. It is capable of creating and serving 
device nodes on the windows filesystems.

Now I have a question for you, which I asked Christopher. Is there a 
tool on netbsd that can change boot parametes compiled in to kernel, 
like the one on linux?

One thing could be done is to extend the netbsd bootloader to support 
tftp and do 2 stage boot as it is done from disk:
stage one - load small bootloader named as linux kernel
stage two - bootloader loads large kernel with ramdisk and the things 
become more like other architectures, except there is no screen and 
keyboard so someone must ether telnet to the box or use serial console.

Regard,
Alex


> 
> Just so the conversation doesn't stray too much, it would be nice to
> point out what the goal of all of this is.
> 
> As far as I know (please straighten me out if I'm wrong), the mips
> based Qube and Raq cannot be set to netboot without human
> intervention. This means a netboot environment would be for testing or
> fixing the disk inside the {Qube,Raq}. The process of doing this isn't
> all that much different than doing it on any other platform, other
> than the fact that you have to hold down buttons on the {Qube,Raq}.
> 
> The fact that it can be done with Cygwin is great. I like Cygwin if I
> must use Windows.
> 
> But it's not really Qube or Raq specific is it?
> 
> I think what really should be done is someone should either edit, add
> to, or replace this page with something more up to date:
> 
> http://www.afn.org/~raub/netbsd/bootpw95.html
> 
> This came from the NetBSD Netboot guide.
> 
> Or am I missing something?
> 
> Andy
> 
> 
> 
>