Date: Tue, 8 Oct 2013 13:16:18 +0200 From: Matthias Apitz <guru@unixarea.de> To: freebsd-questions@freebsd.org Subject: install packages with pkg_add(1) into another file system Message-ID: <20131008111618.GA9957@sh4-5.1blu.de>
next in thread | raw e-mail | index | archive | help
Hello, I have prepared a boot-able USB-key (to be exactly a disk image of it) the usual way: # dd if=/dev/zero of=da0 bs=8m count=1868 # mdconfig -a -t vnode -f da0 md0 # fdisk -I md0 # fdisk -B md0 # bsdlabel -w md0s1 auto # bsdlabel -B md0s1 # bsdlabel -e md0s1 # edit the disk label and change partition "a" from "unused" to "4.2BSD" # newfs /dev/md0s1a # mount /dev/md0s1a /mnt # cd /usr/src now we can install world an kernel: # make installworld DESTDIR=/mnt # make installkernel DESTDIR=/mnt KERNCONF=GENERIC INSTALL_NODEBUG=t # make distrib-dirs DESTDIR=/mnt # make distribution DESTDIR=/mnt ... I have compiled ~800 ports (Xorg and KDE4) and after this I've created packages of all the installed ports with pkg_create(1); the resulting xxxx.tgz files are all as well copied to the image into /mnt/PKGDIR. So far so good. Now I want install the packages as well into the image in /mnt. What would be the best method for this? Run pkg_add with the flag --chroot chrootdir, or use chroot(8) directly? Or any other idea? Thanks in advance All this is with 10-CURRENT (base and ports). matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: www.asciiribbon.org E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131008111618.GA9957>