Bochs "disk images" / raw devices
Posted: Mon Jun 09, 2008 1:39 pm
The versions of my kernel that run on bochs and on real hardware are somewhat different -- mostly having to do with the difference between the bochs disk image, and the real hard disk sizes. Sometimes, like now, I have an issue where the bochs version runs fine, and the version running on hardware has some bug. Since I still do not have a debugger running on the real hardware, this becomes a very tedious debugging process -- because I can't use bochs to track the bug down.
I had a momentary brainstorm, and said "Oh! I can attach the hard drive to the other PC, and tell bochs to use that hard drive as the disk image, and run bochs to debug the REAL hard drive!" -- And then I realized that it wouldn't work ... at least with a Windoze system, AFAIK.
The disk is not formatted with a filesystem that Windoze recognizes ... so Windoze will not assign a drive letter. So, AFAIK, bochs has no way of accessing the drive. Even if Windoze did assign a drive letter, I'm betting that it would not let bochs have full access the whole logical drive (FAT tables and all)?
And then I started wondering, if I had done all this development under Linux, could I have done it then? So, this is my question to all of you: do any of you know if bochs can access a disk image, under linux, that is a raw blockmode (or character) device? Or alternately, am I full of sh*t, and there IS a way to get bochs to access an unrecognized "physical drive" on a Windoze system?
I had a momentary brainstorm, and said "Oh! I can attach the hard drive to the other PC, and tell bochs to use that hard drive as the disk image, and run bochs to debug the REAL hard drive!" -- And then I realized that it wouldn't work ... at least with a Windoze system, AFAIK.
The disk is not formatted with a filesystem that Windoze recognizes ... so Windoze will not assign a drive letter. So, AFAIK, bochs has no way of accessing the drive. Even if Windoze did assign a drive letter, I'm betting that it would not let bochs have full access the whole logical drive (FAT tables and all)?
And then I started wondering, if I had done all this development under Linux, could I have done it then? So, this is my question to all of you: do any of you know if bochs can access a disk image, under linux, that is a raw blockmode (or character) device? Or alternately, am I full of sh*t, and there IS a way to get bochs to access an unrecognized "physical drive" on a Windoze system?