GNU/Linux (ada0) + FreeBSD 10.3 (ada1): How adding a further FreeBSD on ada1

Hello,

on my Desktop System I've two ssd with following partitions:
ada0 GPT
ada0p1 (MX-Linux)
ada0p2 (further Linux stuff)
...
ada0p128 (bios_grub partition)

With an entry in /etc/grub.d/40_custom I can start my FreeBSD 10.3 on ada1 without any trouble.

ada1 GPT
ada1p1 (freebsd-boot)
ada1p2 (freebsd-ufs for /)
ada1p3 freebsd-ufs for /var)
ada1p4 freebsd-ufs for /usr)
I use a swapfile, not a swap partition.
I've prepaired partitions for my FreeBSD 10.3 with nice Howto of Warren Block (thanks for this):
http://www.wonkity.com/~wblock/docs/html/ssd.html

Code:
gpart add -t freebsd-boot -s 512k -a4k -l ssdboot ada1
gpart bootcode -b /boot/pmbr –p /boot/gptboot -i1 ada1
gpart add -t freebsd-ufs -l ssdrootfs -b 1m -s 5g ada1
gpart add -t freebsd-ufs -l ssdvarfs -a 1m -s 5g ada1
gpart add -t freebsd-ufs -l ssdusrfs -a 1m -s 45g ada1
How to add further partitions for another FreeBSD installation on same SSD?
For /, /var and /usr it is easy, instead of labelprefix ssd I'll use test:

Code:
gpart add -t freebsd-ufs -l testrootfs -b 1m -s 5g ada1
gpart add -t freebsd-ufs -l testvarfs -a 1m -s 5g ada1
gpart add -t freebsd-ufs -l testusrfs -a 1m -s 45g ada1
But needs further FreeBSD also a seperate freebsd-boot partition? I want to start this second FreeBSD installation also with menu entry in /etc/grub.d/40_custom of my Linux installation.
I know about multiboot thread in this forum by Warren Block but it seems it's not the right Howto for my special configuration.

Kind regards,
Holger
 
By using grub you can skip the freebsd-boot partition and use the loader directly

I do this for my (MBR) setup:
Code:
Device  Boot  Start  End  Sectors  Size Id Type
...
/dev/sdb4  *  515069982 976443362 461373381  220G a5 FreeBSD
Code:
insmod ufs2

menuentry "FreeBSD Loader" {
  set root="(hd1,4a)"
  kfreebsd /boot/loader
}

you will need to adjust the set root= to match your GPT partition, i.e.
Code:
set root="(hd1,gpt6)"  #not tested, not sure about the syntax
 
Last edited by a moderator:
Hi ASX ,

thanks for your reply. So after creating and formatting three partitions for /, /var and /usr the FreeBSD installer will do its job, then I've to start my Linux installation and have to add an entry in /etc/grub.d/40_custom.

Kind regards,
Holger
 
Last edited by a moderator:
Back
Top