NetBSD/hpcmips installation - building a filesystem on a Compact Flash card - $NetBSD: install.txt,v 1.3 2007/12/01 06:28:42 kano Exp $ 0. NetBSD/hpcmips kernel with sysinst The bootloader and system installer for NetBSD/hpcmips is at: ftp://ftp.NetBSD.org/pub/NetBSD/arch/hpcmips/snapshot/20000315/installation [20000315 is snapshot release date. You should check for a newer version.] Get these files in binary mode: netbsd (the kernel) pbsdboot.exe pbsdboot.exe is a Windows CE applicaton. Start pbsdboot and - set hardware type (NEC MobileGear R500...) - kernel path. (\Storage Card\netbsd) [WARNING! Booting NetBSD/hpcmips for the first time will erase the entire contents of your memory, including the program memory and storage of your Windows CE installation! Before you do this, be sure to do a complete backup of your CE files.] Click the "Boot" button to start NetBSD/hpcmips. The NetBSD/hpcmips kernel and system installer takes almost 6MB of program memory. If you get a "cannot allocate heap" error, adjust the memory allocation in Windows CE here: Start->Settings->Control Panel->System Choose the Memory tab and move the slider toward the left to allocate more program memory. If the sysinst application fails, try the following steps: 1. CF partition Run fdisk on the CF partition. /dev/wd1a ffs 112M /dev/wd1b swap 10M /dev/wd1e msdos 5M Tips: To create a CE-readable msdos partition on CF: - Set the primary partition to sysid 6 in fdisk. - Set CF to Windows CE CF slot. - Windows CE will format the partition automatically. fdisk command results. ......... disklabel command results. disklabel wd0 --- print wd0 partition information disklabel wd0 > label.CF --- dump wd0 partition information edit label.CF --- edit wd0 partition information The fdisk footprint from an example 128MB CF card: # size offset fstype [fsize bsize cpg] a: 209920 4352 4.2BSD 1024 4096 16 # (Cyl. 17 - 836) b: 12800 214272 swap # (Cyl. 837 - 886) c: 222720 4352 unused 0 0 # (Cyl. 17 - 886) d: 227584 0 unused 0 0 # (Cyl. 0 - 888) e: 4320 32 MSDOS # (Cyl. 0*- 16 ) more info. http://www.NetBSD.org/ports/i386/faq.html#ms_partition Typical fstab entry: /dev/wd0a / ffs rw 1 1 /dev/wd0b none swap sw 0 0 /kern /kern kernfs rw /dev/wd0e /msdos msdos rw 0 0 2. newfs & mount PC newfs /dev/wd1a mount /dev/wd1a /mnt mount -t msdos /dev/wd1e /msdos2 tips: pbsdboot.exe can find the /netbsd kernel on the CF card's ffs partition. If your CF card has both msdos and ffs partitions, pbsdboot.exe can find ffs:/netbsd from within Windows CE, and you won't need a second kernel file on the msdos partition. 3. get the distribution get base.tgz etc.tgz kern.tgz ftp://ftp.NetBSD.org/pub/NetBSD/arch/hpcmips/snapshot/ 4. copy kernel tar xzvf kern.tgz netbsd - root wd0a swap wd0b cp -p netbsd /mnt/netbsd cp -p netbsd /msdos2/netbsd 5. copy pbsdboot uudecode /usr/src/arch/hpcmips/stand/pbsdboot/pbsdboot.uu cp -p pbsdboot.exe /msdos2/pbsdboot.exe 6. extract sets tar xzvf base.tgz -C /mnt tar xzvf etc.tgz -C /mnt If you have no room to stage the sets, these commands will let you extract them directly via ftp: cd /; ftp -o "|tar xpfz -" ftp://..... 7. make device nodes cd /mnt/dev sh ./MAKEDEV all 8. check /etc cp /mnt/etc/fstab.wd /mnt/etc/fstab edit /etc/fstab edit /etc/rc.conf rc_configured=NO -> rc_configured=YES 9. Full installation A complete build environment requires over 500MB of storage. CF slot:NE-2000 Compatible CF Ether Card PCMCIA slot: Adaptec PCMCIA SCSI Card+SCSI Hard Disk % df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/sd0a 808619 146213 621975 19% / kernfs 1 1 0 100% /kern procfs 4 4 0 100% /proc /dev/sd0e 2103325 271547 1726611 13% /usr/src