0

from fdisk -l /dev/sda , we got the following

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200   482344959   240122880   83  Linux

usually under system we should get Linux LVM , since sda2 is LVM

vgdisplay | grep Format
  Format                lvm2

is it something that we need to ignore ?

1 Answer 1

4

The id 83 in a dos partition table is a generic one for Linux filesystems; 8e is a more specific one for Linux LVM.

The id of your /dev/sda2 was a choice of whoever created the partition. The choice may have been explicit (he or she deliberately wanted 83) or implicit (he or she chose not to change the default value of 83).

The type of the filesystem (or another structure) inside the partition does not have to match the id. The id is only to "encode" the purpose of the partition in the partition table itself, i.e. without any need to examine data inside the partition (and this is usually a filesystem). One is not obliged to create a "matching" filesystem, technically it can be anything. E.g. you can create NTFS on your sda2 and still keep id 83 (which would be misleading then); or you can change the id to whatever you want. It's technically totally possible, although in case of discrepancy between the id and the actual content some tools may misbehave (compare this other answer of mine, but note it's for GPT).

You don't need to ignore 83. If you think 8e fits your setup better, correct the id. On the other hand if everything works as-is then you don't necessarily need to correct the id. It's your choice. If sda2 is indeed for LVM then most likely 8e does fit the setup better.

To change the id of /dev/sda2 to 8e:

  1. Run fdisk /dev/sda.
  2. Cast the command t.
  3. Choose the partition number 2.
  4. Choose (input) 8e as the new type.
  5. Examine the new partition table with p.
  6. If everything looks fine, write the new partition table to the device with w (if not, abort with q).

Doing this when /dev/sda (including sda1, sda2) is in use may trigger a warning, but if it's only the id you're changing then the whole operation is safe.

1
  • can you update your answer - correct the id. ?
    – King David
    Commented Jan 9 at 9:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .