Discussion:
Dual Boot with GRUB next to GNU/Linux "Debian"
(too old to reply)
Schreck Julian
2018-04-28 18:40:22 UTC
Permalink
Hello there,
I've been using Linux since 2013 in some flavours. Now, I'd like to install a
different OS, which is also (or at least more) in the "spirit" of Free
Software.
For not being ruined for some time if I don't get along with *BSD (or FreeBSD,
indeed), I need to keep my current system untouched.

Is there an automatic install -- sorry if I insult the community with that way
of thinking, I'm new :-) -- to "just" add FreeBSD to my current hard disk with
dual boot?

Kind regards,
Julian Schreck

PS: Is there some *BSD user group or something in sothwest Germany?
--
https://omnibus.uni-freiburg.de/~sj126
Kristaps Čivkulis
2018-04-28 19:56:00 UTC
Permalink
Hi,

If you use UEFI, you can do it automatically and almost without
touching your current partitions. Just create new empty partition and
let FreeBSD installer use that partition to automatically divide it
into smaller ones (new EFI partition, root partition and swap). Then
in Linux add new boot entry with efibootmgr so that you can boot into
FreeBSD through UEFI boot menu.
s***@uranus.uni-freiburg.de
2018-04-29 07:38:05 UTC
Permalink
Thanks for the fast reply :-)
Just to get it unambiguous: Is the "FreeBSD pre-partition" an unallocated space
or an empty partition, which is unmounted or ... ?
Btw, does the unallocated space physically need to be at a stretch? (How) Does
the partition manager arrange the physical position of partitions?

As (nearly) always in the world of Free Software, I can (successfully) use
whichever partition manager I want for this, can't I? Or is efibootmgr more
suitable for this task?
--
Post by Kristaps Čivkulis
Hi,
If you use UEFI, you can do it automatically and almost without
touching your current partitions. Just create new empty partition and
let FreeBSD installer use that partition to automatically divide it
into smaller ones (new EFI partition, root partition and swap). Then
in Linux add new boot entry with efibootmgr so that you can boot into
FreeBSD through UEFI boot menu.
--
https://omnibus.uni-freiburg.de/~sj126
Polytropon
2018-04-29 08:46:28 UTC
Permalink
Post by s***@uranus.uni-freiburg.de
Just to get it unambiguous: Is the "FreeBSD pre-partition" an unallocated space
or an empty partition, which is unmounted or ... ?
Yes, you should always leave the creation of a partition
and the initialization of file systems to the OS which
will be using them. In this case, just make sure there
is unallocated space.
Post by s***@uranus.uni-freiburg.de
Btw, does the unallocated space physically need to be at a stretch? (How) Does
the partition manager arrange the physical position of partitions?
Yes, a partition is always a contiguous space (here:
space not allocated yet).

Partition managers like PartEd Magic simply re-arrange
the values in the partition table. Later on, file systems
need to reflect those changes, but this can also often
be done from within PartEd Magic (check FreeBSD's "growfs").
But resizing partitions usually isn't that easy (especially
when you already have several partitions).
Post by s***@uranus.uni-freiburg.de
As (nearly) always in the world of Free Software, I can (successfully) use
whichever partition manager I want for this, can't I?
Yes, just make sure you have a backup. Really. A verified
backup. Just in case.

As I mentioned above, PartEd Magic is a good solution for
this task. It can be run safely from a live system CD or
DVD. I think it's also part of UBCD.
Post by s***@uranus.uni-freiburg.de
Or is efibootmgr more
suitable for this task?
Don't confuse the boot manager with a partition editor.
If you have UEFI working on your system, its boot manager
will do. If not, Grub can also load FreeBSD in a more
"traditional" partitioning setting - this depends on
several things, such as UEFI or BIOS, GPT or MBR, ... :-)
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
Kristaps Čivkulis
2018-04-29 09:08:38 UTC
Permalink
Post by s***@uranus.uni-freiburg.de
Just to get it unambiguous: Is the "FreeBSD pre-partition" an unallocated space
or an empty partition, which is unmounted or ... ?
Btw, does the unallocated space physically need to be at a stretch? (How) Does
the partition manager arrange the physical position of partitions?
You just have to shrink one of your current partitions to leave enough
unallocated space (at least 1GB), and FreeBSD installer will
automatically find that unallocated space and create needed
partitions. The term "empty partition" was wrong, my bad.
Unallocated space has to be contiguous.
Post by s***@uranus.uni-freiburg.de
As (nearly) always in the world of Free Software, I can (successfully) use
whichever partition manager I want for this, can't I? Or is efibootmgr more
suitable for this task?
Yes, you can use any partition manager you want. But efibootmgr is
different kind of tool, completely unrelated to partition managers.

If you have UEFI firmware, you can change your boot order, add/delete
boot entries and manually choose entry from your boot menu (load GRUB
from this location, or load FreeBSD from that location, or try to boot
from CD, DVD, USB etc). To change your boot order or add/delete boot
entries you can use, for example, efibootmgr on Linux. On my machine
FreeBSD installer didn't automatically add new boot entry, so I had to
add it manually through Linux by using efibootmgr with command
# efibootmgr -c -d /dev/sda -p XX -L "FreeBSD Loader" -l "\EFI\BOOT\BOOTX64.EFI"
where XX is the number of EFI partiton created by FreeBSD installer
(/dev/sdaXX).

Wes Frazier
2018-04-28 23:31:31 UTC
Permalink
I'm new to FreeBSD but did this recently with Debian/Devuan without EFI.
It wasn't automatic however. I used the disk/slice/partition editor in
the installer. I reserved the first slice for FreeBSD, the second for
GNU/Linux's root and a third for GNU/Linux's swap.

I installed FreeBSD to slice one (letting the installer automatically
partition the space).

Then when I installed Devuan I chose the second and third slices in the
installer, as my ext3 root and swap space respectively. When it prompted
me to install grub I told the installer to install grub to the second
slice instead of the whole hard disk.

Then from FreeBSD I used the boot0cfg command to make linux select ble
from the FreeBSD boot menu. You may want to check boot0cfg man page.

Grub can be configured to boot FreeBSD instead of using FreeBSD's
bootloader to boot GNU/Linux but I haven't used that method and can't
speak to it.

- Wes
Continue reading on narkive:
Loading...