Subject: Re: Network Interface
To: None <>
From: Andy Sparrow <>
List: port-pmax
Date: 02/27/1997 10:34:54
> The problem with that is that
> the miniroot is read-only...

The miniroot is intended only for you to have a bootable
NetBSD system, and contains only enough files/space for
you to label/newfs/untar the "real" root and usr partitions
and the filesets you need to put onto them (you can mount
the filesets from an Ultrix partition, read-only).

When you have those (you need to 'tar' at least the 'base'
and 'etc' filesets into them), you will need to 'MAKEDEV all'
in '/dev'.

I found I needed to modify the distributed 'MAKEDEV' script in 
order to pick up the newly-created filesystems in the path, when
running it on a new 'dev' directory from the miniroot.

There will messages relating to the missing owners/groups
(because you don't have the passwd/groups file(s) loaded
yet). Ignore these, you can always re-run the script later
when you're up and running.

Without this step, booting from the new 'root' is doomed,
because there won't be any device nodes in '/dev' on reboot..

Note that you'll also need to 'MAKEDEV scc0' or 'MAKEDEV dcc0'
for the serial devices, depending on the machine architecture
(5k/200 uses 'dcc', 5k/1xx uses 'scc'. Don't know about the
others off-hand). You don't need to worry about this just
yet unless you're trying to use a serial console.

> i dont know how to change it
> and when i try multi-user it crasher.

	mount /dev/rz?a /

Although it looks odd, this will re-mount the miniroot root 
partition read/write. You should even be able to use 'vi'
rather than 'ed' if you have that program loaded onto the
alternate filesystems, with judicious additions to your path.

Note that you won't be able to 'umount /' afterwards...

Modify the appropriate stuff to set up networking (such as
'<mountpoint>/etc/hosts', '<mountpoint>/etc/myname' and
'<mountpoint>/etc/hostname.le0'), set up '<mountpoint>/etc/fstab' 
to suit, and Robert should be the proverbial relative upon 
rebooting from the new filesystems.

There _is_ a way to do it all on one disk, this involves rewriting 
the partition label several times to swap the 'a' partition around
(because that's the only partition you can run the miniroot from
successfully). E.g.:

Label the disk, such that the 'a' partition is where the 'b'
partition would be, and the 'b' partition is the first partition.

Load the miniroot onto the 'a' partition. Boot from it. 'newfs'
the 'b' partition and the other partition(s) such as '/var' '/usr'
etc to taste, set up to boot from this partition (you don't need 
to do it all in one go, because you can always mount '/' read/write 
(after booting from the "real" root partition) as shown above and 
modify the files etc. - but you _must_ set up the special files 
in '/dev' in order to boot from the "real" root partition).

Re-label the disk so that the 'a' and 'b' partitions are in the
normal places (e.g. 'a' starting from block 0, and 'b' after that), 
and re-boot from the new '/' partition. You should be pretty much 
set at this point...

If the miniroot was set up to find the root partition on 'b', then 
the re-labelling wouldn't be necessary, and you could simply 'newfs' 
and extract the filesets into 'a' etc. without any further steps?

I think the SunOS miniroot does it this way. Comments?
Would this as simple as rebuilding the GENERIC kernel, or would changes
be necessary to that code? I think this would be easier for a first-time