VOGONS


Reply 20 of 25, by Falcosoft

User metadata
Rank l33t
Rank
l33t
stanwebber wrote on 2025-07-13, 13:06:
i read this whole thread & i'm still confused. did the OP ever get a cf card aligned to 2048 sectors to boot in his 386 machine? […]
Show full quote

i read this whole thread & i'm still confused. did the OP ever get a cf card aligned to 2048 sectors to boot in his 386 machine?

i'm running into this same issue right now with an early p54c pentium bios. is the limitation bios or dos related?

this CAN work with dos 7.1 & fat32 on an award kt133a bios. i partition either a sata ssd or cf card with gparted aligned to 2048 sectors and the os just boots. the only problem i ran into was dos not recognizing a logical drive in an extended partition unless it was cylinder aligned with dos tools.

now i have a fat16 1gb cf card that will not boot in my p54c pentium machine unless i partition it with dos fdisk. when previously partitioned with gparted aligned to 2048 sectors, dos had no problems recognizing the drive from a boot floppy--just no boot.

what is the magic for alignment? if rmprepusb is the answer, what is it doing differently that gparted isn't?

The moral of this whole thread is that there is no point to partition align FAT/FAT32 volumes to 2048 sectors. This approach works in case of NTFS since the metada is part of the file system but it does not work in case of FAT/FAT32 since the metadata/header is before the file system so proper alignment works differently
(from here: Re: MS-DOS with aligned partitions on CF card, is it possible?)

Website, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper
x86 microarchitecture benchmark (MandelX)

Reply 21 of 25, by stanwebber

User metadata
Rank Member
Rank
Member
Falcosoft wrote on 2025-07-13, 13:24:

The moral of this whole thread is that there is no point to partition align FAT/FAT32 volumes to 2048 sectors. This approach works in case of NTFS since the metada is part of the file system but it does not work in case of FAT/FAT32 since the metadata/header is before the file system so proper alignment works differently
(from here: Re: MS-DOS with aligned partitions on CF card, is it possible?)

truth be told, i'm not sure i understand why it's important for ANY flash media to be sector aligned. this whole alignment business started with mechanical hdds switching to physical 4k sectors and using a translation layer to present 512b sectors to the system bios. does all flash media do the same thing?

Reply 22 of 25, by GigAHerZ

User metadata
Rank Oldbie
Rank
Oldbie
stanwebber wrote on 2025-07-13, 13:06:

i read this whole thread & i'm still confused. did the OP ever get a cf card aligned to 2048 sectors to boot in his 386 machine?

Some time later i eventually found YSDDT. As far as i can confirm, it does what needs to be done - it realigns the FAT16 partition and DOS is able to boot from it after the alignment.
You need to use quite a lot of flags on the program to run it. Have a second screen with manual ready. With flash memory, do not forget 'fatusedonly' along with other flags!
Also, you sometimes need to override some parts of partition info using 'fatnew*' or 'fatuse*' flags.

It seems to be working, but i don't have long-term extensive experience with it, yet.

"640K ought to be enough for anybody." - And i intend to get every last bit out of it even after loading every damn driver!
A little about software engineering: https://byteaether.github.io/

Reply 23 of 25, by doshea

User metadata
Rank Member
Rank
Member
stanwebber wrote on 2025-07-13, 13:52:

truth be told, i'm not sure i understand why it's important for ANY flash media to be sector aligned. this whole alignment business started with mechanical hdds switching to physical 4k sectors and using a translation layer to present 512b sectors to the system bios. does all flash media do the same thing?

I never really thought about it before, but from https://en.wikipedia.org/wiki/Flash_memory:

One limitation of flash memory is that it can be erased only a block at a time.

I think block sizes are generally much bigger than 512 bytes, so I think writes can be expensive if they require an erase first. I imagine that would get even worse if your write isn't aligned, e.g. writing one FAT cluster requires you to read half the cluster from one block, half from another, erase both blocks, then rewrite them both.

Maybe this is why I find compact flash as a hard drive replacement doesn't perform as great as I'd expect? 😁

Reply 24 of 25, by Falcosoft

User metadata
Rank l33t
Rank
l33t
stanwebber wrote on 2025-07-13, 13:06:

...
what is the magic for alignment? if rmprepusb is the answer, what is it doing differently that gparted isn't?

I missed this part of your question.
The answer is that contrary to GParted RMPrepUSB besides partition alignment also makes sure that FAT/FAT32 data clusters start at aligned sectors/LBA addresses. GParted does not do this automatically.
And as @doshea pointed out above this can be also relevant in case of flash drives not just advanced format HDDs.

Website, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper
x86 microarchitecture benchmark (MandelX)

Reply 25 of 25, by stanwebber

User metadata
Rank Member
Rank
Member

my bios was so finicky nothing i did could consistently get it to boot except the following:

- create new msdos partition table with gparted
- wipe reserved sectors with disk genius
- create hibernation partition with phdisk (likely optional)
- create fat16/32 partition with microsoft fdisk
- format with microsoft using /s flag (sys would proobably work as well)

i landed on this process after over a couple dozen other trial & error attempts. with this process i installed/reinstalled win95rtm, nt4 sp6, win2k & win98fe on 4 separate 1gb cf cards without a single hickup. ysddt looks like it can accomplish the same thing and more, but i don't know if i have the patience to look into it at this point.

needless to say nothing is aligned. i'm not so concerned about performance as the top mode of the ide controller is pio 4, but flash longevity is still of concern. the cf cards are labelled as industrial, but oddly they still have the removable flag set. not a concern for any of the operating systems i'm working with, but i thought all industrial cards were fixed hdd.