Hi Bernd,
> On Feb 27, 2023, at 12:57 PM, Bernd Boeckmann via Freedos-devel
> <[email protected]> wrote:
>
>
>> Am 27.02.2023 um 17:28 schrieb [email protected]:
>>
>> I think I will go with a max partition of 2GB (FAT16) on real hardware and
>> the entire disk (FAT32) inside Virtual Machines.
>
> If you want it to be FAT-16 I would suggest not doing /PRIO:2048 but instead
> /PRIO:2047 or even less, because for the common CHS geometry .../254/63, 2048
> MB gets rounded up to 2055 MB. And that is beyond the maximum size of
> „compatible“, 64 sectors per cluster, FAT-16 partitions.
Just going to use 2000.
After all, based on how hard drive manufacturers calculate sizes a 2GB hard
disk would only be about 1907mb.
>
> FDISK always rounds the user specified size up to the next cylinder boundary.
> It does not restrict the partition size but unconditionally sets the
> partition type to FAT-16 if you specify /PRIO. So depending on the behaviour
> of the format utility, it would either create a FAT-16 with a cluster size of
> 128 sectors or waste space at the end of the partition.
>
> Greetings, Bernd
After a little more testing, here is an interesting wrinkle found while
experimenting on a 500mb VM hard drive.
fdisk 1 /clear /prio:2000 ; no problem, creates a 500mb FAT16
fdisk 1 /clear /pri:100,100 ; no problem, creates a 500mb FAT32
However, when the disk already has a partition and is full…
fdisk 1 /prio:2000 ; no error, no partition created, exit
errorlevel 0
fdisk 1 /pri:100,100 ; divide error, no partition created,
exit errorlevel 3
Since the installer first tests for partitions and only auto-partitions an
empty drive, this is probably not a big problem. Unless for some reason, FDISK
cannot create the partition for some unknown reason.
Anyhow, I’ve implemented the partitioning changes in both installers.
Basically, their new logic is something like this:
if AnyPartitions(drive) = true then begin
FDISK drive
end else begin
If IsVirtualMachine = true then begin
FDISK drive /PRI:100,100
end else begin
FDISK drive /PRIO:2000
end
if ErrorOccured = true then begin
FDISK drive
end
end
REBOOT
Should be good. Guess we will find out on Wednesday.
:-)
Jerome
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel