If anyone is interested, I was successfully able to install Gentoo
FreeBSD using a separate /boot partition. I don't know if some of you
have done this, but below are notes from my experience. Googling for
this came up with relatively little (some info I found did help, but it
seems there are not many who have bothered with this).
The Gentoo page on installing FreeBSD suggests using one giant partition
and turning off soft-updates. I wanted to avoid this (since many system
files are read/written during use of the OS, I want them to be as fast
as possible). One way would be to make separate /usr, /var, etc.
partitions as suggested in the FreeBSD handbook (leaving only "/", and
therefore "/boot", as non-soft-updates, since they would not see much
write activity), but some hard links in the gfbsd stage3 tarball made
this problematic (links between the bin dirs outside /usr to within
their /usr counterparts). I could have broken these links, but I wanted
to leave the system as the gfbsd folks designed it.
So I figured I'd try what I usually have done on Linux: make a small
(256M) "/boot" on /dev/ad0s1a, a large (~40G) "/" on /dev/ad0s1d, and
leave the rest for "/home" on /dev/ad0s1h. At least this lets me keep
my data and home dir files if I need to do a clean re-install. Soft
updates would be off on /boot but on on the other two. Also, not sure
it matters, but in /etc/fstab, I put the line for "/" (ad0s1d) first.
I came upon two issues:
1) The boot loader expects the kernel to be in "/boot/..."
2) The system has trouble finding "/" (the root) on booting
#1 is easy: If you do the usual thing and mount the boot partition on
/boot, there will be no "/boot/" prefix, so move its contents into a
subdirectory called "boot" within the boot partition. Now mount this
boot partition on "/mnt/boot" and make a symlink called "/boot" ->
"/mnt/boot/boot". The files will then be seen in their usual place when
the system boots, and the boot partition will look correct when first
booting too.
#2: When you first boot your system, you'll be asked to manually specify
where "root" is (in my case, "ufs:ad0s1d" did the trick). But I did not
want to have to type this every time I booted! I tried using grub,
thinking it might enable me to specify root like Linux does, but the
config was just wanting the boot partition, and there seemed no obvious
way to set what root would be after boot (BTW, I did get disk error 29
before heeding Gentoo's sysctl hint for grub). I ended up finding some
info that suggested creating a "/boot/loader.conf" file and adding this
line:
vfs.root.mountfrom="ufs:ad0s1d"
This worked. Now my system boots normally, and I have what seems a sane
partitioning scheme!
-Joe
--
gentoo-bsd@g.o mailing list
|