Project

General

Profile

Bug #11467

mdb: mdb_fdio should use mediainfo for block devices.

Added by Toomas Soome 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdb - modular debugger
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

The code to read/write block devices should use DKIOCGMEDIAINFO to read logical block size.

mdb disk_label with 4kn disk:

root@openindiana:/tmp# mdb /dev/rdsk/c4t0d0p0
> ::load disk_label
> ::mbr
mdb: failed to read MBR: cannot read past current end of file
> 

and same with patched mdb:

root@openindiana:/tmp# ./mdb /dev/rdsk/c4t0d0p0
> ::load disk_label
> ::mbr
Format: loader (illumos)
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0
Loader STAGE1_STAGE2_LBA: 256
Loader STAGE1_STAGE2_SIZE: 1
Loader STAGE1_STAGE2_UUID: 00000000-0000-0000-0000-000000000000

STAGE1 in VBR:
Format: unknown
Signature: 0x0 (invalid)
UniqueMBRDiskSignature: 0

PART TYPE                  ACTIVE  STARTCHS    ENDCHS      SECTOR     NUMSECT  
0    EFI_PMBR:0xee         0       1023/255/63 1023/255/63 1          10485759 
1    UNUSED:0
2    UNUSED:0
3    UNUSED:0
> 

History

#1

Updated by Electric Monk 4 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit b55a30d7f192ccc3e815772ffcd83bec669ae7a7

commit  b55a30d7f192ccc3e815772ffcd83bec669ae7a7
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-24T05:06:57.000Z

    11467 mdb: mdb_fdio should use mediainfo for block devices.
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF