dankamongmen / growlight

notcurses block device manager / system installation tool
https://nick-black.com/dankwiki/index.php/Growlight
GNU General Public License v3.0
85 stars 12 forks source link

empty space misidentified as GPT trailing metadata #61

Closed dankamongmen closed 4 years ago

dankamongmen commented 4 years ago

I've got a little USB drive on which I've imaged MemTest86+ 8. Here's the fdisk:

Command (m for help): p
Disk /dev/sdo: 960 MiB, 1006632960 bytes, 1966080 sectors
Disk model: JD FIREFLY      
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: gpt
Disk identifier: 62A49C40-FFC7-49E1-9047-86529276CE0C

Device      Start     End Sectors  Size Type
/dev/sdo1    2048  512000  509953  249M Microsoft basic data
/dev/sdo2  514048 1023966  509919  249M EFI System

and the gdisk:

[schwarzgerat](0) $ sudo gdisk /dev/sdo
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdo: 1966080 sectors, 960.0 MiB
Model: JD FIREFLY      
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 62A49C40-FFC7-49E1-9047-86529276CE0C
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1023966
Partitions will be aligned on 2048-sector boundaries
Total free space is 4061 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          512000   249.0 MiB   0700  MemTest86
   2          514048         1023966   249.0 MiB   EF00  EFI System Partition

Command (? for help): 

and the blkid:

[schwarzgerat](2) $ sudo blkid -p -i /dev/sdo
/dev/sdo: MINIMUM_IO_SIZE="512" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512" PTUUID="62a49c40-ffc7-49e1-9047-86529276ce0c" PTTYPE="gpt"
[schwarzgerat](0) $ sudo blkid -p -i /dev/sdo1
/dev/sdo1: SEC_TYPE="msdos" UUID="906D-0A66" VERSION="FAT16" TYPE="vfat" USAGE="filesystem" MINIMUM_IO_SIZE="512" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512" PART_ENTRY_SCHEME="gpt" PART_ENTRY_NAME="MemTest86" PART_ENTRY_UUID="caebf841-1b12-4e93-9a99-8d239626b892" PART_ENTRY_TYPE="ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" PART_ENTRY_FLAGS="0x4" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="509953" PART_ENTRY_DISK="8:224"
[schwarzgerat](0) $ sudo blkid -p -i /dev/sdo2
/dev/sdo2: SEC_TYPE="msdos" UUID="906D-82F1" VERSION="FAT16" TYPE="vfat" USAGE="filesystem" MINIMUM_IO_SIZE="512" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512" PART_ENTRY_SCHEME="gpt" PART_ENTRY_NAME="EFI System Partition" PART_ENTRY_UUID="1a17399b-ab4e-4332-973b-80eb2dc2a2dd" PART_ENTRY_TYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="514048" PART_ENTRY_SIZE="509919" PART_ENTRY_DISK="8:224"
[schwarzgerat](0) $

2019-11-05-012803_546x142_scrot 2019-11-05-012807_775x500_scrot

dankamongmen commented 4 years ago

Finally, here's what I see in growlight:

│        sdo┌─────────────────────────────────────partition table metadata⇦⇦⇦⇖┐│
│           │me vfat (261.09M) e vfat (261.07M) mmm 482.36M partition table mm││
│     no i/o└┤JD FIREFLY       1100   1.00G  512B gpt   n/a              PATA├┘

╭─press 'v' to dismiss details───────────────────────────────────────────────╮ │
│Intel Corporation C610/X99 series chipset USB xHCI Host Controller          │─╯
│Firmware: 2101 BIOS: American Megatrends Inc. Load: 798Mbps                 │
│sdo: JD FIREFLY1100 (960MiB) S/N:  WC- WRVx RO-                             │─╮
│Sectors: 1966080 (512B logical / 512B physical) PATA (133Mbps)              │┐│
│Partitioning: gpt I/O scheduler: [mq-deadline] none                         │││
│ 460.01MiB 1023967→1966079 partition table metadata                         │┘│
│                                                                            │┐│
╰────────────────────────────────────────────────────────────────────────────╯─
dankamongmen commented 4 years ago

2020-01-03-040545_802x1417_scrot

got it.