I'm trying to come up with a means of doing a quick install of FreeBSD. To do this I am booting mfsBSD either via PXE or from some local medium, and then running the following to install FreeBSD 11.0-RELEASE on the first USB device...
There are a couple of things missing (maybe more...) such as missing /etc/fstab and /etc/rc/conf, but it does install a working, bootable FreeBSD.
One thing I can't get to work is the cmd
where
Code:
gpart destroy -F da0
gpart create -s gpt da0
gpart add -t freebsd-boot -l gpboot -s 512k da0
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
gpart add -t freebsd-ufs -l gprootfs -s 2G da0
newfs /dev/da0p2
mount /dev/da0p2 /mnt
cd /mnt
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.0-RELEASE/base.txz
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.0-RELEASE/kernel.txz
tar xfp base.txz
tar xfp kernel.txz
cp /etc/resolv.conf /mnt/etc/resolv.conf
cat 'pkg install pkg mc grub2-efi' >/mnt/script
chroot /mnt
There are a couple of things missing (maybe more...) such as missing /etc/fstab and /etc/rc/conf, but it does install a working, bootable FreeBSD.
One thing I can't get to work is the cmd
cat 'pkg install pkg mc grub2-efi' >/mnt/script
where
script
is the cmd I want to run from the chroot
environment. Anyone know why it doesn't work?
Last edited: