# nanobsd.sh return codes



## i.am.the.problem (May 10, 2022)

Hi,
Is there a list of return codes and their meaning for nanobsd.sh? 

I'm getting 2 but


```
[root@buildvm /usr/src/tools/tools/nanobsd]# sh nanobsd.sh -c installer.nano
NANO_MEDIASIZE: 23437500
00:00:00 ### Exporting NanoBSD variables
00:00:00 ### Setting variable: MAKEOBJDIRPREFIX="/usr/obj/nanobsd.installer"
00:00:00 ### Setting variable: NANO_ARCH="amd64"
00:00:00 ### Setting variable: NANO_CODESIZE="0"
00:00:00 ### Setting variable: NANO_CONFSIZE="2048"
00:00:00 ### Setting variable: NANO_CUSTOMIZE=" cust_install_files cust_allow_ssh_root cust_nobeastie cust_var_size install_packages install_installer install_installer_instance"
00:00:00 ### Setting variable: NANO_DATASIZE="0"
00:00:00 ### Setting variable: NANO_DRIVE="ufs/installer"
00:00:00 ### Setting variable: NANO_HEADS="255"
00:00:00 ### Setting variable: NANO_IMAGES="1"
00:00:00 ### Setting variable: NANO_IMGNAME="_.disk.full"
00:00:00 ### Setting variable: NANO_IMG1NAME="_.disk.image"
00:00:00 ### Setting variable: NANO_MAKE="make -j 16"
00:00:00 ### Setting variable: NANO_MAKE_CONF_BUILD="/usr/obj/nanobsd.installer/make.conf.build"
00:00:00 ### Setting variable: NANO_MAKE_CONF_INSTALL="/usr/obj/nanobsd.installer/make.conf.install"
00:00:00 ### Setting variable: NANO_MEDIASIZE="23437500"
00:00:00 ### Setting variable: NANO_NAME="installer"
00:00:00 ### Setting variable: NANO_NEWFS="-b 4096 -f 512 -i 8192 -U"
00:00:00 ### Setting variable: NANO_OBJ="/usr/obj/nanobsd.installer"
00:00:00 ### Setting variable: NANO_PMAKE="make -j 16"
00:00:00 ### Setting variable: NANO_SECTS="63"
00:00:00 ### Setting variable: NANO_SRC="/usr/src"
00:00:00 ### Setting variable: NANO_TOOLS="/usr/src/tools/tools/nanobsd"
00:00:00 ### Setting variable: NANO_WORLDDIR="/usr/obj/nanobsd.installer/_.w"
00:00:00 ### Setting variable: NANO_BOOT0CFG="-o packet -s 1 -m 3"
00:00:00 ### Setting variable: NANO_BOOTLOADER="boot/boot0"
00:00:00 ### Setting variable: NANO_LABEL="installer"
00:00:00 ### Setting variable: NANO_MODULES="zfs opensolaris"
00:00:00 ### Setting variable: NANO_NOPRIV_BUILD=""
00:00:00 ### Setting variable: NANO_METALOG=""
00:00:00 ### Setting variable: NANO_LOG="/usr/obj/nanobsd.installer"
00:00:00 ### Setting variable: SRCCONF="/dev/null"
00:00:00 ### Setting variable: SRC_ENV_CONF="/dev/null"
00:00:00 # NanoBSD image installer build starting
00:00:00 ## run early customize scripts
00:00:00 ## Clean and create object directory (/usr/obj/nanobsd.installer)
00:00:00 ## Construct build make.conf (/usr/obj/nanobsd.installer/make.conf.build)
00:00:00 ## run buildworld
00:00:00 ### log: /usr/obj/nanobsd.installer/_.bw
00:13:27 ## build kernel (GENERIC)
00:13:27 ### log: /usr/obj/nanobsd.installer/_.bk
00:14:48 ## Clean and create world directory (/usr/obj/nanobsd.installer/_.w)
00:14:48 ## Construct install make.conf (/usr/obj/nanobsd.installer/make.conf.install)
00:14:48 ## installworld
00:14:48 ### log: /usr/obj/nanobsd.installer/_.iw
00:15:01 ## install /etc
00:15:01 ### log: /usr/obj/nanobsd.installer/_.etc
00:15:03 ## configure nanobsd /etc
00:15:03 ## install kernel (GENERIC)
00:15:03 ### log: /usr/obj/nanobsd.installer/_.ik
00:15:03 ## run customize scripts
00:15:03 ## customize "cust_install_files"
00:15:03 ### log: /usr/obj/nanobsd.installer/_.cust.cust_install_files
00:15:03 ## customize "cust_allow_ssh_root"
00:15:03 ### log: /usr/obj/nanobsd.installer/_.cust.cust_allow_ssh_root
00:15:03 ## customize "cust_nobeastie"
00:15:03 ### log: /usr/obj/nanobsd.installer/_.cust.cust_nobeastie
00:15:03 ## customize "cust_var_size"
00:15:03 ### log: /usr/obj/nanobsd.installer/_.cust.cust_var_size
00:15:03 ## customize "install_packages"
00:15:03 ### log: /usr/obj/nanobsd.installer/_.cust.install_packages
00:15:19 ## customize "install_installer"
00:15:19 ### log: /usr/obj/nanobsd.installer/_.cust.install_installer
00:15:30 ## customize "install_installer_instance"
00:15:30 ### log: /usr/obj/nanobsd.installer/_.cust.install_installer_instance
00:15:30 ## configure nanobsd setup
00:15:30 ### log: /usr/obj/nanobsd.installer/_.dl
00:15:31 ## run late customize scripts
00:15:31 ## build diskimage
00:15:31 ### log: /usr/obj/nanobsd.installer/_.di
[root@buildvm /usr/src/tools/tools/nanobsd]# echo $?
2
```

