# Use part of a disk for inatallation



## jojopara (Sep 5, 2021)

Hello,

Can I delete and merge the Linux partitions into one and let FreeBSD take care of only the partition thus created?  I mean, will the right-most storage partition be kept intact during the automation partitioning by the installer? I am frightened by the "use entire disk" or something like that.

Thank you.


----------



## Alain De Vos (Sep 5, 2021)

With linux gparted you can do alot of stuff and tricks.
But for freebsd you need a ufs or zfs partition.


----------



## jojopara (Sep 5, 2021)

Alain De Vos said:


> With linux gparted you can do alot of stuff and tricks.
> But for freebsd you need a ufs or zfs partition.


I know that I need ufs or zfs.

Thank you.


----------



## monwarez (Sep 6, 2021)

The use entire disk means what it means (ie it will destroy everything)
You will need to do the manual partition (If I recall correctly)


----------



## jojopara (Sep 6, 2021)

Thank you!


----------



## scottro (Sep 6, 2021)

It's fairly easy to do a UFS install on a shared disk, a bit harder to do with ZFS, but it can be done. There are tutorials on the forum, (I use the one by patovm04) to do an install on ZFS.  Basically, when you get to the disk partition section, you choose drop to a shell and issue commands, for ZFS.  For UFS, it's easiest if you have a partition set in advance (if using MBR, it needs a primary partition) and choose it during installation. When done, you then have to set up grub. The tutorial I mentioned above has suggestions that have worked for me for EFI (and ZFS), there are several threads on the forum. If using EFI then a UFS install wil set up an EFI partition and you can use the machine's EFI boot menu to boot it, (e.g, on Thinkpads, hit F12 when it boots), use rEFInd or grub.


----------



## Alain De Vos (Sep 6, 2021)

For instance I boot with linux-grub towards a ufs bootpartition which loads a zfs root filesystem. This can be done,but it is not easy when it is your first setup.


----------



## monwarez (Sep 6, 2021)

Since I see that there is an EFI partition, I am not sure if the installer will do the correct things: ie. installing /boot/loader.efi in EFI/freebsd/BOOTX64.efi . Also we don't know which RELEASE it will be, I am pretty sure that 13-RELEASE should not just dump an image of the efi filesystem into the efi partition, but I don't know if it will use the correct namespace (ie. the freebsd folder), or use /EFI/BOOT/BOOTX64.efi .
Anyways, before proceeding further, backup your current install and make sure that you can recover from the backup. You can try that with another drive to test that backing up will give you a working system.


----------



## scottro (Sep 7, 2021)

Ah ok. So, my experience was something like this. (Going from memory, but basic details are right). On a laptop with some Linux installs, I created say, a 100G partition for FreeBSD. During installation and disk partitioning, even though there was a Linux EFI partition, I got a message this needs a partition for UEFI or it won't boot, should I create it for you? I chose yes. When done, I think the FreeBSD install was on partition 7 and its UEFI partition was on partition 6. This was in addition to the partition one UEFI partition. I then directed Grub to that partition and it worked. As I mentioned earlier, you can probably hit a key on boot up for boot device, and FreeBSD will be availabe, or you can use rEFInd.k

When doing an install on ZFS, however, I followed the instructions on this forum and created everything manually, including copying over necessary files to the Linux UEFI partition already created on partition one.

This is the tutorial I used for a ZFS partition.








						[UEFI/GPT] [Dual-Boot] How to install FreeBSD (with ZFS) alongside another OS (sharing the same disk)
					

Important notes: 1) This tutorial assumes you have the OS you want to dual-boot with already installed on your drive, and that you already have freed up some disk space. Essentially, you will be installing FreeBSD with root-on-ZFS on the remaining free space of the disk, instead of using the...




					forums.freebsd.org


----------

