Jump to content

Disable specific device detection on boot (Win95)? Solved


awkduck

Recommended Posts

The circumstances in this situation are far from typical. I get that I may already be dead in the water.

First, the situation. This is a finished Win95osr2 install via Virtualbox. But now booting on a real machine. Grub4dos is being used, and direct mapping is not an option. So this is in memory (this is the only option for this device, unless fitted with a coreboot bios).

 

So all detected devices are fine, until the final USB2 device. It hangs the system, before you can click cancel. Normally you could reboot into safe mode and, if present, disable it. But that won't work in this situation. I could also disable automatic device detection. But I need the other devices to be detected. So as soon as I detect them, the USB device will be detected with them.

Once I can get a good boot, I can exit to Dos and save my work over USB.

I have not been able to boot and run the image, direct mapping over usb, or I would be trying it that way first.

Does anyone know if you can block detection of a device, via its bus:address; or something?

Edited by awkduck
Better wording
Link to comment
Share on other sites


Are you using USB keyboard/mouse? Maybe it doesn't really hang, but just disables USB so it won't respond to your input anymore. If you have PS/2 ports there, try using them instead.

 

Test whether it still hangs if you rename the C:\Windows\INF folder. If it doesn't, try to find which .INF file in there is for the problem device and remove it so Windows won't find a suitable driver.

Alternatively, you could try to create a dummy driver for that specific vendor ID and device ID combination.

Link to comment
Share on other sites

4 hours ago, awkduck said:

....

Grub4dos is being used, and direct mapping is not an option. So this is in memory (this is the only option for this device, unless fitted with a coreboot bios).

...

I have not been able to boot and run the image, direct mapping over usb, or I would be trying it that way first.

 

1) post your menu.lst or however the commands you are using in grub4dos

2) try (it depends I believe on the "host" OS) to map the USB as physicaldrive:

http://reboot.pro/index.php?showtopic=8581

https://www.sysprobs.com/access-physical-disk-virtualbox-desktop-virtualization-software

jaclaz

Link to comment
Share on other sites

Sorry for the late reply. It was a long day. Took awhile to get back at it.

Thank you both, RainyShadow and Jaclaz.

Rainy, you have a good point. I had not thought of that. But I do not have Ps2 connectors. Maybe if I order a serial/com mouse it would install that before the USB. Its been years since I've even owned a com mouse. I don't know how well 95 picks that up, during boot.

Jaclaz, the booting over USB is done by using a fat32 partition with msdos io.sys and mbr. So the bootloader is dos. Grub4dos is loading an 80mb image into ram and booting that (win95 with ultrapack drivespace3).

I'll confess some things not originally mentioned. I left them out, as to not confuse the situation. The device does have IDE and I can boot dos from that. However, as soon as any advanced OS attempts to boot from the IDE (the exception KolibiOS), the connection to IDE is lost. This is intentionally set in the bios by the manufacturer. Essentially the bios is marked as disabled. But it is a little more complex than that, and the details are in-depth.

So I have syslinux chainload grub4dos or grub2. It is from the IDE that grub4dos loads the 80mb.img to ram. But if Win95 can in anyway see any partition, on the IDE, boot will fail. It does not matter what boot switches you use. And it does not matter if you are not even using the IDE. At some point Windows cannot access its own files and errors out, in some way or another. Or if booting from ram, and the partition is still visible, you end up with a protection error. The same is true trying safe mode, either way.  That is why some very ambitious people wrote a coreboot bios replacement for the device. So the Win95 image needs to be in ram, and it needs to be mapped over the any IDE partition(s)[or mark them hidden]. I do believe that, eventually, I may find a way to get IDE access working. But only after working from inside Windows. And it will be a terrible hack, I am sure.

Linux can boot from ram, but cannot see the IDE. You can edit the (Linux) ATA driver to use MSR configurations instead of PCI, and activate the MSRs related to IDE enabling. But using grub2 with the same MSRs modified (wrmsr) changes nothing for Win95. Windows uses the PCI configurations, so the MSR modifications hardly mean anything.