The last part of the /usr/obj/nanobsd.installer/_.di is as follows...


```
11319300 blocks
Filesystem  1K-blocks    Used   Avail Capacity iused   ifree %iused  Mounted on
/dev/md0s1a  11323966 5686219 4731830    55%   18430 1455264    1%   /usr/obj/nanobsd.installer/_.mnt
Generating mtree...
Creating /dev/md0s3 (mounting on /usr/obj/nanobsd.installer/_.mnt)
newfs -b 4096 -f 512 -i 8192 -U -Linstallers3 /dev/md0s3
/dev/md0s3: 7.8MB (16065 sectors) block size 4096, fragment size 512
        using 4 cylinder groups of 1.96MB, 503 blks, 256 inodes.
        with soft updates
super-block backups (for fsck_ffs -b #) at:
 144, 4168, 8192, 12216
Filesystem 1K-blocks Used Avail Capacity iused ifree %iused  Mounted on
/dev/md0s3      7656    1  7043     0%       2  1020    0%   /usr/obj/nanobsd.installer/_.mnt
Writing out _.disk.image...
```


----------



## i.am.the.problem (May 10, 2022)

Ah my disk is full.


----------



## Phishfry (May 11, 2022)

Did you fill your disk image or physical disk? Building on FreeBSD 13-RELEASE ?

My favorite Seinfeld scene


> *Elaine*: Ah, this is part of the problem.
> *Peggy*: I thought I was part of this problem?
> *Elaine*: You're a _Huge_ part of the problem. But, I think that at its core, this is a Susie and Elaine problem that requires a Susie and Elaine solution. And who better to do that than..._(pauses)_ Elaine and Susie, Susie and Elaine!
> *Peterman*: Well, now that we have that cleared up, why don't the three of us have lunch?


----------



## i.am.the.problem (May 13, 2022)

Phishfry said:


> Did you fill your disk image or physical disk? Building on FreeBSD 13-RELEASE ?
> 
> My favorite Seinfeld scene


The disk of the FreeBSD system I was executing nanobsd.sh on.


----------

