How to install Manjaro to a single partition smaller than the whole disk?

QUESTION

How can I install Manjaro to a single partition that is smaller than the whole disk?

What should I use for mount point and flag?

For example, if I wanted to give 100 GB to Manjaro install, I would use (at the partition stage of the install) 100,000 MiB, ext4, and which mount point, and which flag?

Or is there some other way of doing this?

BACKGROUND

The other day I installed Manjaro for the first time. I used “Erase Disk” with “Swap to file,” which I believe gave me a single partition that took up the whole disk.

The other partitioning scheme I find in tutorials is to create separate boot, swap (as needed), root, and (sometimes) home partitions. These partitions together could take up a fraction of a large (e.g. 1 TB) disk, leaving unused space for other purposes.

What I would like is to create a single partition (the sort you get when you use “Erase Disk” with “Swap to file” if my understanding is correct) that is smaller than the whole disk.

The ultimate aim is to be able to use the unused space (after creating a second partition there) for “save” location when using an imaging app, e.g. Clonezilla, to image the single “OS” partition.

If what I ask is impossible, please so advise. Maybe I’ll have to use “Erase disk” with “Swap to file” and use some utility to shrink the partition to a size smaller than the disk.

If UEFI then you need the ESP (/boot/efi, fat32) with some space … 500mb is more than you are likely to ever use. 100mb is perfectly suitable for a few OSs. It can be much smaller depending on how many EFI stubs (/bootable things) you plan on putting there. If you have a functioning UEFI system then it will already have an ESP and you can simply make use of that, with no need to format.
Otherwise the only requirement is root ( / ).

Though I do suggest you make use of something like a swapfile or systemd-swap if you do not have a dedicated partition.

As to how to achieve that from your current state?
I do not advise shrinking an already existing system partition with data on it and using that - rather repartition and reinstall according to your desired layout.

1 Like

can you before check before create partitions ,
with USB live iso manjaro
open a terminal and a browser on this topic
and returns

sudo parted -l
inxi -Fza 
test -d /sys/firmware/efi && echo efi || echo bios
1 Like

Thanks. On the need for ESP when on a UEFI, does “Erase disk” see whether the install is to a UEFI and automatically create an ESP or not depending on the answer?

I ask this because my current install is actually to a VMware virtual machine. There, lsblk gave me the following output.

Screenshot 2023-05-11 181824

I don’t know what sr0 is, but the other two lines seem to indicate everything in one root partition, i.e. no separate ESP.

Makes me guess that this VMware environment is not UEFI and “Erase disk” did not bother to create a separate boot partition.

Adding later. An Internet search has told me that a VMware virtual machine is legacy BIOS by default. So my install environment was not UEFI. It does look as if “Erase disk” did not bother with an ESP. Of course I need to find out separately that “Erase disk” does create an ESP on an UEFi.

Sorry. I do not yet have an actual machine to do that on. I am using a virtual machine for now. But maybe you can tell me, in general terms, what I am to learn from that info?

so for your understanding
it should have
/boot/efi in fat32 with flag esp + boot ( 300Mb)
/ ( 25 to 40Go )
others partitions /< name partition > as you want
/swap

this is primary partitions , not LVM partitions

sr0 is for Read only ( like CD/DVD, etc)

1 Like

The kernel itself sees that when you boot the installer, because if you boot the kernel on an UEFI-enabled machine, then the boot process is different from when it boots on a BIOS-style machine. And if the installer detects that it’s an UEFI machine, it will look for an existing EFI System Partition or create one when it’s a blank drive.

To answer your other question, the only mountpoint you really need for a single-partition installation is /, for the root filesystem, and if it’s an UEFI system, then the EFI System Partition will be mounted at /boot/efi.

I do however advise creating a separate partition for /home as well, and as the other interlocutors have said, you’ll probably need either a swap partition or a swap file. A swap file is easier to resize if need be, but a swap partition is technically the better solution. The swap volume should either way be about twice the size of your RAM if you plan on hibernating the machine.

It’s the optical drive — CD/DVD/BluRay, et al.

Yes, it will, but if you’re going to install on the bare metal instead of in a virtual machine, then you’ll also have to make sure that the on-disk install matches how the installer booted. By this I mean that if the installer USB/CD/DVD booted in UEFI mode, then the UEFI firmware must be set up to boot the on-disk installation in UEFI mode also — if BIOS compatibility (CSM) is enabled, it’ll usually attempt to boot in BIOS mode before trying UEFI mode, and this may result in a failing boot.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.