Announcement

Collapse
No announcement yet.

Getting ready to install fresh new 20.04 over stale upgraded 20.04 - some questions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Getting ready to install fresh new 20.04 over stale upgraded 20.04 - some questions

    Since my upgrade version broke (python dependencies), I have decided to just install a fresh copy of 20.04

    I have some questions before I begin:

    As far as partitions go: I seem to have a lot of free space on my storage partition, and less than I expected on my root and home.
    • What would be a good way to optimize this?


    I've had an issue where my system will only boot from one specific Linux kernel. Any other kernel boots me to intrafs and I can go no further till I give my system back its security blankie. I haven't been able to upgrade the kernel in over a year.
    • Where is the Linux kernel kept?
    • And will installing a fresh OS likely fix this issue?


    Click image for larger version

Name:	210606 partitions.png
Views:	1
Size:	52.5 KB
ID:	649750

    #2
    The kernels are in /boot - so under /. (/boot/efi is a separate partition, but /boot is not).
    Space-wise, / has plenty. On a fresh install, used space should go well under 10G too.
    To increase /home, well, decrease sda5 :-). You can do that at install.

    Comment


      #3
      I see that you've chosen BTRFS as your <root_fs> but you've mixed the EXT4 paradigm with the BTRFS paradigm. With EXT4 you HAVE to be concerned about partition sizes and that has always been one of EXT4's biggest problems. Improper sizing wastes LOTS of disk space if predictions don't match reality.
      With BTRFS you do not. That's because sda1 (or whatever) is a "pool" and BTRFS draws from it as subvolumes require more space and return unused space back to it. You NEVER have to worry about subvolume or folder space using BTRFS.

      The proper method of partitioning the HD would have been to give the sda1 partition the ENTIRE remaining HD space after the f32 /boot/efi partition. (When I installed 20.04 Alpha a /boot/efi partition was not forced but now it apparently is). Kubuntu would have continued with the install to create a subvolume @ and another called @home. The EXT4 partition and the unknown partition are unnecessary.

      My suggestion is to rerun the install program and when you get to the part where you choose the HD I'd first delete ALL the partitions to create on giant "unknown" holding all of the HD space, then proceed from there, create the seemingly now required /boot/efi partition and assign ALL of the remaining HD space to sda2 (?) as "/" formatted with BTRFS. The installer will automatically create / and /home.

      Once you have booted your freshly installed system into your home account you can open a Konsole and use
      sudo -i
      to jump into root. Then you can use
      mount /dev/sda2 /mnt (sda1 or sda2, depending on the existence of /boot/efi)
      and then do
      vdir /mnt
      and you will see
      /mnt/@
      /mnt/@home
      If you display /etc/fstab you will see those two subvolumes mounted as "/" and "/home".

      Here's my <root_fs>:
      Code:
       [B]mount /dev/sda1 /mnt [/B] (/mnt becomes BTRFS's <root_fs> since all subvolumes are hanging off of it.)
      root@jerryAspire-V3-771:~# [B]vdir /mnt[/B]
      total 0
      drwxr-xr-x 1 root root 264 Apr 21 11:27 @
      drwxr-xr-x 1 root root 130 Jun  6 20:09 snapshots
      I don't have @home, I've merged it with @.

      "snapshots" is the directory where I keep my snapshots:
      Code:
      [B] vdir /mnt/snapshots/[/B]
      total 0
      drwxr-xr-x 1 root root 264 Apr 21 11:27 @202106022332
      drwxr-xr-x 1 root root 264 Apr 21 11:27 @202106032230
      drwxr-xr-x 1 root root 264 Apr 21 11:27 @202106042129
      drwxr-xr-x 1 root root 264 Apr 21 11:27 @202106052152
      drwxr-xr-x 1 root root 264 Apr 21 11:27 @202106062009
      Last edited by GreyGeek; Jun 07, 2021, 08:24 PM.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        I believe the unallocated space is a relic from a factory Windows installation and I couldn't get rid of it. It's been over a year and I don't really remember.

        As for sda6 I have no idea what that is. It doesn't even show up in Dolphin. And how can it have 13gb used out of a 4mb partition? I think it is also some kind of relic.

        I'm not clear on WHY you say to allocate all remaining space to a single partition?
        • What is the advantage of doing it that way?
        • What about swap?
        • And would I have to forever type '@' (shift + 2) instead of a simple '/' when I want to cd into the home directory?
        • I use sda5 as a dumping ground for all the 'voluntary' files I want to keep long term. Would it be a simple matter of creating it after install?

        Comment


          #5
          It's really a matter of opinion on how you partition a disk and what filesystem to use. Of course there are facts to support every opinion

          The Kubuntu installer has an option to manually create partitions. As a matter of process, I always do that. I also use gpt rather than ms-dos, and to use UEFI.

          I don't use btrfs, as a choice, and prefer to select my first partition as an ESP of about 100MB. My second partition is ext4, is used for /, and is sized at about 30GB. My third partition is for /home, is also ext4 and uses about 430GB of my 500GB NVME drive. Lastly, I have a SWAP partition that is about half my RAM size.

          All this is based on my experience over time and works for my single user, small, home use, non-enterprise Linux.
          The next brick house on the left
          Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

          Comment


            #6
            And would I have to forever type '@' (shift + 2) instead of a simple '/' when I want to cd into the home directory?
            No, that does not happen. After install, you navigate the file system normally as you expect.. Think of '@' as something akin to /'dev/sda1' , like a partition name, or device , not a directory name. You are not navigating to /dev/sda4/<username> every time you want to go to to your home dir

            Swap is normally a file these days, not a separate partition, though I don't know if the installer creates one for btrfs, or not. A good question. If a swap partition is created, it will be used instead. You only need ~4gb swap unless you plan on using hibernation. I set a swap partition explicitly for this purpose, assuming it works (not tested yet).

            .And how can it have 13gb used out of a 4mb partition?
            Worth checking the health of the drive, I'd say.

            What is the advantage of doing it that way?
            The drive is a pool, the different @s are volumes that share the available space in the pool. It is not like a house with separate rooms of fixed sizes. You don't have to worry about / running out of free space, or worry about losing useful storage space because / is too big.

            tbh I just did a clean install a few weeks ago (Neon, though the OS is not important here) and used btrfs just to get my feet wet.
            Day to day usage shows absolutely zero difference in how you use the system, with the added features of snapshots and system restores.
            imo most tutorials and how tos and other articles seem to be making it far too complex sounding than it really is (or are just old, and it has become simpler for us normies to use it )

            You can of course create a new partition on free space any time, during or after the install. That is up to you, and using ext4 or whatever.

            Click image for larger version

Name:	Screenshot_20210608_075222.jpg
Views:	1
Size:	43.4 KB
ID:	645163

            Now, the partition tool does not see that my '/' has @ and @home but they are mounted by the system in the expected places:

            Code:
            $ mount | grep nvme
            /dev/nvme0n1p2 on / type btrfs (rw,noatime,ssd,space_cache,autodefrag,subvolid=379,subvol=/@)
            /dev/nvme0n1p2 on /home type btrfs (rw,noatime,ssd,space_cache,autodefrag,subvolid=378,subvol=/@home)
            /dev/nvme0n1p1 on /boot/efi type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
            /dev/nvme0n1p2 on /run/timeshift/backup type btrfs (rw,relatime,ssd,space_cache,autodefrag,subvolid=5,subvol=/)
            Last edited by claydoh; Jun 08, 2021, 06:07 AM.

            Comment


              #7
              Here is a video showing how to correctly install BTRFS as the root file system. Like in your case, it already has a /boot/efi partition.
              Scroll the video to the 10:00 mark to begin playing because that is where the install begins. Only the next 2 or 3 minutes are relevant.
              Last edited by GreyGeek; Jun 08, 2021, 11:29 AM.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                I would question the health of the partition table on the drive. If, as others have recommended, you are consolidating the free space into one btrfs, you'll want to have good backups of anything you want to keep anyway. I suggest nuking the whole drive, after a backup.
                Regards, John Little

                Comment


                  #9
                  The weird ext4 partition is "biosgrub". I think I had to make that for uefi.

                  Click image for larger version

Name:	IMG_8939.jpg
Views:	1
Size:	45.7 KB
ID:	645164

                  And I found some notes I took on that set up

                  See:
                  https://www.kubuntuforums.net/showth...l=1#post379977

                  Partition the drives
                  Create a partion table of type GPT - make sure to tell gparted to do the thing before preceding

                  100 MB space preceding first partition

                  EFI partion - ~512MB but no less than 300MB - should be sda1 and FAT32
                  - in GParted set the boot flag on it (this marks it as the ESP or type EF00)
                  - Do this after creating the partitions, right click on it in gparted to set flags
                  • Is there anything to this note I wrote?
                  • Or was I just following one of those overly complicated tutorials?
                  • is the biosgrub necessary?

                  Comment


                    #10
                    Probably a very overly complicated tutorial for 2021.
                    but your EFI notes are correct, ignoring the forum link and the "100 MB space preceding first partition" part.
                    biosgrub is totally unnecessary


                    Note you only need ~4gb of swap unless you use hibernation (suspend to disk), and have tested that it works.

                    Comment


                      #11
                      Agree with claydoh. And, again, the Kubuntu installer has a manual install option. The EFI partition can be done easily and correctly by selecting "ESP" as the filesystem, which then automatically sets the boot flag, partition name, and fat32. You can select the size of the ESP, and unless you have multiple OSes, it does not need to be large.

                      Code:
                      df -h
                      Filesystem      Size  Used Avail Use% Mounted on
                      udev            5.7G     0  5.7G   0% /dev
                      tmpfs           1.2G  2.0M  1.2G   1% /run
                      /dev/nvme0n1p2   28G  8.4G   18G  33% /
                      tmpfs           5.8G  932K  5.8G   1% /dev/shm
                      tmpfs           5.0M  4.0K  5.0M   1% /run/lock
                      tmpfs           5.8G     0  5.8G   0% /sys/fs/cgroup
                      /dev/nvme0n1p3  426G  271G  134G  68% /home
                      /dev/nvme0n1p1   93M  7.9M   85M   9% /boot/efi
                      tmpfs           1.2G   12K  1.2G   1% /run/user/1000
                      Code:
                      lsblk -f
                      NAME        FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
                      nvme0n1                                                                      
                      ├─nvme0n1p1 vfat         547D-88B8                              84.7M     8% /boot/efi
                      ├─nvme0n1p2 ext4         353966f5-f485-4db8-baeb-b0500c42a263   17.6G    31% /
                      ├─nvme0n1p3 ext4         f259144e-4345-478b-b840-7b5573801bb0  133.1G    64% /home
                      └─nvme0n1p4 swap         ca7c042b-1e20-466e-995e-185724576873                [SWAP]
                      The next brick house on the left
                      Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

                      Comment


                        #12
                        As has been suggested. I would wipe the drive totally, create only 3 partitions as Claydoh suggest - EFI., install, and swap, and then install.

                        Please Read Me

                        Comment


                          #13
                          I'm not really sure why someone would recommend reverting backwards to an ancient EXT file system with far fewer features to a user who has already been using an advanced file system like BTRFS. It's really a poor idea in my view.

                          Please Read Me

                          Comment


                            #14
                            Thanks guys! I did as you said and it all went very smoothly!

                            Click image for larger version

Name:	Screenshot_20210609_212348.png
Views:	1
Size:	25.1 KB
ID:	645167

                            Comment


                              #15
                              Originally posted by TwoFistedJustice View Post
                              The weird ext4 partition is "biosgrub".
                              With a little understanding such a partition for grub is a good idea if you sometimes have multiple installs, and you're not using btrfs. Can save trouble booting as installs come and go.

                              With btrfs, a grub subvolume can do the same thing nicely.
                              Regards, John Little

                              Comment

                              Working...
                              X