Bochs cdrom
Bochs cdrom
Hi, how do i boot in bochs from a cd-rom?
Thanks
Thanks
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Bochs cdrom
Well, if you're using a physical CD, put in into your CD drive and edit your bochsrc config file to have something like this in it:
Where "x" is the name of the drive that has the CD in it. Change your boot: something line to boot: cdrom and save it. It should boot now. I haven't used Bochs since 2.3.0 (mid-2006!)
Code: Select all
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=cdrom, path="x", status=inserted
Re: Bochs cdrom
Hi, and if i want to boot from image?
Thanks!
Thanks!
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Bochs cdrom
Replace the "x" with "imagename.iso" where imagename.iso is the filename of the image
Re: Bochs cdrom
Hi, didnt work. I think i need a program to generate a cd-rom image. Now i´m only chance the extension of the archive to .img.
what do you think?
thanks
what do you think?
thanks
- Masterkiller
- Member
- Posts: 153
- Joined: Sat May 05, 2007 6:20 pm
Re: Bochs cdrom
Booting from CD is more complicated than booting a diskette. You should have a boot volume descriptor at sector 17 (or just somewhere between main volume descriptor in sector 16 and terminate descriptor). Boot volume descriptor points to special sector that describes LBA block from where to load, number of sectors to load and load address. Last two things are not always supported and load address is still 0x07C0:0x0000 (0x7C00) and only one sector is loaded (even only first 512 of the sector).
For more information click here: http://en.wikipedia.org/wiki/El_Torito_ ... _standard) and look somewhere in the external links.
.ISO file can be created manually (even using assembler). First 2048 bytes from the file are the first sector, secont 2048 are the second and so on.
For more information click here: http://en.wikipedia.org/wiki/El_Torito_ ... _standard) and look somewhere in the external links.
.ISO file can be created manually (even using assembler). First 2048 bytes from the file are the first sector, secont 2048 are the second and so on.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
Current state: real-mode kernel-FS reader...
Re: Bochs cdrom
The standard provides boot block with size of 65535 512-byted sectors (usually just 4 sectors).
If you have seen bad English in my words, tell me what's wrong, please.
Re: Bochs cdrom
Hi, if diskete is more easie i´ll try it. What i have to write in the config file to boot from a diskete image?
Thanks
Thanks
- samueldotj
- Member
- Posts: 32
- Joined: Mon Nov 13, 2006 12:24 am
Re: Bochs cdrom
Creating a grub bootable ISO is easy - see http://wiki.osdev.org/Mkisofs
Re: Bochs cdrom
I use a .iso image myself in my "reseach" OS. All virtual machines support booting it. I do that because I won't develop a file system driver soon (ISO9660 format is complicated I hear); instead I ask GRUB to load the modules I need. In that sense .iso images are really easy.
You need to get GRUB Legacy compiled for El Torito boot. It is a file called stage2_eltorito. If you're using Linux and have GRUB installed, just find it in /usr/lib/grub/i386-pc/stage2_eltorito. If you're using Windows, google the file. Create a directory for your .iso image content. I'll call it "iso". Then create the directory structure needed for GRUB:
In menu.lst you write something like this:
You don't have to use the "root" command. When GRUB boots in El Torito mode, the root is already set to "(cd)". Now create the .iso image using mkisofs / genisoimage, like this:
That's it (beside adding the tasks to your Makefile). Boot it and enjoy.
You need to get GRUB Legacy compiled for El Torito boot. It is a file called stage2_eltorito. If you're using Linux and have GRUB installed, just find it in /usr/lib/grub/i386-pc/stage2_eltorito. If you're using Windows, google the file. Create a directory for your .iso image content. I'll call it "iso". Then create the directory structure needed for GRUB:
Code: Select all
iso/
boot/
you-can-put-your-kernel-here
grub/
stage2_eltorito
menu.lst
Code: Select all
default 0
timeout 10
title My kernel
kernel /boot/you-can-put-your-kernel-here
module /foo/bar/module ...
Code: Select all
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o my_kernel.iso iso