Anyway, to fully optimize the partitioning process, I opted for the "Shell" mode. These are the commands I ran:
My SSD is on /dev/ada0.
Firstly, destroy the current partition table on the disk:
gpart destroy -F /dev/ada0Next, create a GPT disk and add the partitions. I'm using a Crucial m4 SSD, and it's said to use 2 controllers and have a block size of 1024k, so let's align it to 1024k:
gpart create -s gpt ada0Now, install the bootcode:
gpart add -s 64k -t freebsd-boot -a 1024k -l boot0 ada0
gpart add -s 8G -t freebsd-swap -a 1024k -l swap0 ada0
gpart add -s 20G -t freebsd-ufs -a 1024k -l root0 ada0
gpart add -s 10G -t freebsd-ufs -a 1024k -l var0 ada0
gpart add -s 4G -t freebsd-ufs -a 1024k -l tmp0 ada0
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0Next, format the partitions with softupdate (no point journaling for SSD as fsck will already be fast anyway). Also, turn on TRIM (important):
newfs -U -t /dev/ada0p3Now that it's all done, let's mount them properly in /mnt for the installer to continue with the installation.
newfs -U -t /dev/ada0p4
newfs -U -t /dev/ada0p5
mount /dev/ada0p3 /mntDon't forget to edit fstab:
mkdir /mnt/var /mnt/tmp
mount /dev/ada0p4 /mnt/var
mount /dev/ada0p5 /mnt/tmp
vi /tmp/bsdinstall_etc/fstabThis is how my fstab looks like:
# Device MntPnt FSType Options Dump Pass#Finally, we can now continue with the installation:
/dev/ada0p2 none swap sw 0 0
/dev/ada0p3 / ufs sw 1 1
/dev/ada0p4 /var ufs sw 1 2
/dev/ada0p5 /tmp ufs sw 0 3
exit
No comments:
Post a Comment