Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Clean Install & Optimum Partitioning

  1. #21
    Join Date
    May 2021
    Beans
    19

    Re: Clean Install & Optimum Partitioning

    Quote Originally Posted by TheFu View Post
    Linux File System Hierarchy Standards: https://en.wikipedia.org/wiki/Filesy...tory_structure
    There's a nice table there.
    Are those automatically created?
    Should I create /var /usr /etc ........ etc?

  2. #22
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Clean Install & Optimum Partitioning

    Quote Originally Posted by erosman View Post
    Are those automatically created?
    Should I create /var /usr /etc ........ etc?
    That is a judgement call. It depends. In general, no, but you could.
    For example, here's one of my real systems (df -Th output stripped of gunk):
    Code:
    Type  Size  Used Avail Use% Mounted on
    ext4   32G   17G   14G  54% /
    ext2  720M  162M  522M  24% /boot
    ext4  459G  416G   44G  91% /Backups
    ext4  173G  127G   37G  78% /var/lib/libvirt
    ext4   59G   14G   42G  25% /var/lib/lxd
    zfs    13G  937M   12G   8% /var/lib/lxd/storage-pools/lxd/containers/pihole
    It boots with legacy BIOS, not UEFI. This is an SSD system, with backups to a HDD.
    • / is 32G in size. That's plenty to hold everything - for me. I don't install every GUI app there is. I know what I like and remove stuff I don't like.
    • /boot is a little large, but I'd been burned on another system with too small /boot/ and got into some kernel update issues. This machine has never come close to using 500MB for /boot.
    • /Backups - are on a completely different HDD.
    • The other areas under /var/lib/.... are for special needs. libvirt is the default location for KVM/QEMU virtual machines. I actually don't use much of that storage because I prefer to provide each VM with direct access to a logical volume, which doesn't show up in the df output. There are 15 LVs on this box for 10+ virtual machines. I removed the first column in the table above, which showed LVs, not partitions, trying to limit confusion. LVs don't look like partitions.


    So, the answer is "it depends." My prior answer is a best guess at what would be low risk, but not wasteful, for most desktop user needs with a 20.04 or later install.

    Don't confuse partitions with directories. Most of the time, they aren't really tightly coupled. As long as files "appear" in the correct directory, the underlying storage and mounts just need to be native Linux file systems for the most part. There are a few exceptions, like /boot/EFI must be FAT32 and external data storage may be NTFS, if you like, but your HOME directory cannot be NTFS/FAT32/exFAT, at least not currently.

    Update: Just to clarify, in the table above, /var is part of /. It is only the very specific, deeper, areas that have other mounted storage. Below, oldfred shows a little cleaner, typical, setup using UEFI boot, no LVM, and /home is on / too, but most of the data files are placed on the /mnt/data partition. I'd guess symbolic links from places inside his HOME to that other location ~/Documents ---> /mnt/data/Docs or similar is being used.
    Last edited by TheFu; June 6th, 2021 at 03:30 PM.

  3. #23
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    6,014
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Clean Install & Optimum Partitioning

    Quote Originally Posted by erosman View Post
    Are those automatically created?
    Should I create /var /usr /etc ........ etc?
    They are automatically created as directories on the root partition when you install Ubuntu. If you really wish you can put /var on a separate partition, but on typical systems that doesn't really serve a purpose.

  4. #24
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Clean Install & Optimum Partitioning

    Apps are installed in multiple places.
    I like to install zim to keep my notes on what I comment here & terminal commands as I do not remember all the extra parameters or exactly how they are used for every command.

    fred@z97-focal-kubuntu:~$ whereis zim
    zim: /usr/bin/zim /usr/share/zim /usr/share/man/man1/zim.1.gz

    You can install games in /home.

    I prefer to just have ESP, / (more than one) on SSD & copies, data , test installs HDD. My other system has larger NVMe SSD & I have moved data to NVMe drive. I keep /home inside / as it is tiny when all data is in data partition. But I immediately remove all snaps which are larger versions of apps. And for a few apps then install the .deb versions.
    So I have systems with similar, but different partitioning. This also shows another 128GB flash drive's data partition.

    Code:
     fred@z97-focal-kubuntu:~$ df -Th
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/sda6      ext4       24G  9.3G   14G  42% /
    /dev/sda1      vfat      499M   16M  484M   4% /boot/efi
    /dev/sdb4      ext4      385G  131G  235G  36% /mnt/data
    /dev/sdc4      ext4       94G   33G   56G  38% /media/fred/data128
    Last edited by oldfred; June 6th, 2021 at 02:56 PM.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #25
    Join Date
    May 2021
    Beans
    19

    Re: Clean Install & Optimum Partitioning

    As mentioned I am new to Linux/Ubuntu so when I get varying opinions, I get even more confused.

    So far... I understood that for a basic set-up I would create 4 partitions:
    efi + swap + / + /home


    AFA their sizes, I get varied opinions, even here in this topic.

    efi has been suggested from
    TheFu 30mb
    oldfred 512mb

    swap has been suggested from
    oldfred 2gb
    TheFu 4gb
    ml9104 17gb

    / has been suggested from
    ml9104 30gb
    oldfred 30gb
    TheFu 40gb

    Regarding efi, the space is small and it doesn't really matter if it is more that needed. I guess 100mb (as suggested in a video tutorial) would be safe.
    Regarding swap, I don't know if I will use hibernation or not, but to avoid having to reformat, it would be safe to go for 20gb.
    Regarding / , I guess 40gb should be safe.

    I am still unsure where the installed applications go. Do they go in / partition or in /home partition (it doesn't matter about the sub-directories).

    👉 The reason I ask is that, if I want to replace/reinstall Ubuntu, would I also have to reinstall applications as well or not?

  6. #26
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Clean Install & Optimum Partitioning

    The different opinions is because we all have different experiences.

    As for swap, if you have 16G of RAM and plan to hibernate, having 16.1G of swap in a separate partition is the "correct" answer. If you don't hibernate, 12G will be wasted, unnecessary. Not the end of the world.

    The default Ubuntu package manager will install files in 3 places.
    • /usr
    • /etc
    • /var

    Typically, those will be part of the / partition.

    HOME - which doesn't HAVE to be /home - gets personal data and personal settings.

    If you like, you could make each partition 100GB "to be safe". It would be crazy inefficient, but you could do it and the FAT32 tools will freak out, since MSFT says FAT shouldn't be larger than 32GB.

    Reinstalling is 15 minutes. Not the end of the world if it has to be done. Why not plan to spend an hour, trying 4 different installs, see what happens? We've shown the commands to check sizes above - run those commands after each install - see what you can see. Then decide for yourself. No need to be paralyzed.

  7. #27
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Clean Install & Optimum Partitioning

    My swap partitions is 2gb, since I don't load a ton of heavy programs. My EFI is 550MB. Read this regarding EFI size:
    https://askubuntu.com/questions/1313...-efi-partition

    There is some distros that require a larger EFI. They place kernels inside EFI. But if you plan to stay with Ubuntu/debian your safe with the default 100MB.

    Everyone has own opinion regarding partitions. I keep everything inside "/". In time you will figure it out.

  8. #28
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    6,014
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Clean Install & Optimum Partitioning

    Quote Originally Posted by erosman View Post
    As mentioned I am new to Linux/Ubuntu so when I get varying opinions, I get even more confused.
    When you get varying opinions from experience users, it usually doesn't really matter.

    I am still unsure where the installed applications go. Do they go in / partition or in /home partition (it doesn't matter about the sub-directories).

    👉 The reason I ask is that, if I want to replace/reinstall Ubuntu, would I also have to reinstall applications as well or not?
    The applications you install from the official repositories (I rarely install anything from other sources) get installed on your root partition. Their files get spread over /var, /etc and /usr, usually. /home is only for user files.

    When you replace or reinstall Ubuntu, you have to reinstall the applications too. A different version of Ubuntu comes with different versions of applications and different versions of their supporting libraries. Reinstalling the applications can be automated, if you wish. I don't, as the applications can be reinstalled with a few clicks and it's only needed once every 2 years.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •