0

Trying to install arch on my dell using fdisk and MBR (DOS "o")

I created 3 partitions:

  • sda1 root
  • sda2 swap
  • sda3 extended

But lsblk says sda3 is 1KiB even though I specifically selected "+69G" which is the remaining space of my disk. I can even confirm this my typing "p" to print partition table which says 69 GB extended volume.

So far I have tried changing the sda3 type to lvm and writing the changes but i faced the same result with lsblk showing it as 1KiB.

When I use pvcreate it says device too small. Any ideas?

1 Answer 1

2

Extended partition provides space for logical partitions, if you want to use the free space for LVM physical volume, you must add a new logical partition for it, extended partition itself is just a "container" and can't be formatted. That's also why lsblk shows it as being 1 KiB, because it is in fact only 2 sectors big (2 * 512 B) -- it only holds metadata (positions of the logical partitions, it really is a second partition table, a hack used to overcome the 4 primary partition limit in the MSDOS partition table) and lsblk doesn't show the free space "inside" the extended partition.

So to use the space, use fdisk /dev/sda to a new logical partition (same way you added the primary and extended partitions, just the type will be "logical"), it will be added "inside" the extended partition and then use pvcreate to create LVM PV on it: # pvcreate /dev/sda5 (first logical partition will always be sda5 (on sda)).

3
  • Like you said I went inside the sda3 partition with fdisk and created new primary partition but type "logical" was not on the list so I selected type "Linux LVM" and pvcreate /dev/sda5 was not picking it up either. Says no device found. lsblk doesn't show sda5 either.
    – user334374
    Commented Apr 18, 2021 at 4:30
  • Run fdisk /dev/sda, add new partition using n, if it asks for partition type, select l for logical. It's possible it won't asks if you don't have enough free space for a third primary partition, in this case fdisk will create logical partition without asking . Commented Apr 18, 2021 at 5:00
  • Yes that worked. I didn't check going back to Fdisk dev/sda after I created the lvm in sda3. Oddly enough there aren't many tutorials out there going over making lvm for dos. Thank you :)
    – user334374
    Commented Apr 18, 2021 at 5:10

You must log in to answer this question.