this is obsolete doc -- see instead

NetBSD installation from the command line (without sysinst) 


Get to the prompt 

Boot with your prefered NetBSD install media (e.g. CDrom), choose language, keyboard and exit sysinst, 

language : english
keyboard : your keyboard layout

Note. if you ever wish to return to sysinst, no need to (re)execute it. Simply exit the shell. 


DOS partitions 

On i386 or amd64, you need to configure the MBR and DOS kind of partition table. 


Initialize the MBR and make an empty DOS partition table, 

fdisk -i sd0


Create the first partition using the whole disk (offset: sector 63), make the first partition 'active' and check, 

fdisk -u -0 sd0
fdisk -a -0 sd0
fdisk sd0

Note. empty boot menu disables it (press enter) 


BSD partitions 

On all hardware plateforms, create a disk label, 

disklabel -i sd0
E (long) or P (short)

verify, write the label and quit, 

E (long) or P (short)

Note. there's also 'E' to print more details 



On i386 or amd64, enable swap straight away, 

swapctl -a /dev/sd0b
swapctl -l


On all hardware plateforms, make an FFS file system and mount the root partition, 

newfs /dev/rsd0a
cd /
mount /dev/sd0a mnt/


Mount the install media, 

mkdir /cdrom
mount_cd9660 /dev/cd0a /cdrom

note. mount_cd9660 prefers absolute path destination, which is not the case for mount_ffs 

or mount the NFS share, 

mount -t nfs mnt2


And proceed with the installation, 

cd /mnt2/
tar xvzphfe kern-GENERIC.tgz -C /mnt/
#tar xvzphfe kern-GENERIC.MP.tgz -C /mnt/
tar xvzphfe modules.tgz -C /mnt/
for set in base comp etc games man misc tests text; do tar xzphfe $set.tgz -C /mnt/; done
unset set

Note. on sparc, kern-GENERIC.MP works for both, single and multi-cpu. 


Install the boot loader, on sparc, 

cp /usr/mdec/boot /mnt/
installboot -v /dev/rsd0a /usr/mdec/bootxx /boot

note. no timeout option available on sparc. 

note. third argument needed. 

on i386 or amd64, 

cp /usr/mdec/boot /mnt/
dumpfs -s /dev/rwd0a | grep ^format

  installboot -v -o timeout=3 /dev/rwd0a /usr/mdec/bootxx_ffsv1 


Generate the device files, 

chroot /mnt/
cd dev/


Further configure the system (using vi in the chrooted environment), 

cd /etc/
ln -sf ../usr/share/zoneinfo/Europe/Paris localtime
vi rc.conf
cd /etc/ssh/
cp sshd_config sshd_config.dist
vi sshd_config


Eventually fix the wscons keyboard layout, 

cd /etc/
cp wscons.conf wscons.conf.dist
vi wscons.conf

change e.g., 

encoding fr


Don't forget to setup the fstab (using vi in the chrooted environment), 

cd /etc/
cat > fstab <<EOF9
/dev/sd0a  /  ffs  rw,log  1 1
/dev/sd0b  none  swap  sw  0 0

Note. add /kern if you want kernfs 


Exit the chroot, finish up and reboot, 

umount /mnt
umount /mnt2



Appendix B. Installing without sysinst 


fdisk -- MS-DOS partition maintenance program 


disklabel -- read and write disk pack label