Page 1 of 1
Disk image with Bochs 2.4.1
Posted: Mon Aug 24, 2009 3:56 pm
by Firestryke31
I have a USB stick that I've managed to install an interesting bootloader to, but I don't want to go through the fun process of rebooting my computer every time I make a change. I would like to get Bochs to use an image of this stick (as if it were a hard drive, not a USB device) but am stuck at figuring the CHS values to put into Bochs. It's supposed to be a 512MB stick, and the image I got was 476MB. Knowing the values I should use would be nice, but knowing the way to get these values would be better.
Would someone suggest a way for me to figure out how to get the CHS of this memory stick so I can use it in Bochs?
Re: Disk image with Bochs 2.4.1
Posted: Mon Aug 24, 2009 5:19 pm
by tantrikwizard
I dont think it can be done in bochs without considerable effort. You might be able to do it with VMWare or VirtualPC. Those have settings that allow a VM to use a physical drive but have never tested it with a USB drive.
Re: Disk image with Bochs 2.4.1
Posted: Mon Aug 24, 2009 8:18 pm
by Firestryke31
No, I don't want to use real hardware, I have a disk image I made from a USB drive that I want Bochs to think is a normal hard drive image. I have the image, but can't figure the CHS values to make it usable.
Re: Disk image with Bochs 2.4.1
Posted: Mon Aug 24, 2009 9:03 pm
by tantrikwizard
I see. Well what you can do is examine the disk parameter table on the boot sector. It's probably some FAT format which are well documented.
Re: Disk image with Bochs 2.4.1
Posted: Tue Aug 25, 2009 9:50 am
by Firestryke31
Well, I figured out enough to have it almost work, but now it's triple-faulting in the bootloader. It might have something to do with Bochs though since the bootloader was written for real hardware and so might not be finding something it expects. Then again, I could have easily miscalculated the CHS too.
I'm trying to use the Chameleon 2.0 RC2 bootloader to see the boot environment it sets. I think it would be interesting to write my own kernel that uses it. The biggest problem is that the installer only works in Leopard. I'm going to try using a disk image generated by bximage, reboot into Leopard, and install Chameleon on the mounted disk image.
Re: Disk image with Bochs 2.4.1
Posted: Tue Aug 25, 2009 10:25 am
by tantrikwizard
Firestryke31 wrote:...It might have something to do with Bochs though since the bootloader was written for real hardware...
There's nothing wrong with Bochs and should work if you get the proper values from the boot sector. Or you can download VirtualPC and mount the drive directly.