VOGONS


First post, by Louthrax

User metadata
Rank Newbie
Rank
Newbie

Hello everyone,

I'm wondering if anyone here has ever been able to enable DMA access for LBA partitions on Windows 98 ?

I have DMA working fine for "normal" FAT32 partitions (creating them using Linux's sfdisk with the 'b' type), but if I enable LBA flag (that's the 'c' type in sfdisk), there seems to be no way to enable it again (the "Primary IDE controller" entry in Device Manager stays marked with a yellow exclamation mark). I tried lots of things (removing / reinstalling the VIA Bus Master PCI IDE Controller, checking various registry entries, removing everything in AUTOEXEC.BAT and CONFIG.SYS): no way to enable DMA again.

I'd like to use LBA mode for my C: drive because that's the only way to create and restore partitions from Linux. Using the normal 'b' type creates incompatibilies (partition is recognized from Linux but not from Windows 98). I tried several combinations in the BIOS (Norma, Large, LBA, user and custom CHS settings), nothing worked. So I think I'm stuck with using LBA, but the performance decrease without DMA is really huge.

Let me know if you have any idea...

EDIT: There's one thing I haven't tried yet : reinstalling Windows 98 from scratch on the newly created LBA partition.

EDIT2: Could another way to fix my Linux / Compatibility issues (without using LBA type partition) be to use another BIOS ? If I run my Windows 98 PC under VirtualBox, I can definitively restore my system to a non-LBA partition, and it is recognized by Windows 98 correctly (but sadly I've found no access to VirtualBox's BIOS settings). My current BIOS is "Award Modular BIOS 4.51PG" (there seem to be more recent versions but I don't know if they'll fix something regarding my issue).

Reply 1 of 6, by ElectroSoldier

User metadata
Rank Oldbie
Rank
Oldbie

I have a 250Gb hard disk partitioned into 2 equal parts and I have DMA enabled.

Reply 2 of 6, by darry

User metadata
Rank l33t++
Rank
l33t++

It works for me too.

I typically create my partitions with Linux fdisk. I use a Lubuntu 16.04 bootable CD for this purpose. Oldest that hardware I typically use LBA on is usually able to boot from CD, this might not be your case. I mention this because there can be caveats with doing the partitioning on a modern system, AFAICR, but those typically only come into play when the retro hardware has very old/buggy LBA support OR in the case of LBA48.

Are you creating the partitions with the same size in both your CHS and LBA tests or are you using a bigger size in one test ? Incidentally, what is/are those size(s) ?

Also, Fdisk has a now deprecated (or possibly even now removed) legacy option. Not sure what that changes off the top of my head, but if may be a worth looking into. I do not recall if I have needed to use it.

I also seem to recall an old bug that may or may not be XTIDE specific (can't recall). Try using the secondary IDE controller to see if it helps.

Some working scenarios I have experienced :
Adding XT-IDE option ROM to Asus P3B-F BIOS [Thanks to DenizOezmen, it actually works!!!]

Here's an idea: using high endurance (micro)SD cards meant for continuous video recording as storage for retro gear .

Hope this helps.

Reply 3 of 6, by Louthrax

User metadata
Rank Newbie
Rank
Newbie

Thanks ElectroSoldier and darry for the answers.

@darry, I'm creating my partitions using a custom Puppy Linux CD with my backup scripts installed (boots and works well even with 256 MB RAM). I'm not using any disk geometry related options for sfdisk except for the size and start of the partition, something like type=b, start=63, size=2GB.

I think I've narrowed the cause of the problem to the fact that sfdisk write a somehow non-compatible MBR when invoked with "type=b" on my old BIOS Windows 98 machine. It works if I do the same thing on VirtualBox (with the same Puppy Linux CD and same HD size).

For now, I fixed the problem by replacing my sfdisk command by a raw MBR write:

MBR_1Partition_2GB='33C08ED0BC007CFB5007501FFCBE1B7CBF1B065057B9E501F3A4CBBEBE07B104382C7C09751583C610E2F5CD188B148BEE83C610497416382C74F6BE10074EAC3C0074FABB0700B40ECD10EBF2894625968A4604B4063C0E7411B40B3C0C74053AC4752B40C64625067524BBAA5550B441CD1358721681FB55AA7510F6C101740B8AE0885624C706A106EB1E886604BF0A00B801028BDC33C983FF057F038B4E25034E02CD137229BE4607813EFE7D55AA745A83EF057FDA85F67583BE2707EB8A9891529903460813560AE812005AEBD54F74E433C0CD13EBB80000000000005633F656565250065351BE1000568BF45052B800428A5624CD135A588D6410720A4075014280C702E2F7F85EC3EB74496E76616C696420706172746974696F6E207461626C65004572726F72206C6F6164696E67206F7065726174696E672073797374656D004D697373696E67206F7065726174696E672073797374656D000000000000000000000000000000000000000000000000000000000000000000000000008BFC1E578BF5CB00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800101000BFE3FFE3F00000000823E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA'

# Main partition can't be created using standard sfdisk command because
# of BIOS / Linux incompatibilites regarding CHS format...
echo $MBR_1Partition_2GB | xxd -r -p | dd of=/dev/sda

It's a bit less versatile than sfdisk, but after this intialization, everything works well (including the file system creation with mkfs.vfat), and I have DMA enabled (as the partition is not LBA).

I've found no trace of deprecated option in my sfdisk man page. I'll try to do a binary diff of my MBR between the working version (MBR_1Partition_2GB in my script, created by MS-DOS FDISK), and the non-working one.

As you suggested, a BIOS modification should probably fix the issue (the VirtualBox BIOS works well), I'll see if I'm brave enough to try this 😀

Talking about BIOSes, I've seen some projects like CoreBoot or LibreBoot that should probably offer more compatibility with modern hardware and other OSes. Would they work on old harware too (had anybody tried them) ?

Reply 4 of 6, by maxtherabbit

User metadata
Rank l33t
Rank
l33t

You can actually change the partition type from 0B to 0C and vice versa just by directly editing the type field directly in the MBR sector with DEBUG or whatever, nothing else is different

Reply 5 of 6, by Louthrax

User metadata
Rank Newbie
Rank
Newbie
maxtherabbit wrote on 2023-12-30, 15:28:

You can actually change the partition type from 0B to 0C and vice versa just by directly editing the type field directly in the MBR sector with DEBUG or whatever, nothing else is different

Yes, I already tried something like that : create the partition in LBA mode with sfdisk, restore all Windows files on it, then remove the "LBA" flag (still using sfdisk, or maybe gparted), and it did not work. IIRC (I tried lots of different things), Windows was not booting.

I'm not 100% sure that "LBA" flag is just a byte in the MBR, or if it somehow influences the geometry at partition creation time or something else on Linux / Windows side ?

Reply 6 of 6, by maxtherabbit

User metadata
Rank l33t
Rank
l33t

It's just a byte field in the MBR