Booting anything from USB can be rough. Some people have gotten certain sizes and manufacturers' pendrives to boot. While other do not boot at all.

The USB booting issues arrive from the bootloaders hardly working at all, with this device. For me, dos boot over USB works every time; no matter what. In a few minutes I will try direct mapping the image from USB, booting from USB dos mbr, and directly running grub4dos (grub.exe) from the prompt. I may have tried that before, but actually can't remember for certain. The only problem is that USB is 1.1 speeds. For now that would work. I'm hoping this way just slipped my mind. Or that when I, possibly, tried it before, I hadn't learned that Windows would boot; if it can't access an IDE partition. I've been working on this for a long time. Masochist, I am.

Anyway, this is a little bit more of a full disclosure.

In the end, I intend to run from ram anyway. Drivespace is actually pretty cool, now. Back when 95 was new, I wouldn't have touched it with a ten foot pole. With faster memory and CPU, its kinda like Squashfs for Linux. If only there was something like Aufs for Win9x. Trying to set this mean device up, has taught me some neat things. For example, I learned how to modify Grub2 2.06 for Windows, to work from Dos. It needs to be chainloaded, but it is usable with just dos and Hxdos (no mbr install).

Link to comment
Share on other sites

4 hours ago, awkduck said:

But I do not have Ps2 connectors.

Perhaps a second USB add on card could help by still allowing the keyboard and mouse to operate while installing drivers for the other. Has to be a different chip to the main USB or other card otherwise BIOS may treat it as just more USB ports.

Edited by Goodmaneuver
Link to comment
Share on other sites

The grub4dos (recent version) have an "own" USB (2.0) driver stack.

If you do not post the EXACT grub4dos menu.lst or commands you use, there is no way I can understand what you are trying to do.

As well, if you post some EXACT reference to the hardware involved it may help (or it may be completely be not useful, no way to know).

If you want to run the Windows 9x entirely in RAM, probably you can disable/remove the IDE drivers/detection/whatever (i.e. have essentially a virtually diskless PC).

jacpaz

Link to comment
Share on other sites

8 hours ago, Goodmaneuver said:

Perhaps a second USB add on card could help by still allowing the keyboard and mouse to operate while installing drivers for the other. Has to be a different chip to the main USB or other card otherwise BIOS may treat it as just more USB ports.

That is a great suggestion. Thank you, for joining in. Unfortunately, the device is a Single Board Computer and lacks external PCI/ISA slots.

Link to comment
Share on other sites

7 hours ago, jaclaz said:

The grub4dos (recent version) have an "own" USB (2.0) driver stack.

If you do not post the EXACT grub4dos menu.lst or commands you use, there is no way I can understand what you are trying to do.

As well, if you post some EXACT reference to the hardware involved it may help (or it may be completely be not useful, no way to know).

If you want to run the Windows 9x entirely in RAM, probably you can disable/remove the IDE drivers/detection/whatever (i.e. have essentially a virtually diskless PC).

jacpaz

The only time Grub4dos has an issue, is when direct mapping is used on the USB or IDE. If bootlace.com is used to install to the MBR(USB), there is a A20 error of some kind, and grub4dos fails. I am guessing this is because the device uses PS2 emulation over USB for the keyboard. This could be the same reason that when I use grub.exe from the prompt(USB), grub does not load the image (direct mapping). But memory mapping does work, as you are not tethered to the USB any longer. As you have said, Grub4dos has its own USB drivers. This is probably conflicting with the USB PS2 emulation in the device.

menu.lst

map --heads=16 --sectors-per-track=63 /80mb.img (hd0) #image is fat16 formatted with this geometry

map --hook

root (hd0,0)

chainloader /io.sys

 

If "map --mem --heads=16 --sectors-per-track=63 /80mb.img (hd0)" is used, then booting works; both from USB and IDE.

But Win95 either disables the USB keyboard (PS2 emulation) or hangs, when detecting the USB. Either way, no configuration can be completed.

