Opened 15 years ago

Closed 14 years ago

#3959 closed bug (invalid)

Wrong HDD size shown

Reported by: haiqu Owned by: korli
Priority: normal Milestone: R1
Component: Applications/Installer Version: R1/pre-alpha1
Keywords: Cc: marcusoverhagen
Blocked By: Blocking:
Platform: All

Description

My 75GB HDD was set up as follows:

Partitions 1 & 2 ghosted from 40GB drive in another machine. Partitions 3 & 4 added from WinXP SP2. Partition 3 set as BFS from Haiku. Partition 4 was not available to set up as BFS from Haiku, so it was formatted as FAT32 from WinXP.

The situation I have is that the installer is detecting the 4th partition as 2.1GB when it should be 18GB or so.

Snapshot attached.

Attachments (2)

installer.png (98.5 KB ) - added by haiqu 15 years ago.
Snap of drive's actual size, disk probe and installer.
woof.png (77.0 KB ) - added by haiqu 15 years ago.
Boot sector of partition 4, FAT32 formatted from WinXP

Download all attachments as: .zip

Change History (15)

by haiqu, 15 years ago

Attachment: installer.png added

Snap of drive's actual size, disk probe and installer.

comment:1 by marcusoverhagen, 15 years ago

Cc: marcusoverhagen added

Please provide a dump of the partition table. Either with dd, or screenshot from DiskProbe.

comment:2 by marcusoverhagen, 15 years ago

Sorry, I just noticed that there is already Diskprobe visible in the background of your picture. The 4th partion has a size (at offset 01fa) of 0x024300ba*512byte = 18.5 GB.

Please dump sector 0 of partition 4, or 0x070de407 of the harddisk. It should contain that fat bootsector. How large did you format the fat partion?

comment:3 by marcusoverhagen, 15 years ago

what does "Partition 4 was not available to set up as BFS from Haiku, so it was formatted as FAT32 from WinXP." mean? why wasn't it available? what do you want to say?

by haiqu, 15 years ago

Attachment: woof.png added

Boot sector of partition 4, FAT32 formatted from WinXP

comment:4 by haiqu, 15 years ago

The panel "Woof Info" in the snapshot shows what the system thinks is there when doing a "right-click, Get Info" on the drive. It's seen as 18.1Gb which is correct. I'm now attaching a snapshot of the boot sector of that partition, but I don't think it will provide any further information.

what does "Partition 4 was not available to set up as BFS from Haiku, so it was formatted as FAT32 from WinXP." mean? why wasn't it available? what do you want to say?

OK, that needs clarifying. If I go into DriveSetup and try to initialize that partition, the option is greyed out. I had no such problem with Partition 3 but, if you look at the first snapshot you can see that it's still narked in the partition table as type 06 (fat16, dos 3.31) which isn't right and indicates that DriveSetup only changed the bbot sector of partition 3 and not the partition table. However, since I have no problems at all with partition 3 it wasn't mentioned in the report.

in reply to:  4 comment:5 by idefix, 15 years ago

Replying to haiqu:

OK, that needs clarifying. If I go into DriveSetup and try to initialize that partition, the option is greyed out. I had no such problem with Partition 3 but, if you look at the first snapshot you can see that it's still narked in the partition table as type 06 (fat16, dos 3.31) [...]

I think this is the cause of the problem:
Apparently Installer only looks at the partition table and sees a fat16 partition, which has a maximum size of 2 GB.
Tracker, on the other hand looks at the information inside this partition and sees a fat32 formatted one, which can be larger than 2 GB. So it reports the correct partition size.

I suspect that changing the type of this partition in the partition table to fat32 would solve your problems.

comment:6 by haiqu, 15 years ago

I'm reporting a fault with the 4th partition, so having the 3rd partition set as type 06 shouldn't affect anything. I'm also aware that there are manual ways of fixing the situation, but Haiku needs to be able to set this up itself.

The 4th partition is type 0c (FAT32) already, so this can't be the issue.

Faults as I see them:

  1. DriveSetup didn't change the partition type for the 3rd partition's table entry when I initialized it as BFS. This doesn't affect it, the partition works fine.
  2. Installer isn't seeing the 4th partition as the right size.
  3. DriveSetup won't allow initialization of the 4th partition.

Note that in all preceding comments I was using (as they say in BASIC) OPTION BASE 1 when referring to partition numbering. They are numbered from 0 to 3 within the system.

in reply to:  6 comment:7 by idefix, 15 years ago

Replying to haiqu:

I'm reporting a fault with the 4th partition, so having the 3rd partition set as type 06 shouldn't affect anything.

Sorry, I misread that one.

I'm also aware that there are manual ways of fixing the situation, but Haiku needs to be able to set this up itself.

But if you manually change this partition type from 06 to EB? Will Installer then see the 4th partition as the right size and will DriveSetup allow initialisation?

comment:8 by haiqu, 15 years ago

Once again, the partition type 06 is on the 3rd partition's main partition table entry, so changing that doesn't affect the problem. I did try doing that early on, btw.

The 4th partition's entry correctly shows type 0c (FAT32). Haiku does see it as 18.1GB (see first snapshot) so the problem here is localized to the Installer application only.

comment:9 by mmlr, 15 years ago

But the question is how big that FAT32 filesystem actually is. The partition table is pretty much meaningless for Haiku except to discover the start of partitions. What DriveSetup and Installer show may very well differ, as they are not intended to show you the same data. DriveSetup will show you the partition information as it's recorded in the MBR. Installer on the other hand will show you filesystem information of the filesystems contained in the partitions. It's valid for you to have a 10GB partition and only put a filesystem on the first hundred megabytes. That would happen when you'd dd a Haiku image on top of a partition for example. In that case DriveSetup would show the 10GB partition and Installer the BFS size of the image.

From what I gather, is it possible that the partition as stored in the MBR is simply bigger than the actual drive? And Windows created a 2.1GB FAT32 fs in it as that's the space really left? This could also explain why DriveSetup doesn't allow you to initialize the partition, as it regards it as invalid?

The partition type field in the MBR is completely disregarded BTW. And DriveSetup doesn't currently modify the MBR at all. As it (or more correctly the disk device manager backend it uses) doesn't yet do partitioning at all, it never touches the MBR. So it's expected that initializing a partition doesn't change the partition type code. The field is not relevant to Haiku as it probes the partitions for the different filesystems.

comment:10 by haiqu, 15 years ago

The drive is 74.6GB and the partitions are: 19.2GB, 19.2GB, 18.1GB and 18.1GB - DriveSetup does show these values.

The first two partitions were dd'ed (with HDClone) to the raw drive and the remainder was then partitioned in two equal parts. No unused space anywhere.

comment:11 by haiqu, 15 years ago

Spent some time yesterday checking some values for the partition size in the 4th partition's FAT32 Volume Boot Record. This theoretically lives at offset 0x13 for any drive with less than 64k sectors and at 0x20 for larger drives, although in practice is always written to 0x20 for FAT32 partitons.

The values match those in the MBR which leads me to the conclusion that the Installer is probably accessing a different struct for the FAT32 records than the one used elsewhere.

comment:12 by korli, 15 years ago

Is it still valid ?

comment:13 by korli, 14 years ago

Resolution: invalid
Status: newclosed

No feedback...closing as invalid.

Note: See TracTickets for help on using tickets.