1# 2# $FreeBSD$ 3# 4NANO_TOOLS=`pwd` 5NANO_PACKAGE_DIR=`pwd`/Pkg 6NANO_RAM_TMPVARSIZE=20480 7NANO_PMAKE="make -j 8" 8NANO_LABEL="rescue" 9NANO_RAM_TMPVARSIZE=40960 10#NANO_MEDIASIZE="8027712" 11#NANO_MEDIASIZE="2097152" 12NANO_MEDIASIZE="3932160" 13NANO_SECTS="63" 14NANO_HEADS="16" 15NANO_IMAGES="2" 16NANO_INIT_IMG2="0" 17NANO_BOOT0CFG="-o packet,update,nosetdrv -s 1 -m 3" 18NANO_DRIVE=da0 19#NANO_MODULES= 20NANO_BOOTLOADER="boot/boot0" 21NANO_BOOT2CFG="" 22NANO_MD_BACKING=swap 23 24# Options to put in make.conf during buildworld only 25CONF_BUILD=' 26' 27# Options to put in make.conf during installworld only 28CONF_INSTALL=' 29' 30# Options to put in make.conf during both build- & installworld. 31CONF_WORLD=' 32#TARGET_ARCH=i386 33CFLAGS=-O -pipe 34ALL_MODULES=YES 35' 36 37#customize_cmd cust_comconsole 38customize_cmd cust_allow_ssh_root 39customize_cmd cust_install_files 40 41cust_ld32_cfg () ( 42 cd ${NANO_WORLDDIR}/libexec 43 if [ \! -f ld-elf32.so.1 ]; then 44 ln -s ld-elf.so.1 ld-elf32.so.1 45 fi 46) 47customize_cmd cust_ld32_cfg 48 49#cust_boot_cfg () ( 50# cd ${NANO_WORLDDIR} 51# echo "-S115200 -h" > boot.config 52# echo "console=\"comconsole\"" > boot/loader.conf 53# echo "comconsole_speed=\"115200\"" >> boot/loader.conf 54# echo "hint.acpi.0.disabled=\"1\"" >> boot/loader.conf 55#) 56#customize_cmd cust_boot_cfg 57 58customize_cmd cust_pkg 59 60cust_etc_cfg () ( 61 cd ${NANO_WORLDDIR} 62# mkdir -pv scratch 63 echo "hostname=\"rescue\"" > etc/rc.conf 64 echo "font8x14=\"iso15-8x14\"" >> etc/rc.conf 65 echo "font8x16=\"iso15-8x16\"" >> etc/rc.conf 66 echo "font8x8=\"iso15-8x8\"" >> etc/rc.conf 67 echo "keymap=\"german.iso\"" >> etc/rc.conf 68 echo "#ifconfig_fxp0=\"AUTO\"" >> etc/rc.conf 69 echo "#sshd_enable=\"YES\"" >> etc/rc.conf 70 echo "/dev/ufs/${NANO_LABEL}s1a / ufs ro,noatime 0 0" > etc/fstab 71 echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab 72 echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab 73# echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab 74 /usr/sbin/pwd_mkdb -d etc etc/master.passwd 75) 76customize_cmd cust_etc_cfg 77 78setup_nanobsd_etc ( ) ( 79 pprint 2 "configure nanobsd /etc" 80 ( 81 cd ${NANO_WORLDDIR} 82 # create diskless marker file 83 touch etc/diskless 84 # Make root filesystem R/O by default 85 echo "root_rw_mount=NO" >> etc/defaults/rc.conf 86 # save config file for scripts 87 echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf 88 mkdir -p cfg 89 ) 90) 91last_orders () ( 92 pprint 2 "last orders" 93 ( 94 cd ${NANO_WORLDDIR} 95 echo "/dev/iso9660/${NANO_LABEL} / cd9660 ro,noatime 0 0" > etc/fstab 96 echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab 97 echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab 98# echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab 99 rm -f conf/default/etc/remount 100 touch conf/default/etc/.keepme 101 touch conf/default/var/.keepme 102 cd .. 103 mkisofs -quiet -r -J -no-emul-boot \ 104 -V ${NANO_LABEL} \ 105 -b boot/cdboot -o _.disk.iso _.w/ 106 ) 107) 108 109#create_i386_diskimage () { 110# #currently not used 111#} 112 113#create_amd64_diskimage () { 114# create_i386_diskimage 115#} 116