I am having no issue booting with memory mapping. But, I cannot configure Win95 without a reboot. Once you reboot everything is lost. So I must either get direct mapping working, or prevent detection of only the USB.

I do intend to eventually run from ram. But Win95 must first be configured and saved.

Thanks for helping. But it may be a lost cause. I even considered booting Linux into ram, and running Win95 though Dosemu; with device mapping to the actually hardware. But Dosemu would be emulating the PCI Bus, so nothing I configured would apply to actual use on the direct hardware. Detection would resume as normal, with all of the same problems.

Link to comment
Share on other sites

6 hours ago, awkduck said:

Unfortunately, the device is a Single Board Computer and lacks external PCI/ISA slots.

What SBC is that?

 

5 hours ago, awkduck said:

Grub4dos has its own USB drivers. This is probably conflicting with the USB PS2 emulation in the device.

You could try booting Plop first to use its USB driver, then load grub4dos. Try both v.5 and the new PBM6. 

Link to comment
Share on other sites

A serial mouse needs to be installed manually I think from memory but it could be manually done in safe mode. Another motherboard could be used to find out what changes happen. Find what the driver is and what the system.ini changes are and RegShot or similar used to find registry changes. The changes would then be duplicated in safe mode on the single board computer. The easy way though is to take the hard drive off the machine with the serial mouse installed and put it on the single board machine. The serial mouse remains as a device. A PS2 mouse can be made to run as a serial mouse with help from an Arduino micro-controller. Code and schematic https://github.com/Lameguy64/ps2serial

Edited by Goodmaneuver
typo
Link to comment
Share on other sites

On 1/7/2022 at 2:49 PM, awkduck said:

So all detected devices are fine, until the final USB2 device. It hangs the system, before you can click cancel.

It removes the mouse and keyboard after installing the USB 1.1 driver. That is why you cannot catch the USB 2.0 install and you may not have the USB2 driver just yet but it is irrelevant. The solution is fairly simple really and this is what I determined what can be done,

Go into safe mode and setup a task to restart after say every 15 minutes or you can use a shut down screensaver or shutdown software. Then reboot and after the USB 1.1 driver is installed then the machine will reboot normally after the 15 minutes has expired. Installing the USB2 driver should not remove the USB devices but if it does then the machine will reboot again after the 15 minutes and the registry will be configured.

Link to comment
Share on other sites

The grub4dos USB drivers do not run unless they are manually invoked, just for the record.

The reason they were developed/added originally was essentially because there are (were) motherboards that have USB 2.0 hardware but only have BIOS support for USB 1.1, on those, starting the internal USB driver makes booting (or copying to RAM/ map --mem) much faster.

Besides different (okder or newer) grub4dos versions may behave differently.

The blinking cursor is (typically) an issue with some fields in the bootsector (related to CHS geometry) that are "off".

It happens often that (for *some reasons*) the (more or less) crappy BIOSes assign to a device a "queer" geometry (different from the one the image or partition/volume was prepared/formatted with).

This may be influenced by the size of the device (this would also nicely explain why you have reports  of some devices working), and also - in some cases - by some assumptions by the bootloader/bootmanager.

It is a hit and miss game, I had similar (though not the same) issues with another Thin Client several years ago, and I remember how I threw at it everything (and the contrary of it) before being able to actually boot it from physicaldrive (IDE/ATA CF card and USB stick), again only for the record:

https://zeroshell.org/forums/topic/a-report-from-a-new-user/

It should be possible (though right now I have not a precise idea on how to exactly do it) to boot to the Win95 as image, configure it, then dd (using some dd port to dos or a win9x imaging program) it to a second image (essentially pulling data from the RAW drive) then boot this second image.

Still you should IMHO first try to boot from the actual volume partition (not map --mem), PLoP, makebootfat, *everything* should be attempted.

Can you make and post/attach a copy of your MBR and PBR?

jaclaz

 

 

 

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...