2

long time Linux user, but can't find an answer to this. The makers of parted/gparted completely ignored my question.

Some time back in slackware, I'd formatted a 2TB with two ext2 partitions, but when I install either Mint or Ubuntu, gparted sees this as a single FAT32 formatted drive.

See print from parted and fdisk below.

Anyone know how to get parted to see my ext2 partitions without moving everything off and repartitioning in parted?

parted:

Model: ATA ST2000DM001-9YN1 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  2000GB  2000GB  fat32

fdisk:

Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes   
Disklabel type: dos
Disk identifier: 0x3d1c2b39

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1             2048 1719666687 1719664640  820G 83 Linux
/dev/sdb2       1719666688 3907029167 2187362480    1T 83 Linux
muru
  • 193,181
  • 53
  • 473
  • 722
  • I'm guessing a little here... but it probably has to do with 1) the partition table "loop" or "dos" (MBR), and 2) the ID code "83" of the EXT2 partitions. For modern Ubuntu systems with this large of a disk, the partition table should be GPT, and the partitions EXT4. You may have to backup the data, if you haven't already, lay down a fresh GPT partition table and two EXT4 partitions, and restore the data. – heynnema Aug 09 '17 at 00:18
  • Heynnema, thanks, but this isn't the case for other ext2 partitions on similar drives. Would an fdisk -l help to clarify? – Angus Fergusson Aug 09 '17 at 00:24
  • Isn't that what you're already showing? Do you have other large disks that show different parted/fdisk results? – heynnema Aug 09 '17 at 00:26
  • ps: are you using current versions of parted and fdisk? – heynnema Aug 09 '17 at 00:32
  • In the body of the message is the print command for parted and fdisk specific to sdb. I'm saysing I have four additional (external) drives and some of them are similar to sdb: I'd used fdisk to set them up, they report pretty much the same data, though specific to each drive. The only difference I can find between them and sdb is that parted cant see the two ext2 partitions on sdb. – Angus Fergusson Aug 09 '17 at 00:34
  • Um, I'd found this "issue" about a month ago and updated each at that time. – Angus Fergusson Aug 09 '17 at 00:36
  • Show me the parted/fdisk output of a different disk that acts differently than this one. – heynnema Aug 09 '17 at 00:36
  • parted: Model: WDC WD20 EARX-008FB0 (scsi) Disk /dev/sdd: 2000GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 1000GB 1000GB primary ext2 2 1000GB 2000GB 1000GB primary ext2 – Angus Fergusson Aug 09 '17 at 00:42
  • fdisk: Disk /dev/sdd: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x6be94a2a Device Boot Start End Sectors Size Id Type /dev/sdd1 2048 1953514583 1953512536 931.5G 83 Linux /dev/sdd2 1953514584 3907029167 1953514584 931.5G 83 Linux – Angus Fergusson Aug 09 '17 at 00:43
  • Do you see the difference in the parted display of "partition table"? One says "loop" and the other shows "msdos". – heynnema Aug 09 '17 at 00:49
  • I do, but I don't understand the significance or if there's a way to get parted/gparted to see the partitioins. Eventually -- without removing all the files on sdb2 -- I'd like to make sdb1 my /home and not have to set that up manually ~after~ a distro install that uses gparted. Is that a field that can be changed in parted...? – Angus Fergusson Aug 09 '17 at 00:58
  • I think it all has to do with how the partition table got written to disk, and without re-writing it (thereby wiping the disk), I don't know of another way. GPT tables should be used on disks this large any way. Is this disk a one-off example of the problem? – heynnema Aug 09 '17 at 01:02
  • I've had trouble with gpt in the past, though things have probably changed since. But you pointed me to the problem -- it's that "loop" for the partition table. I see parted commands this: – Angus Fergusson Aug 09 '17 at 01:08
  • mklabel,mktable LABEL-TYPE create a new disklabel (partition table). Naturally, that'll odestroy all the data on the disk:-\. Thanks for your help, though. – Angus Fergusson Aug 09 '17 at 01:10
  • Actually, 1.8 TiB is within the limits of MBR. (It tops out at 2.0 TiB, assuming standard 512-byte sectors.) There's no degradation of performance or reliability as you approach that limit. That said, GPT is a more robust partitioning system in general, so I don't disagree with the advice to use it instead of MBR, provided this is *not* a boot disk on a BIOS-only computer. I don't know what the "loop" partition table type is, although when I experimented and created a "loop" partition table in GParted, that program seemed to ignore it and treat it like a whole-disk device. – Rod Smith Aug 09 '17 at 18:29

1 Answers1

1

From the comments...

Parted shows the partition table is "loop" which is incorrect. It should indicate "msdos".

Backup your data. Lay down a fresh partition table (GPT recommended), create two new partitions (EXT4 recommended), and restore your data.

heynnema
  • 68,647
  • 15
  • 124
  • 180