Hi i am a newbie. I am trying Bran's tutorial ,and currently I am stuck at one stage. I have a basic hello world kernel , kernel.bin . I am using a ready made GRUB image file into which I injected my kernel.bin. My config file for the bochs is as follows
# how much memory the emulated machine will have
# if you have less than 64MB of memory in your actuall computer, set this lower(16 is good)
megs: 32
# filename of ROM images
# note that if before a filename we put "../" then the file is looked
# for in the directory above that the current directory(the one the configuration
# file is in).
romimage: file=../BIOS-bochs-latest, address=0xf0000
vgaromimage: file=../VGABIOS-elpin-2.40
# we want a floppy drive(called a), the disk image that we are using is called "1.44"
floppya: 1_44=Grub, status=inserted
# choose the boot disk.
boot: a
# where do we send log/error messages?
log: bochsout.txt
# disable the mouse unless your OS uses it
mouse: enabled=0
When i start up bochs simulation it always gives an error of cannot read boot disk , and in the log file it says
tried to open 'Grub' read/write: No such file or directory
although I have put the Grub image in the same directory as the config file
What am I doing wrong???? PLSS help
problem with boch
Hi,
Firstly, are you using windows or linux? Because their tolerance of capitalisation errors is different (windows is forgiving).
1) are you sure the filename is 'Grub'? With no extension and capital G?
2) are you sure you are executing bochs from it's own directory? If you do something like "./mybochspath/bochs", the bochsrc.txt file will have "./" as it's current working directory and not "./mybochspath/" as you would expect (so a relative filename wouldnt work). This should only ever be a problem if you're in windows or you have recompiled a special version of bochs and the executable is not in your $PATH.
3) check you have read/write permissions! if you created the file as root, it is most likely you cannot open the file for writing. Windows does not support permissions well, so I would assume linux here.
do "ls -l | grep Grub" in the directory you have the grub image. (that's an 'L' not a '1'). this should give you a string with a load of permissions (-rwxrwxrwx), a user (could be root) and a group (could also be root). First, check if the user is root. If so, do "sudo chown <username> Grub" and your problem should be solved. else, just do "sudo chmod 777 Grub", which will set all permissions.
Hope this helped!
JamesM
Firstly, are you using windows or linux? Because their tolerance of capitalisation errors is different (windows is forgiving).
1) are you sure the filename is 'Grub'? With no extension and capital G?
2) are you sure you are executing bochs from it's own directory? If you do something like "./mybochspath/bochs", the bochsrc.txt file will have "./" as it's current working directory and not "./mybochspath/" as you would expect (so a relative filename wouldnt work). This should only ever be a problem if you're in windows or you have recompiled a special version of bochs and the executable is not in your $PATH.
3) check you have read/write permissions! if you created the file as root, it is most likely you cannot open the file for writing. Windows does not support permissions well, so I would assume linux here.
do "ls -l | grep Grub" in the directory you have the grub image. (that's an 'L' not a '1'). this should give you a string with a load of permissions (-rwxrwxrwx), a user (could be root) and a group (could also be root). First, check if the user is root. If so, do "sudo chown <username> Grub" and your problem should be solved. else, just do "sudo chmod 777 Grub", which will set all permissions.
Hope this helped!
JamesM
I find with VFD for windows I am fine with this - the only time Bochs shouts is if I have forgotten to close another instance of Bochs using the same imagepcmattman wrote:And make sure you haven't got the image open as a floppy drive (perhaps with VFD?) or virtual hard drive (perhaps with filedisk?). Bochs demands exclusive access to its disk images.
![Confused :?](./images/smilies/icon_confused.gif)
Code: Select all
floppya: 1_44="b:", status=inserted
Congratulations...I thinkpcmattman wrote:Edit: Ha! Post number 1000 under my belt!Too bad it wasn't that lengthy paging explanation I wrote earlier...
![Smile :)](./images/smilies/icon_smile.gif)