# question about sysinstall & pkg_add chroot installation system



## vecihi (Nov 27, 2012)

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.


----------



## Beastie (Nov 27, 2012)

The code can be found on your machine (/usr/src/usr.sbin/sysinstall) or online.


----------



## beattidp (Dec 7, 2012)

Based on the man page, order of arguments is  [font="Courier New"][-C chrootdir] pkg-name [pkg-name ...][/font].
So, the package name (or names) should probably come last.


----------

