Preparing a multi boot install

Questions about the installation of FreeBSD
Post Reply
CuddlyOwl
Posts: 2
Joined: Tue Jun 12, 2018 10:32 am
Has thanked: 0
Been thanked: 0

Preparing a multi boot install

Post by CuddlyOwl » Tue Jun 12, 2018 11:14 am

:oops: I have indeed read 1st the entries I searched on dual booting.

This question is to try to be sure I understand.

I have been using Linux since about 2007. The laptop in question is an old bios model from around 2010. Going 8 years. Nvidia 240 graphics. Intel wifi (actually died and needs replacing). How does GhostBSD handle USB connection to an Android device for network connection. (I guess someone will ask. It's a cheap Chinese brand laptop. I work in China & after problems and issues with "name brand" computers HP at the top of that list and running non Windows OS I found these computers wonderfully generic and easier to deal with. No special parts that only windows has drivers for. It's Hasee brand. Very basic.)

My lazy way to use my wifi. Last USB wifi dongle turned out to be something without support in free open source systems.

My old laptop until I replace the hard drive with an SSD already has a primary partition about 30gb set aside for BSD. Set up ages ago but I never got around to it. Now making the time. I usually use Debian based distros. Currently happy with Sparky when it comes do Debian.

In short I want to install GhostBSD into that partition. I do not want separate partitions so everything "/root" and all need to go there. I have a swap set. Can I point GhostBSD at it?

Anyone know of conflicts if both BSD & Linux are using the same swap?

I have read the installation section of GhostBSD. From my understanding I should choose the Grub for booting with Linux.

When I install if I can get all that set up. Can I install with ZFS to a partition?
The GhostBSD grub2 should find the other Linux installs? It'll automatically install to MBR?

Thanks. I read several different topics but it isn't all fully clear. I wish to clarify. Any suggestions will be very welcome.

User avatar
Powerwagon77
Posts: 1
Joined: Sat Jul 07, 2018 2:14 pm
Has thanked: 0
Been thanked: 1 time

Re: Preparing a multi boot install

Post by Powerwagon77 » Sat Jul 07, 2018 9:59 pm

Better late than never? I'm trying to do something similar with Fedora. I'm looking to get away from SystemD. This page gives some recommendations about boot loaders:

https://wiki.ghostbsd.org/index.php/Cus ... stallation

TL;DR Use Linux's grub. You can adapt the code at the bottom to suit your needs.

Unfortunately, I haven't been able to get the installer to complete on a physical box without using the whole disk. It's probably my fault or the fault of the not-so-great laptop I'm using. Please keep in mind that what I've written has GhostBSD installed on the first parition of the first HDD with Linux elsewhere. This can be fraught with peril.

SO, I:
1. create a VM with a disk roughly the size of (but a cat's whisker smaller [2GB]) than the partition I plan to use
2. install GhostBSD on said VM, using the WHOLE disk, selecting MBR for the "partition scheme" at the "UFS full disk configuration" screen, otherwise using all defaults, which completes successfully
3. boot the VM (after a snapshot) to bring up your bright shiny new OS and edit /etc/fstab to point to the root and swap to the partition of your physical machine
NOTE: from what I've seen Linux "sda" is BSD "ada0" and similarly, /dev/sda1 = /dev/ada0s1 In my case, I had to change /dev/label/rootfs0 to /dev/ada0s1a and /dev/label/swap0 to /dev/ada0s1b
4. reboot back into the Live CD of GhostBSD
5. use 'dd' to create an image and blow it onto the partition I want in one single step, see below.
6. I had destroyed my grub2 boot loader, so I had to boot a live cd and restore my boot loader. I could have just run as root: 'grub2-install /dev/sda'. You should probably do this 99% of the time.
NOTE: https://ask.fedoraproject.org/en/questi ... e-live-cd/
7. while still in Linux, edit /boot/grub2/custom.cfg to add the lines below.
NOTE: if you forgot step 3 you might be able to boot the os by typing 'ufs:/dev/ada0s1a' at the "mountpoint>" prompt


Here is step 4:
This is a hack and could seriously destroy your data, and might also destroy your love life, insult your mother and/or give you cronic halitosis. Abandon all hope ye who procede.

(because I'm lazy and stupid, stolen from https://www.ndchost.com/wiki/server-adm ... t-over-ssh)

Linux host as root(put it on partition 1, [NOT whole disk!!] turn off your firewall)

Code: Select all

nc -l 19000|bzip2 -d|dd bs=16M of=/dev/sda1
GhostBSD VM as root, partition 1 (used whole disk, but that doesn't matter since Linux and BSD partitions schemes differ)

Code: Select all

dd bs=16M if=/dev/ada0s1|bzip2 -c|nc -q 0 MyLinuxHostnameOrIP 19000
A 38GB partition over 1 gig ethernet took me about 40 minutes

Here is step 7:
(because I'm lazy and stupid, stolen from https://unix.stackexchange.com/question ... -boot-menu)

Code: Select all

menuentry "GhostBSD" {
set root='(hd0,1)'
kfreebsd /boot/loader
}
These users thanked the author Powerwagon77 for the post:
ericbsd (Fri Jul 13, 2018 9:05 am)
Rating: 100%

Post Reply