I have a hard disk with Ubuntu 18.04 installed, but I want to add Debian. My HDD is formatted as ext4 and I have currently a home, root, swap and efi partitions (sda1, sda2, sda3 and sda4), and, although I have free space to install Debian, I can't, because apparently for ext4 partitions the maximum number of logical spaces is 4. Any suggestions on how to solve the problem? Do LVM partitions allow for more than 4 logical partitions?
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
You can do this without too much effort.
We disable partition swap, create a /swapfile, delete the swap partition, and then you'll be able to install Debian into the unallocated space.
Disable partition swap
sudo swapoff -a
# disable current swapsudo -H gedit /etc/fstab
# edit fstabRemove, or comment out, the line that looks similar to this:
Add this line:
Save the edits.
Now we create a /swapfile.
Note: Incorrect use of the
dd
command can cause data loss. Suggest copy/paste.Confirm this line in /etc/fstab... and confirm no other “swap” lines...
Delete old partitions
Then use
gparted
to delete /dev/sda5, and then delete /dev/sda2.Install Debian
Then you can install Debian. If Debian can use its own /swapfile (rather than its own swap partition), then use that for swap space.