VirtualBox

Opened 4 years ago

Last modified 4 years ago

#19701 new defect

Cannot list raw disk partition table when sector size != 512 bytes

Reported by: granada29 Owned by:
Component: other Version: VirtualBox 6.1.10
Keywords: rawdisk Cc:
Guest type: Linux Host type: Mac OS X

Description

VBoxManage returns an empty partition table when the disk has a sector size of 4096 bytes. I think this may be the root cause of the problems reported in tickets

https://www.virtualbox.org/ticket/16705

https://www.virtualbox.org/ticket/16498

VBoxManage internalcommands listpartitions -rawdisk /dev/disk8
Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)

fdisk (on linux) return the following information about the drive.

Disk model: Expansion Desk  
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 268431360 bytes
Disklabel type: gpt
Disk identifier: C3BE927E-B799-4B59-A37F-8927D38FA8BF

Device         Start       End   Sectors   Size Type
/dev/sdf1          6     76805     76800   300M EFI System
/dev/sdf2      76806  61110489  61033684 232.8G Apple APFS
/dev/sdf3   61143258 482519263 421376006   1.6T Linux filesystem
/dev/sdf4  482552032 488345871   5793840  22.1G Linux swap

Using a disk with a sector size of 512 bytes is successful.

VBoxManage internalcommands listpartitions -rawdisk /dev/disk8
Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x00  0   /0  /0   0   /0  /0            200           40
2       0x00  0   /0  /0   0   /0  /0         238546       409640
3       0x00  0   /0  /0   0   /0  /0        1648981    488953032
4       0x00  0   /0  /0   0   /0  /0          20001   3866066944

fdisk for this drive shows

Disk model: 006-2DM164      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: 0F3513DC-A778-4280-BB61-5399F44E1135

Device          Start        End    Sectors  Size Type
/dev/sdf1          40     409639     409600  200M EFI System
/dev/sdf2      409640  488953031  488543392  233G Apple APFS
/dev/sdf3   488953032 3866066943 3377113912  1.6T Linux filesystem
/dev/sdf4  3866066944 3907028991   40962048 19.5G Linux swap

Change History (1)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use