# portmaster in chroot



## pacija (Sep 18, 2012)

Hi all,

I am using 9.0-RELEASE-p3 i386. I have built and installed world and kernel into ${NFSROOTDIR} as described in "PXE Booting with an NFS root file system" chapter of the Handbook.

when I enter chroot as described in point 14:

```
# chroot ${NFSROOTDIR}
```

I can install packages with pkg_add(1). However, when I try to check for new ports with portmaster(8) I get an error:

```
# portmaster -L
ps: empty file: Invalid argument
[: -eq: unexpected operator
```

Also, *portmaster -a -f* fails on perl, complaining about /dev/null being a file rather than a device.

Any advice how to update ports in chroot with portmaster?


----------



## SirDice (Sep 18, 2012)

I'm guessing the portmaster(8) error comes from the fact there's no ports tree in your chroot.


----------



## pacija (Sep 18, 2012)

They are there. portsnap fetch downloaded snapshot but complained:

```
cut: /dev/stdin: No such file or directory
```
Consequent portsnap fetch extract finished fine.
Both pkg_info and pkg_version work.


----------



## phoenix (Sep 18, 2012)

Did you mount /dev into your chroot?


----------



## pacija (Sep 19, 2012)

I did not. Once I did problems went away. Thanx!


----------

