Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Trying to understand how my disk is organized (partitions)

  1. #1
    Join Date
    Jun 2020
    Beans
    8

    Question Trying to understand how my disk is organized (partitions)

    Hello, I'm new to Ubuntu user, so apologies if I'm asking too simple things.

    I recently installed Ubuntu on an old Dell laptop over Win7, choosing during installation that only Ubuntu should be on the computer (Win erased). I have one 256 GB SSD hard drive, no other disks (at least that's what I believe).

    When I explore the disk with Disks, I can see an "image" of the disk under heading "Volumes". On the left side of that image, it says "File system - Partition 1 - 537 MB FAT". On its right side there is longer bar with two parts. The two parts are jointly equally high as is the leftmost part (Partition 1). The upper part reads "Extended partition - Partition 2 - 256 GB", and the lower "Filesystem - Partition 5 - 256 GB Ext4".
    The partition type of these 3 entities are (in the same order): WP95 FAT 32 (Bootable) / Extended / Linux.

    Could somebody help me understand the following:

    1) Are there really 3 partitions on my single hard drive?
    2) If so, is it normal for an Ubuntu system to have these 3 partitions, or are these some remnants of my previous setup (Win 7)?
    3) Why are partitions 2 and 5 displayed on top of each other, and why is their total size (sum of the two) actually twice the size of my hard drive?
    4) Why on earth are the partitions numbered like that: 1, 2, 5? (Where are 3 and 4?)
    5) Can any of the above mean that there is still something from Dell or Win 7 lurking on the disk? I wouldn't want that.

  2. #2
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    380
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Trying to understand how my disk is organized (partitions)

    Open a Terminal (Ctrl+Alt+T) and type:

    sudo lsblk
    sudo blkid

    and let let us know the results.

  3. #3
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    7,720
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Trying to understand how my disk is organized (partitions)

    Quote Originally Posted by valdemarv View Post
    3) Why are partitions 2 and 5 displayed on top of each other, and why is their total size (sum of the two) actually twice the size of my hard drive?
    4) Why on earth are the partitions numbered like that: 1, 2, 5? (Where are 3 and 4?)
    https://en.wikipedia.org/wiki/Disk_p...nded_partition

    One is inside the other.

    You can only have 4 partitions with MBR partitions. If you make one of those (2, in this case) an Extended Partition you can put several logical partitions (just the one - number 5 - in this case) inside it.
    None but ourselves can free our minds

  4. #4
    Join Date
    Jun 2020
    Beans
    8

    Re: Trying to understand how my disk is organized (partitions)

    Hello @ml9104, here are the responses. I wasn't sure if some of the ids are meant to be kept confidential, so replaced them with SOMECODE.

    Code:
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    
     loop0    7:0    0  93,9M  1 loop /snap/core/9066
     loop1    7:1    0 240,8M  1 loop /snap/gnome-3-34-1804/24
     loop2    7:2    0   9,1M  1 loop /snap/canonical-livepatch/95
     loop3    7:3    0  62,1M  1 loop /snap/gtk-common-themes/1506
     loop4    7:4    0    55M  1 loop /snap/core18/1705
     loop5    7:5    0  27,1M  1 loop /snap/snapd/7264
     loop6    7:6    0  49,8M  1 loop /snap/snap-store/433
     loop7    7:7    0    55M  1 loop /snap/core18/1754
     loop8    7:8    0  49,8M  1 loop /snap/snap-store/454
     loop9    7:9    0 255,6M  1 loop /snap/gnome-3-34-1804/33
     sda      8:0    0 238,5G  0 disk  
     ├─sda1   8:1    0   512M  0 part /boot/efi
     ├─sda2   8:2    0     1K  0 part  
     └─sda5   8:5    0   238G  0 part /

    Code:
     /dev/sda5: UUID="SOMECODE" TYPE="ext4" PARTUUID="SOMECODE"
     /dev/loop0: TYPE="squashfs"
     /dev/loop1: TYPE="squashfs"
     /dev/loop2: TYPE="squashfs"
     /dev/loop3: TYPE="squashfs"
     /dev/loop4: TYPE="squashfs"
     /dev/loop5: TYPE="squashfs"
     /dev/loop6: TYPE="squashfs"
     /dev/loop7: TYPE="squashfs"
     /dev/sda1: UUID="SOMECODE" TYPE="vfat" PARTUUID="SOMECODE"
     /dev/loop8: TYPE="squashfs"
     /dev/loop9: TYPE="squashfs"
    Last edited by DuckHook; 4 Weeks Ago at 11:04 PM. Reason: Added [CODE] tags.

  5. #5
    Join Date
    Jun 2020
    Beans
    8

    Re: Trying to understand how my disk is organized (partitions)

    @CatKiller, so the partition 5 is inside 2? Is the numbering because 3 and 4 are reserved for the potential third and fourth primary partitions or is there some other reason for it? I'm curious to know because I've seen some discussion where people are wondering about their Dell partitions and it seems to be that Dell has included some service or recovery partitions in their systems. Hence I was wondering why the numbers are like this after a "clean Ubuntu" install (i.e. Win was not supposed to be kept alongside Ubuntu).

  6. #6
    Join Date
    Jun 2020
    Beans
    8

    Re: Trying to understand how my disk is organized (partitions)

    And allow please one more question: which of these is the actual boot partition for Ubuntu, nr 1?

  7. #7
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    380
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Trying to understand how my disk is organized (partitions)

    First, don't worry about posting the UUIDs. They are internal to your machine and useless for anyone else.

    Second, your installation was unsuccessful. You have remnants of old stuff, and the partitioning is no good.

    You need to do a new install and format and partition your HDD correctly. For a 100% Ubuntu install, the file system should be ext4.

    How you want to partition your HDD is up to you, a single partition is also fine. I attach an example from my own laptop:

    Code:
    macro@macro-pc:~$ lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 223,6G  0 disk 
    ├─sda1   8:1    0  29,3G  0 part /
    ├─sda2   8:2    0 188,3G  0 part /home
    └─sda3   8:3    0     6G  0 part [SWAP]
    sr0     11:0    1  1024M  0 rom  
    
    macro@macro-pc:~$ blkid
    /dev/sda1: UUID="269ffc34-0c2a-4ef4-b794-85019d562e0d" TYPE="ext4" PARTUUID="7e408a68-01"
    /dev/sda2: UUID="aac2fbd9-4194-436b-b8ae-65262e102311" TYPE="ext4" PARTUUID="7e408a68-02"
    /dev/sda3: UUID="22928e29-fe9a-45ee-b043-666fd6520d7c" TYPE="swap" PARTUUID="7e408a68-03"
    macro@macro-pc:~$

  8. #8
    Join Date
    Jun 2014
    Beans
    5,910

    Re: Trying to understand how my disk is organized (partitions)

    Question 1: Yes
    Question 2: (first part of the question)No but it is an option. (2nd part of the question)It could be. Not enough information to tell
    Question 3: Explained in post above, partition 2 is a Primary partition used as an Extended partition and can not contain data. You can as pointed out above, create logical partitions within the Extended partition which can contain data. The first logical partition is always partition 5. You can create any number of logical partitions, depends mostly on the size of your drive.
    Question 4: Answered above.
    Question 5: Yes it can but I don't see how it could be a problem unless you need that 500MB for data. It might be that partition one was used with windows for an EFI install which can be determined by mounting sda1 and taking a look at it to see what it contains.

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    20,130
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Trying to understand how my disk is organized (partitions)

    This command makes more useful output:
    Code:
    lsblk -e 7 -o name,size,type,fstype,mountpoint
    After the install, you can create an alias so less typing is needed.

    Code:
    sudo fdisk -l
    is the other command to see disk layouts.

    All the "loop" stuff is useless for almost every command. All it does is take away from what you or we really care to see.

    i cannot say that the install didn't work.
    • /boot/efi has to be FAT32. That is for EFi support and part of the standard. 500MB is a reasonable size for that.
    • / as ext4 is 100% fine too. I’d want it to be 25GB and use the rest of the storage for other locations, but using all the disk this way is what the default installer does.


    Here's my 20.04 Mate desktop layout:
    Code:
    vda                         30G disk             
    ├─vda1                     512M part vfat        /boot/efi
    ├─vda2                       1K part             
    └─vda5                    29.5G part LVM2_member 
      ├─vgubuntu--mate-root     12G lvm  ext4        /
      ├─vgubuntu--mate-swap_1  4.1G lvm  swap        [SWAP]
      └─vgubuntu--mate-home     12G lvm  ext4        /home
    i use a virtual machine and only gave it 30GB total storage.
    Here's another view:
    Code:
    $ df -Th
    Filesystem                      Type  Size  Used Avail Use% Mounted on
    /dev/mapper/vgubuntu--mate-root ext4   12G   11G  427M  97% /
    /dev/mapper/vgubuntu--mate-home ext4   12G  6.2G  5.0G  56% /home
    /dev/vda1                       vfat  511M  7.1M  504M   2% /boot/efi
    i deleted the loop stuff.

  10. #10
    Join Date
    Jun 2020
    Beans
    8

    Re: Trying to understand how my disk is organized (partitions)

    Thanks a lot for all your comments! I believe I understand a bit more now. But @ml9104's comment about an unsuccessful installation got me a bit more confused and worried.
    This was indeed the default Ubuntu 20.04 LTS installation. I just allowed Win to be removed during the installation. I enclose below the response to the lsblk command, suggested by @TheFu and the further information by Disks.

    Code:
    lsblk -e 7 -o name,size,type,fstype,mountpoint
    
    NAME     SIZE TYPE FSTYPE MOUNTPOINT
    sda    238,5G disk        
    ├─sda1   512M part vfat   /boot/efi
    ├─sda2     1K part        
    └─sda5   238G part ext4   /
    
    DISKS:
    
    Partition 1
    Size        537 MB (0.2% full)
    Device        /dev/sda1
    Partition type    W95 FAT32 (Bootable)
    Contents    FAT (32-bit version) - Mounted at /boot/efi
      
    Partition 2
    Size        256 GB
    Device        /dev/sda2
    Partition type    Extended
    Contents    Extended partition
    
    Partition 5
    Size        256 GB (5.6% full)
    Device        /dev/sda5
    Partition type    Linux
    Contents    Ext4 (version 1.0) - Mounted at Filesystem Root
    If I understand correctly from the above, partition 1 is indeed an EFI system partition, partition 2 doesn't really contain anything. Instead, it is the basis for Partition 5, which in turn is the location of Linux/Ubuntu and all my data. If that is correct, allow me to place the following new questions:

    1. Is the EFI partition something that has been there since the computer was made, or did Ubuntu install somehow make it?
    2. If it is an older entity (as I presume), does it usually still contain something from the previous windows installation? I mean if I would decide e.g. to go back installing windows on this laptop, could there be some mixup between the previous and new windows installations, especially their licenses and settings?
    3. Is the EFI partition still used for something or is it competely irrelevant now? I don't mind the "lost" 500 MB, but just would like to understand the "insides" of the computer better.
    4. Based on your somewhat conflicting comments earlier: are there problems ahead if I keep the system and data on the same logical partition (5)?

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •