Opened 2 years ago

Last modified 2 years ago

#13216 new bug

DriveSetup is not able to create and format partitions

Reported by: Premislaus Owned by: stippi
Priority: normal Milestone: Unscheduled
Component: Applications/DriveSetup Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86-64

Description

This is Jessicah EFI build, x86_64, updated via pkgman to hrev50876. Haiku is running from pendrive, in "Boot to desktop" mode (Live CD). I tried to create additional BFS and Windows Data (Fat32?) partition, on this flash stick, for some files.

  1. DriveSetup creates partition with only 984 KiB of space instead 13 GiB.
  2. When I try to format that partition, KDL occurs.

I cannot reproduce on a regular night building, because I am unable to boot - https://dev.haiku-os.org/ticket/13200

Attachments (7)

DriveSetup_create_partition_1.png (185.1 KB) - added by Premislaus 2 years ago.
DriveSetup_create_partition_2.png (187.7 KB) - added by Premislaus 2 years ago.
KDL_during_format.jpg (1.7 MB) - added by Premislaus 2 years ago.
KDL_bt.jpg (1.9 MB) - added by Premislaus 2 years ago.
After_exit_from_KDL.png (87.5 KB) - added by Premislaus 2 years ago.
syslog.old (512.0 KB) - added by Premislaus 2 years ago.
syslog (230.3 KB) - added by Premislaus 2 years ago.

Change History (8)

Changed 2 years ago by Premislaus

Changed 2 years ago by Premislaus

Changed 2 years ago by Premislaus

Attachment: KDL_during_format.jpg added

Changed 2 years ago by Premislaus

Attachment: KDL_bt.jpg added

Changed 2 years ago by Premislaus

Attachment: After_exit_from_KDL.png added

Changed 2 years ago by Premislaus

Attachment: syslog.old added

Changed 2 years ago by Premislaus

Attachment: syslog added

comment:1 Changed 2 years ago by jessicah

Well, the KDL is likely due to trying to format a strange partition. The partition creation itself is interesting though, as the GPT structures on disk think it has a maximum size of 1GB, which doesn't match what DriveSetup is showing. Obviously, the partition validation code is shrinking the partition to the maximum size the current GPT headers indicate, resulting in the tiny partition.

Indeed, we have in syslog "KERN: last usable block: 2047966", multiply this by sector size of 512 gives us 1GB. This would require DriveSetup identifying that the GPT is on a larger disk, relocating the backup headers and changing the pointers to end of the disk to match that of the actual disk size. I'm not sure how feasible this would be to achieve, but definitely an interesting case to look into.

Note: See TracTickets for help on using tickets.