Project

General

Profile

Feature #10860

mdb: update mbr to print vbr and add vtoc command

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

If our mbr is pointing to 1 sector size stage 2, it is stage1 in partition, show it too.

add ::vtoc command.

History

#1

Updated by Dan McDonald 5 months ago

Testing done, as originally seen in https://illumos.org/rb/r/1794/ :

root@test:/home/tsoome# mdb /dev/rdsk/c2t5d0p0
> ::load disk_label
> 0t12544::vtoc
VBR info:
Format: loader (illumos)
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0
Loader STAGE1_STAGE2_LBA: 12594
Loader STAGE1_STAGE2_SIZE: 273
Loader STAGE1_STAGE2_UUID: 56857fe4-1f08-494e-e94e-a3db89148858
Label magic: 0xdabe (valid)
Label is sane
Label version: 0x1
Volume name = <>
ASCII name  = <VMware-Virtual NVMe Disk-1.0 cyl 3342 alt 0 hd 224 sec 56>
pcyl        = 3342
ncyl        = 3342
acyl        =    0
bcyl        =    0
nhead       =  224
nsect       =   56

PART TAG          FLAG    STARTLBA    ENDLBA      SIZE   BLOCKS    
0    usr          wm      6435072     48344575    3.98G  41909504  
1    unassigned   wm      0           0           0      0         
2    backup       wu      6422528     48344575    3.98G  41922048  
3    unassigned   wm      0           0           0      0         
4    unassigned   wm      0           0           0      0         
5    unassigned   wm      0           0           0      0         
6    unassigned   wm      0           0           0      0         
7    unassigned   wm      0           0           0      0         
8    boot         wu      6422528     6435071     6.12M  12544     
9    unassigned   wm      0           0           0      0         
10   unassigned   wm      0           0           0      0         
11   unassigned   wm      0           0           0      0         
12   unassigned   wm      0           0           0      0         
13   unassigned   wm      0           0           0      0         
14   unassigned   wm      0           0           0      0         
15   unassigned   wm      0           0           0      0         
> 0t12544::vtoc -c
VBR info:
Format: loader (illumos)
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0
Loader STAGE1_STAGE2_LBA: 12594
Loader STAGE1_STAGE2_SIZE: 273
Loader STAGE1_STAGE2_UUID: 56857fe4-1f08-494e-e94e-a3db89148858
Label magic: 0xdabe (valid)
Label is sane
Label version: 0x1
Volume name = <>
ASCII name  = <VMware-Virtual NVMe Disk-1.0 cyl 3342 alt 0 hd 224 sec 56>
pcyl        = 3342
ncyl        = 3342
acyl        =    0
bcyl        =    0
nhead       =  224
nsect       =   56

PART TAG          FLAG    CYLINDERS  SIZE   BLOCKS    
0    usr          wm      2 - 3342   3.98G  41909504  
1    unassigned   wm      0          0      0         
2    backup       wu      1 - 3342   3.98G  41922048  
3    unassigned   wm      0          0      0         
4    unassigned   wm      0          0      0         
5    unassigned   wm      0          0      0         
6    unassigned   wm      0          0      0         
7    unassigned   wm      0          0      0         
8    boot         wu      1 - 1      6.12M  12544     
9    unassigned   wm      0          0      0         
10   unassigned   wm      0          0      0         
11   unassigned   wm      0          0      0         
12   unassigned   wm      0          0      0         
13   unassigned   wm      0          0      0         
14   unassigned   wm      0          0      0         
15   unassigned   wm      0          0      0         
> 0t12544::vtoc -cr
VBR info:
Format: loader (illumos)
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0
Loader STAGE1_STAGE2_LBA: 12594
Loader STAGE1_STAGE2_SIZE: 273
Loader STAGE1_STAGE2_UUID: 56857fe4-1f08-494e-e94e-a3db89148858
Label magic: 0xdabe (valid)
Label is sane
Label version: 0x1
Volume name = <>
ASCII name  = <VMware-Virtual NVMe Disk-1.0 cyl 3342 alt 0 hd 224 sec 56>
pcyl        = 3342
ncyl        = 3342
acyl        =    0
bcyl        =    0
nhead       =  224
nsect       =   56

PART TAG          FLAG    CYLINDERS  SIZE   BLOCKS    
0    usr          wm      1 - 3341   3.98G  41909504  
1    unassigned   wm      0          0      0         
2    backup       wu      0 - 3341   3.98G  41922048  
3    unassigned   wm      0          0      0         
4    unassigned   wm      0          0      0         
5    unassigned   wm      0          0      0         
6    unassigned   wm      0          0      0         
7    unassigned   wm      0          0      0         
8    boot         wu      0 - 0      6.12M  12544     
9    unassigned   wm      0          0      0         
10   unassigned   wm      0          0      0         
11   unassigned   wm      0          0      0         
12   unassigned   wm      0          0      0         
13   unassigned   wm      0          0      0         
14   unassigned   wm      0          0      0         
15   unassigned   wm      0          0      0         
> 0t12544::vtoc -c 
VBR info:
Format: loader (illumos)
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0
Loader STAGE1_STAGE2_LBA: 12594
Loader STAGE1_STAGE2_SIZE: 273
Loader STAGE1_STAGE2_UUID: 56857fe4-1f08-494e-e94e-a3db89148858
Label magic: 0xdabe (valid)
Label is sane
Label version: 0x1
Volume name = <>
ASCII name  = <VMware-Virtual NVMe Disk-1.0 cyl 3342 alt 0 hd 224 sec 56>
pcyl        = 3342
ncyl        = 3342
acyl        =    0
bcyl        =    0
nhead       =  224
nsect       =   56

