Official Arch BSD Install Guide
Contents
NOTE: The MBR instructions is not fully tested and should be considered invalid.
Download[edit]
You can download the latest PacBSD ISO from https://packages.pacbsd.org/iso/.
Installation[edit]
Once the PacBSD install cd is booted you may wish to change your keyboard layout by using the following command:
kbdmap
You can also use vidcontrol to change your console resolution, to see a list of available modes:
vidcontrol -i mode
You can get a list of the mode numbers to use in setting the resolution to whatever the mode number matches:
vidcontrol MODE_XXX
where XXX is the mode number.
Setting up your disks[edit]
The following example is for the simplest setup.
To partition your disk with gpart the simplest way is the following:
For SATA drives the naming will be adaX, while for IDE/PATA it will be daX. Keep in mind this for the following commands:
Warning: replace da0 with the correct drive-identifier for your system!! Failing to do so might irreplacably destroy your data!!
GPT-based systems[edit]
Create the geom
gpart create -s gpt da0 gpart add -s 64k -t freebsd-boot da0
Setup a swap:
gpart add -s 1g -t freebsd-swap da0
Setup a root partition.
gpart add -t freebsd-ufs da0
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
newfs -U -j -L root /dev/da0p3
swapon /dev/da0p2
Create the mount-point:
mkdir -p /mnt/arch
Then finish by mounting the partitions to install:
mount /dev/da0p3 /mnt/arch
MBR-based systems[edit]
Create the geom:
gpart create -s mbr da0
Create a BSD-geom
gpart add -t freebsd da0
((assuming it returns da0s1))
gpart create -s BSD da0s1
First root partition:
gpart add -s 10G -t freebsd-ufs da0s1
Then setup a swap:
gpart add -s 1g -t freebsd-swap da0s1
newfs -U -j -L root /dev/da0s1a
swapon /dev/da0s1b
Setup the bootloader:
gpart bootcode -b /boot/boot0 da0 gpart bootcode -b /boot/boot da0s1
If you want to use FreeBSDs bootloader as the primary bootloader
gpart set -a active -i 1 da0
Create the mount-point:
mkdir -p /mnt/arch
If you can not create the "/mnt/arch" directory, because the system is in read-only mode, you can create "/tmp/arch" OR simply use /mnt:
mkdir -p /tmp/arch
Then finish by mounting the partitions to install:
mount /dev/da0s1a /mnt/arch
Installing base[edit]
Once your disks are ready we can use pacstrap to install the PacBSD base.
At this point you will need the internet to fetch the packages. You can use dhclient for this:
TIP : To find the available network devices, use ifconfig
dhclient device
And fetch the base with:
pacstrap /mnt/arch base
Configure your system[edit]
Chroot into your newly installed system to configure it.
chroot /mnt/arch
You'll need to manually setup your fstab at this point. Use either vi or ee for writing it.
Example of a line for swap in fstab:
/dev/da0p2 none swap sw 0 0 /dev/da0p3 / ufs rw 1 1
If the file is missing please create the file with:
touch /etc/fstab
Setting up your timezone:
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
Setting up your hostname:
echo 'HOSTNAME="hostname"' > /etc/conf.d/hostname
If you are using the freebsd-init system:
Create the rc.conf file.
sysrc hostname="hostname"
If you're installing on MBR you have to tell freebsd-bootloader what partition to boot:
echo 'vfs.root.mountfrom="ufs:/dev/ufs/root"' >> /boot/loader.conf
Setup your password:
passwd
Logout of the chroot.
logout
Unmount the root drive.
umount /mnt/arch
Reboot the system.
reboot