Hi plex86 hackers,

During the christmas holidays I have done some plex86 hacking because I
liked the idea of booting the normal Win98 partition from my dual boot
Linux machine with 6 gigabyte harddisk.

The strategy was to ignore plex86 diskwrites, so the win98 image would
not be damaged.

I did the following:

step 1) Add CHS=778/240/63 for the drivec geometry in de plex86 conf
file
step 2) chmod /dev/hda to 664
step 3) change the openflag in bochs/iodev/harddrv.cc from O_RDWR to
O_RDONLY
step 4) make the write operation in harddrv.cc a no-op and add some
        diagnostic printfs
step 5) recompiled rombios.c and added diagnostics printfs
step 6) enabled the rombios diagnostic port (0x0FFF) in
iodev/unmapped.cc
        so I could see the BIOS printfs :-)
        (I discovered that the "hlt" instruction works as a nop in 
         plex86, so that a panic("message") in rombios.c is simply
        ignored. Why does plex86 not terminate on a "hlt" ?)

step 7) hacked LBA read support in rombios.c
step 8) Booted the harddrive image /dev/hda

After debugging the fresh LBA support win98 started booting.
The problem however is that the win98 partition is larger than 2Gb
(but smaller dan 4gb).
Although the current LBA supports at least 8Gb, an lseek on /dev/hda
(located on a Linux ext2 filesystem) is only allowed for offsets
smaller than 2gb.

Although the actual win98 data is below the 2gb limit, the
win98 boot sequence tries to read the last cylinder of the fat32
partition which is above the 2gb limit.

step 9) I made seeks above the 2gb also a no-op.

The result was that win98 booted!
I get the Windows98 boot screen and after a while windows shows
the F8 text screen and offers me to boot in safe of command prompt
mode because the registry does not match the actual hardware :-)

At this point I stopped...

I tried Linux llseek but this does not lift the 2gb restriction
on /dev/hda. Does someone know a solution for this? Can i use an
entry in /proc instead of /dev/hda ? I'm using 2.4.0-test12.

I'll mail the changed rombios.c and harddrv.c after I have added the LBA
support to the write side (I only tested read) and did some more
testing.

The next days
I will try to boot a win98 floppy and format a 1gig driveimage.
Copy the win98 setup files to this partition and run setup...

PS: I'm not subscribed to the plex86 mailinglist (the volume is
too high) so mail me directly for questions.

-- 
Tom Vijlbrief       [EMAIL PROTECTED]
Plantage 29         Tel: +31 555285362
3742 DM  Baarn
Netherlands

Reply via email to