PART TAG          FLAG    CYLINDERS  SIZE   BLOCKS    
0    usr          wm      2 - 3342   3.98G  41909504  
1    unassigned   wm      0          0      0         
2    backup       wu      1 - 3342   3.98G  41922048  
3    unassigned   wm      0          0      0         
4    unassigned   wm      0          0      0         
5    unassigned   wm      0          0      0         
6    unassigned   wm      0          0      0         
7    unassigned   wm      0          0      0         
8    boot         wu      1 - 1      6.12M  12544     
9    unassigned   wm      0          0      0         
10   unassigned   wm      0          0      0         
11   unassigned   wm      0          0      0         
12   unassigned   wm      0          0      0         
13   unassigned   wm      0          0      0         
14   unassigned   wm      0          0      0         
15   unassigned   wm      0          0      0         
> 0t12544::vtoc -r
VBR info:
Format: loader (illumos)
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0
Loader STAGE1_STAGE2_LBA: 12594
Loader STAGE1_STAGE2_SIZE: 273
Loader STAGE1_STAGE2_UUID: 56857fe4-1f08-494e-e94e-a3db89148858
Label magic: 0xdabe (valid)
Label is sane
Label version: 0x1
Volume name = <>
ASCII name  = <VMware-Virtual NVMe Disk-1.0 cyl 3342 alt 0 hd 224 sec 56>
pcyl        = 3342
ncyl        = 3342
acyl        =    0
bcyl        =    0
nhead       =  224
nsect       =   56

PART TAG          FLAG    STARTLBA    ENDLBA      SIZE   BLOCKS    
0    usr          wm      12544       41922047    3.98G  41909504  
1    unassigned   wm      0           0           0      0         
2    backup       wu      0           41922047    3.98G  41922048  
3    unassigned   wm      0           0           0      0         
4    unassigned   wm      0           0           0      0         
5    unassigned   wm      0           0           0      0         
6    unassigned   wm      0           0           0      0         
7    unassigned   wm      0           0           0      0         
8    boot         wu      0           12543       6.12M  12544     
9    unassigned   wm      0           0           0      0         
10   unassigned   wm      0           0           0      0         
11   unassigned   wm      0           0           0      0         
12   unassigned   wm      0           0           0      0         
13   unassigned   wm      0           0           0      0         
14   unassigned   wm      0           0           0      0         
15   unassigned   wm      0           0           0      0         
> 0t12544::vtoc -rc
VBR info:
Format: loader (illumos)
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0
Loader STAGE1_STAGE2_LBA: 12594
Loader STAGE1_STAGE2_SIZE: 273
Loader STAGE1_STAGE2_UUID: 56857fe4-1f08-494e-e94e-a3db89148858
Label magic: 0xdabe (valid)
Label is sane
Label version: 0x1
Volume name = <>
ASCII name  = <VMware-Virtual NVMe Disk-1.0 cyl 3342 alt 0 hd 224 sec 56>
pcyl        = 3342
ncyl        = 3342
acyl        =    0
bcyl        =    0
nhead       =  224
nsect       =   56

PART TAG          FLAG    CYLINDERS  SIZE   BLOCKS    
0    usr          wm      1 - 3341   3.98G  41909504  
1    unassigned   wm      0          0      0         
2    backup       wu      0 - 3341   3.98G  41922048  
3    unassigned   wm      0          0      0         
4    unassigned   wm      0          0      0         
5    unassigned   wm      0          0      0         
6    unassigned   wm      0          0      0         
7    unassigned   wm      0          0      0         
8    boot         wu      0 - 0      6.12M  12544     
9    unassigned   wm      0          0      0         
10   unassigned   wm      0          0      0         
11   unassigned   wm      0          0      0         
12   unassigned   wm      0          0      0         
13   unassigned   wm      0          0      0         
14   unassigned   wm      0          0      0         
15   unassigned   wm      0          0      0         
> 
root@test:/home/tsoome#
#2

Updated by Electric Monk 5 months ago

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

git commit 4188fb37741cc73b35fdd065a2c20fc9054d7f49

commit  4188fb37741cc73b35fdd065a2c20fc9054d7f49
Author: Toomas Soome <tsoome@me.com>
Date:   2019-05-08T13:19:56.000Z

    10860 mdb: update mbr to print vbr and add vtoc command
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF