dual booting with alpine linux

hello,

I have FreeBSD 14 installed on my ThinkPad T480s. For software compatibility reasons, I'd like to install Linux on this hard drive as well. I'm very new to everything to do with hardware partition, and I was wondering how to go about this. The distribution I'm thinking of is Alpine Linux.

from reading

it seems like I'll have to prepare a partition for alpine to go on.

How do I do this?

apologies if this isn't the right place for this question, or if it's already been answered. I looked around the forums a bit and couldn't quite find what I was looking for - most questions seem to involve installing freebsd *after* linux has been installed.
 
An alternative that I have used is an external ssd for additional distros; that way you're not really dual-booting. In fact on my Lenova Yoga 730 I am running Fedora, Manjaro, and Windows on the internal ssd (grub) and FreeBSD on an external ssd. F12 interrupts bootup to access external drive boot (FreeBSD).
 
Yes, as Jose asked, about UEFI of BIOS. If UEFI, you may be able to shrink your partition (if UFS), though I've never tried this (gpart resize). If you're using ZFS, someone else will have to answer that. However, if you're willing to reinstall, I can say that you could do it with more likely success. Normally, FreeBSD needs a minimum of 3 partitions, boot, root, and swap. However, if you partition manually by putting an EFI partition (260 MB), then your root and swap, while leaving enough space for the Linux, you should be good. That's the way I did it, and it took me several HDD wipes, re-partitioning, re-installing FreeBSD before I figured out the EFI part became the "boot partition". Haven't installed Alpine, so I don't know if it's going to mess up things, but if you have the EFI part at the beginning, it should find it, update it, and work. You can also install refind from FreeBSD after installing and rebooting. Refind will take over booting (though you may have to select it as the boot partition in BIOS).
Example:
ada0p1 EFI 260MB
ada0p2 freebsd-ufs ??GB
ada0p3 freebsd-swap
ada0p4 ??? created by Alpine, your choice.
gentisle
 
as gentisle wrote above, rEFInd will handle the OSs (you need to install it from Linux or from their bootable USB/CD, as no FreeBSD port), it's ages since I ve used it, but I remember I could boot multiple OS on a PC.
 
What i currently do is use artix-linux-grub, then go to a small ufs-parition with the linux bootloader, which loads root-filesystem & kernel on zfs-partition.
It's a 3-step process, but this works nice for me.
 
If you're going to reinstall both, install first FreeBSD and have the swap the partition be the size of the Linux partition + desired swap size. Then resize the swap partition and create another for Linux (type 83). Then you can have this Grub configuration in Linux:

$ cat /etc/grub.d/40_custom #!/bin/sh exec tail -n +3 $0 menuentry "FreeBSD" { insmod part_gpt insmod chain chainloader (hd0,gpt1)/efi/freebsd/loader.efi }

I'm multibooting Linux and the 3 BSD's like this with no issues. Linux and FreeBSD are fully encrypted with LUKS2 & GELI, resp.
 
Back
Top