question about sysinstall & pkg_add chroot installation system

After creating partitions and formating them, I mount target device partition to /mnt folder. Installed system's rootfs on /mnt. I want to install packages to /mnt chrooted system. For instance: # pkg_add zip-3.0.tbz -C /mnt
or
# pkg_add zip-3.0.tbz -C=/mnt
not worked.

question-1:
How is sysinstall installing selected packages to mounted target rootfs?

question-2: where can I find source codes of FreeBSD sysinstall(8) system, I want to read codes.

Thanks.
 
Based on the man page, order of arguments is [-C chrootdir] pkg-name [pkg-name ...].
So, the package name (or names) should probably come last.
 
Back
Top