Okay Smartnoise, here is a step-by-step how-to for dual-booting PCBSD and Ubuntu Mate.
The following needs to be done in order:
Either:
Boot into a live UM session on a clean machine. Run Gparted and create half (or whatever proportion you want) of the drive as an EXT4 partition and then also create a swap partition immediately after is that is equivalent in size to the size of your RAM. then install UM on the partition just created. Then shut down.
Or:
Boot into a live UM session on a machine that already has UM installed on it. Run Gparted and resize your UM partition to around half (or whatever proportion you want) of the drive. Then, if necessary, move the swap down the drive so that it lies just after the UM partition. Then shut down.
In both instances, above, you will end up with a machine that has UM and swap on half of the drive. The other half will be unallocated space.
Boot up the same machine with a PCBSD ISO. It will take you to the installation screen. When you get to the part where it asks you where you want to install it, you must pick the advanced option and choose the unallocated space. Then follow all instructions to complete the installation. This installation also requires you log in once to complete your user registration. Once completed, shut down.
Boot back up with the UM live ISO into a live session. Once logged in, use Caja to navigate to your existing installed UM on your hard drive, Specifically, go to /boot/grub/ and open grub.cfg with Pluma.
Once opened look for a menu entry that looks exactly the same or very similar to below:
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a8a4dd97-fdf9-4a28-b86f-ce0bb2e317b2' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 a8a4dd97-fdf9-4a28-b86f-ce0bb2e317b2
else
search --no-floppy --fs-uuid --set=root a8a4dd97-fdf9-4a28-b86f-ce0bb2e317b2
fi
linux /boot/vmlinuz-4.4.0-34-generic root=UUID=a8a4dd97-fdf9-4a28-b86f-ce0bb2e317b2 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.4.0-34-generic
}
Copy and paste this into an empty Pluma file and save it to your live session desktop. Then close grub.cfg down. Now email the file you saved to your desktop to one of your own email accounts that you can access from the Internet. Or, put it on dropbox. Or, save it to a usb stick. In other words, you need to be able to access this file later when you are back in PCBSD. Once you’ve done the above, shut down.
Start your machine in the normal way. You will find it defaults to the PCBSD boot loader and there is no sign in there of your UM installation. This is what we are going to fix now. Once in the PCBSD desktop,
open a browser/usb stick/dropbox etc and grab hold of the file you saved earlier. Put it somewhere accessible like your desktop or your home folder.
Open a terminal and type the following:
sudo dolphin
This will open the file manager as root and so allow you to make changes to system files
Navigate to /usr/local/etc/grub.d/40_custom and open this file with “kate” editor.
Then also open the file you saved earlier. Copy its content to the very bottom of the 40_custom file. Then save the 40_custom file. Then close both files down.
Close your root dolphin file manager.
Now open a terminal again, if one is not already open. Type the following:
sudo grub-mkconfig > /boot/grub/grub.cfg
The above command will update you PCBSD version of grub to reflect the new Ubuntu entry you just pasted into that file.
Reboot your machine. It will still go to the PCBSD boot loader. But now you have choice between PCBSD and Ubuntu
The only thing that is still a little raggy is that, although Ubuntu can be chosen and does indeed fully and unproblematically load, as you initially leave the PCBSD boot loader just prior to Ubuntu loading, you get a message saying PCBSD does not understand the video settings. Just press the Enter key to acknowledge this message. It can be otherwise safely ignored. My guess is PCBSD is complaining as Ubuntu takes over because it cannot communicate with or understand what Ubuntu is doing.
That’s it. From now on, you can elect to log into either UM or PCBSD!
See below for a video of me dual booting in a VM: