Debian GRUB installer partitioning step – Intel MacBook Pro
I am trying to install Debian to a partition on my SSD. Currently I have three partitions on my SSD:
- Container disk1 – AFPS container
- macOS AFPS Volume Group
- Linux – PCI-Express Internal Physical Volume
- Bootcamp – PCI-Express Internal Physical Volume
And I have created my installer with the ISO I’d like to use, and I’ve disabled secure boot. I’ve been able to boot to the grub installer, but I am not sure how to proceed on the partition step.
It displays the breakdown of my SSD (/dev/nvme0n1) including the fat32 partition for 250gb I created earlier using Disk Utility. But it seems that I need to set individual partitions singly to a journaling file system, a swap area, physical volume, etc.
What is the best way to proceed? Do I need to make additional partitions of variable size first? I do not want to overwrite or ruin my SSD GUID partition map because I want to be able to continue to boot optionally to macOS and Windows as I currently can. If the guided partitioning option will try to create an additional swap parition, then should I simply choose the manual option and attempt to only set the Linux parition to the mount point and manually set the swap partition to a new partition I can create ahead of time via disk utility? Any help would be appreciated- I am using the debian-handbook guide but am unsure of how the guided option will affect existing partitions in the map.
$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 1.2 TB disk0s2
3: Microsoft Basic Data LINUX 249.6 GB disk0s3
4: Microsoft Basic Data BOOTCAMP 502.1 GB disk0s4
5: Windows Recovery 687.9 MB disk0s5
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +1.2 TB disk1
Physical Store disk0s2
1: APFS Volume macOS - Data 822.7 GB disk1s1
2: APFS Volume Preboot 2.1 GB disk1s2
3: APFS Volume Recovery 1.2 GB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
5: APFS Volume macOS 9.8 GB disk1s5
6: APFS Snapshot com.apple.os.update-... 9.8 GB disk1s5s1
But it seems that I need to set individual partitions singly to a journaling file system, a swap area, physical volume, etc.
Those are just the partition types that are meaningful for Linux: you definitely don’t need to have one of everything in the list. See Appendix C: Partitioning for Linux in Debian 12 Installation Guide:
At a bare minimum, GNU/Linux needs one partition for itself. You can have a single partition containing the entire operating system, applications, and your personal files. Most people feel that a separate swap partition is also a necessity, although it’s not strictly true. […]
For recommended partitioning schemes, see chapter C.3 of the same document.
You can technically run Linux without a swap partition, but because it’s also used for suspending/hibernating, you will probably want one in a laptop.
Since a Intel Mac is a UEFI-firmware system, you will also need to mount the EFI System Partition (ESP for short, your disk0s1
in MacOS terms, /dev/nvme0n1p1
in Linux) to /boot/efi
in Linux, without formatting it since it’s already formatted for that and may contain the bootloaders for your other operating systems.
UEFI specification is designed to accommodate multiple OS’s bootloaders on the same EFI System Partition, and the UEFI version of GRU and UEFI Windows Boot Manager all comply with the specification. MacOS sort of does its own thing, but in a non-conflicting way, so it’s OK too.
The guided partitioning option is not really suited for dual/multi-boot installations: its primary purpose is to get quickly past the partitioning step when you are setting up a new system or VM for use with Linux only.
There would be one way to install Linux with swap and without making changes to the existing partitioning. That would be to use Linux LVM.
You would select manual partitioning, then specify that disk0s1
(nvme0n1p1
in Linux) should be mounted to /boot/efi
and not formatted, and disk0s3
(nvme0n1p3
respectively) should be used as a LVM physical volume
.
Then you should be able to proceed to the Configure LVM
sub-menu, where you will first create a volume group using the single LVM physical volume you designated earlier, then you will able to sub-divide it to logical volumes for swap and a ext4 journaling filesystem for Linux root (/
), sort of similar to how APFS sub-divides your disk0s2
to multiple APFS volumes.
The current recommendation for swap size when using hibernation seems to be: the swap space size should equal the amount of RAM plus the square root of the RAM amount.
You could create other logical volumes too, but if you are new to Linux, perhaps you should start with a simple layout first. Using LVM will make it easier to resize the Linux filesystems or the swap area if necessary, and will allow you to easily incorporate additional partitions to the same volume group if you e.g. decide to abandon the use of Windows at some future time.