this post was submitted on 28 Oct 2023
26 points (96.4% liked)

Linux

48067 readers
771 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I recently installed debian 12 using debian-12.2.0-arm64-netinst.iso. It is the only OS installed and I used the whole 500GB disk.

I selected something like guided partitioning with separate /home/ using LVM and encryption. Now that I am using my system a bit, I realize that I don't think it ever asked me how big to make the / partition and it is very small. Only 27GB.

Will this be a problem?

Or, is the LVM going to allow the partition to be resized or otherwise take up as much of the space as it requires?

# lsblk
NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                       8:0    0 476.9G  0 disk  
├─sda1                    8:1    0   512M  0 part  /boot/efi
├─sda2                    8:2    0   488M  0 part  /boot
└─sda3                    8:3    0   476G  0 part  
  └─sda3_crypt          253:0    0 475.9G  0 crypt 
    ├─mycomputer--vg-root     253:1    0  27.9G  0 lvm   /
    ├─mycomputer--vg-swap_1   253:2    0   976M  0 lvm   [SWAP]
    └─mycomputer--vg-home     253:3    0   447G  0 lvm   /home

I tried booting into a live usb to resize the partition using gparted but I couldn't seem to do so.

If I need to reinstall and change something I'd rather do it now than later.

top 17 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 year ago (1 children)

It's fine. I give my systems a 20G or 30G root file system.

If you use Flatpak then make sure you do user installs. If you add the remote as a user remote then all installs are user installs.

If you use VMs then create a storage pool for the disks in your home filesystem. I create a /home/libvirt/ for this.

Basically just be mindful not to fill your root filesystem.

[–] [email protected] 2 points 1 year ago (1 children)

Would you please explain (then all installs are user install). I dont use flatpack, but the last time I used it (on Tumbleweed) I remember it downloaded its applications/runtime stuff to /var/lib/flatpak then installing them to ~/.local/share/flatpak in the home folder of every user who runs those flatpak applications.

[–] [email protected] 11 points 1 year ago (1 children)

You added the Flatpak repo as a "system" repo with:

flatpak remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo

As such, the downloaded applications are stored by the system in /var like you said.

If you run installs as user installs, eg:

flatpak --user install com.example.appname

Then the application is stored in your home directory, not in /var.

You can also add the Flatpak repo as a "user" repo, eg:

flatpak --user remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Now all installs will behave as if you passed --user to the install command. All installs will go to your home directory, none will go to /var

[–] [email protected] 2 points 1 year ago (1 children)

Thank you very much for the explanations.

[–] [email protected] 2 points 1 year ago

No worries! I hope this helps you enjoy Flatpak :)

[–] [email protected] 4 points 1 year ago (1 children)

LVM gives you the ability to downsize and resize without having to worry about partitions boundaries. So, if you find yourself in need for storage you can downsize the home partition and grow the root.

That said, I have debian/i3 INSTALLED ON A 16GB USB with a couple of docker containers and vscodium and it is around 10/14gb usage.

[–] [email protected] 2 points 1 year ago (1 children)

I'm totally going to try that now! I wonder if I could use this to avoid Windows on the terrible computers at my school. Does it boot just like installation media or something?

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

That is why I'm actually doing it, we have a couple of old workstation with Win7 we almost never use at my workplace. I use my portable debian on these machines to practice bash scripting, python and recently docker.

I few thing to consider:

  • use the fastest usb drive you can get, you will be held back by its access/write speed
  • Install the boot loader on the usb drive.
  • you can install 'xrdp' to access remitly using thw windows remote desktop.
  • You will probably find a docker image of things you are interested in, I recently switch from codium (apt) to codercom/code-server docker image, this way I can access vscode from a browser on any worstation on my workplace.
  • Routing can be a bit challenging if your organisation/school use its private intranet, but I set my debain instance (with my phone attached to it in usb tithering mode) to use tinyproxy to connect to the internet from (preferably portable) firefox from any workstation at my workplace.
  • Dont tell my boss.
[–] [email protected] 1 points 1 year ago

Thanks for the explanation! I looked into it, and it's actually not possible to boot from a USB drive on my school's computers without an admin password 😢. But thanks anyway!

[–] [email protected] 4 points 1 year ago

This is my one gripe with Debian's installer. I don't mind it setting defaults like 27G for / and 10G or whatever for /tmp. But I don't like that you can't stop it from allocating the entire volume. If it left a few hundred GB unallocated, then it would be trivial to expand whichever one you realize you need to expand later on.

As it is, if you want to give more room to one partition or another later on, you have to shrink /home first. If /home is ext4, that's inconvenient. If it's XFS, though, it's a nightmare.

[–] [email protected] 3 points 1 year ago (1 children)

It's fine. "Only 27GB" is hardly too small for the system, even a bloated system wouldn't take that much space.

But if you must have a larger partition I think a reinstall would be easier, resize the partition is possible but because of the encryption not a straight forward thing. I wouldn't bother really.

[–] [email protected] 2 points 1 year ago (2 children)

If LVM isn't somehow mitigating the issue I will do a reinstall.

I have run out of space on / before and it is a huge pain in the ass. I do not need much room for /home on this system so I would prefer to be cautious and avoid problems down the road.

Hopefully I will be able to figure out how to specify this.... maybe a different installer image.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

It's two commands to grow the / fs on the fly:

lvextend -L+10G /dev/mycomputer-vg/root
resize2fs /dev/mycomputer-vg/root

So don't worry about it. LVM is great :).

[–] [email protected] 1 points 1 year ago (1 children)

The installer lets you do a custom partition layout.

[–] [email protected] 1 points 1 year ago

That is my previous experience. I guess i missed it somehow.

[–] [email protected] 3 points 1 year ago

27G is OK. But LVM gives you ability to resize the volume at any time if you need. So don't worry about this. Check df -h, if you have less than 10G used and you are not going to install a lot of very heavy packages (e. g. games with large resources; I mean only deb-packaged ones, not Steam etc. that go into /home), it is highly likely that you will never get in trouble because of / size.

[–] [email protected] 1 points 1 year ago

Add a /var partition, boot from some live system, copy over the data, delete it in the root partition after making sure it was copied ok and add the new filesystem to fstab. /var is the only place we that will grow significantly(especially when younuse flatpaks).