Subject: Re: NetBSD 3.0 dhclient
To: Pete Rushmere <pete@rushmere.org>
From: Rowdy <rowdy@netspace.net.au>
List: port-cobalt
Date: 03/13/2006 18:56:40
Pete Rushmere wrote:
> At 13:33 12/03/2006, Hubert Feyrer wrote:
> 
>> I don't know how /dev is created on the restore CD.
> 
> I must admit I don't either, never really looked at the makeup of it.
> 
> Now we know what's (not) happening, it's over to you, Rowdy ;-)
> 
> Kind Regards,
> Pete.
> 
> 

The /nfsroot/install/scripts/install-core.sh contains this:

         printmsg "Fixing up /dev"
         if [ -d /mnt/dev ]; then
                 create_lcddev /mnt/dev/lcd
                 cd /mnt/dev
                 # ./MAKEDEV all
                 # Invoke known script from restore filesystem. Fix for 2.0+
                 /dev/MAKEDEV all

                 # -> 2005-07-13 AndiSHFR@gmx.net Fix /dev/lcd and 
/dev/bpf0 (dhclient)
                 printmsg "Fixing /dev/lcd"
                 cd /mnt/dev
                 $RM lcd
                 $MKNOD panel0 c 36 0
                 $LN -s panel0 lcd
                 # <- 2005-07-13 AndiSHFR@gmx.net Fix /dev/lcd
         else
                 printmsg "WARNING: no /mnt/dev"
         fi

The 2005-07-13 bits I copied from Andreas' 2.0 restore CD, but I cannot
now find my local copy of the ISO.  The comment there does mention bpf
and dhclient, but the code does not reference it.

If I understand correctly, at the time that this script is run the Qube
has been booted from an NFS-hosted filesystem, and the Qube's hard drive
is mounted under /mnt.  So /mnt/dev is the /dev on the Qube's HDD, and
/dev/MAKDEV is a script in the NFS-hosted filesystem that the Qube is
actually executing.

If I am following the directory structure correctly, then
/nfsroot/dev/MAKDEV contains this:

all)
         makedev std wd0 wd1 sd0 sd1 sd2 sd3 pty0
         makedev st0 st1 ch0 cd0 cd1 vnd0 vnd1 vnd2 vnd3
         makedev ccd0 ccd1 ccd2 ccd3 md0 md1 ss0 ss1 uk0 uk1
         makedev raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7
         makedev bpf0 bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7
         makedev tun0 tun1 tun2 tun3
         makedev tty00 tty01 tty02 tty03
         makedev random local isdns
         makedev scsibus0 scsibus1 scsibus2 scsibus3
         makedev clockctl
         ;;

and this:

bpf*|tun*)
         case $i in
         bpf*) name=bpf; unit=${i#bpf};  chr=18;;
         tun*) name=tun; unit=${i#tun};  chr=19;;
         esac
         rm -f $name$unit
         mknod $name$unit        c $chr $unit
         ;;

I believe the NFS filesystem contains a 1.6.1 system, so the MAKEDEV
that actually gets run is probably also 1.6.1 - is that maybe a possible
cause of the problems?

Rowdy