Difference between revisions of "Bochs on Linux"
Jump to navigation
Jump to search
(how to create a disk image) |
m (post-import cleanup) |
||
| Line 1: | Line 1: | ||
| − | {{ | + | {{seedling}} |
| − | [[ | + | {| |
| − | This article is about setting up and using the [[Bochs]] | + | |- |
| − | [[emulators|emulator]] on [[Linux]]. | + | | [[Computing]]: || [[Linux]]:<br>[[Emulators]]: [[Bochs]]: || [[Bochs on Linux]] |
| + | |} | ||
| + | |||
| + | This article is about setting up and using the [[Bochs]] [[emulators|emulator]] on [[Linux]]. | ||
==Articles== | ==Articles== | ||
===Commands=== | ===Commands=== | ||
| − | *[[bximage]]: one way of creating a disk image for Bochs to boot | + | *[[bximage]]: one way of creating a disk image for Bochs to boot (included in Bochs distribution) |
| − | (included in Bochs distribution) | + | *[[dd]]: standard Linux command which can be used for creating a disk image |
| − | *[[dd]]: standard Linux command which can be used for creating a disk | ||
| − | image | ||
==Creating a Disk Image== | ==Creating a Disk Image== | ||
| − | If you are using Bochs to run a disk-based operating system, you will | + | If you are using Bochs to run a disk-based operating system, you will need to create a simulated disk drive, or "disk image", for Bochs to use. You can use either dd or bximage to do this. |
| − | need to create a simulated disk drive, or "disk image", for Bochs to | ||
| − | use. You can use either dd or bximage to do this. | ||
*[[dd]] can be used to create a disk image by running this command: | *[[dd]] can be used to create a disk image by running this command: | ||
**'''dd if=/dev/zero of='''''filename'' '''bs=512 count='''''sectors'' | **'''dd if=/dev/zero of='''''filename'' '''bs=512 count='''''sectors'' | ||
**:''sectors'' = Cylinders * Heads * SectorsPerTrack | **:''sectors'' = Cylinders * Heads * SectorsPerTrack | ||
**:''filename'' = name of output file, usually (something).img | **:''filename'' = name of output file, usually (something).img | ||
| − | **:You will need to remember the three figures (cylinders, heads, | + | **:You will need to remember the three figures (cylinders, heads, sectors/track) used to calculate the ''sectors'' value; they go in the Bochs configuration file. (Tip: name your file using the actual numbers use for the three figures, e.g. for a 1 GB drive with 2080 cylinders, 16 heads, and 63 sectors per track, name your file myfile-2080cyl-16hds-63sec.img, as a memory aid.) |
| − | sectors/track) used to calculate the ''sectors'' value; they go in the | + | *[[bximage]] has a user-friendly interactive mode, which you invoke by running it with no command-line parameters. |
| − | Bochs configuration file. (Tip: name your file using the actual numbers | ||
| − | use for the three figures, e.g. for a 1 GB drive with 2080 cylinders, | ||
| − | 16 heads, and 63 sectors per track, name your file | ||
| − | myfile-2080cyl-16hds-63sec.img, as a memory aid.) | ||
| − | *[[bximage]] has a user-friendly interactive mode, which you invoke by | ||
| − | running it with no command-line parameters. | ||
==Setup Notes== | ==Setup Notes== | ||
| − | I had Bochs working using an .img file as the Windows c:\ drive, and | + | I had Bochs working using an .img file as the Windows c:\ drive, and then it mysteriously stopped working (probably due to an [[Ubuntu]] upgrade) so I'm taking notes as I rebuild the .img file to (hopefully) fix the problem. The same image worked quite well under [[Qemu]], though. |
| − | then it mysteriously stopped working (probably due to an Ubuntu | + | |
| − | upgrade) so I'm taking notes as I rebuild the .img file to (hopefully) | + | Some notes I took last time (will explain them when I figure out what they mean): |
| − | fix the problem. | + | [[Linux:mknod|mknod]] /dev/loop0 |
| − | Some notes I took last time (will explain them when I figure out what | + | [[Linux:modprobe|modprobe]] loop |
| − | they mean): [[Linux:mknod|mknod]] /dev/loop0 | + | /sbin/[[Linux:losetup|losetup]] /dev/loop0 /home/woozle/win98/c.img |
| − | [[Linux:modprobe|modprobe]] loop /sbin/[[Linux:losetup|losetup]] | + | "Edit /etc/[[Linux:fstab|fstab]] -- set up /dev/loop0 just like D drive" |
| − | /dev/loop0 /home/woozle/win98/c.img | + | [[Linux:mount|mount]] /dev/loop0 |
| − | "Edit /etc/[[Linux:fstab|fstab]] -- set up /dev/loop0 just like D | + | [[Linux:mknod|mknod]] /dev/tap0 c 36 16 |
| − | drive" [[Linux:mount|mount]] /dev/loop0 [[Linux:mknod|mknod]] /dev/tap0 | ||
| − | c 36 16 | ||
"Next time: try tuntap" | "Next time: try tuntap" | ||
Revision as of 17:23, 14 October 2005
| Computing: | Linux: Emulators: Bochs: |
Bochs on Linux |
This article is about setting up and using the Bochs emulator on Linux.
Articles
Commands
- bximage: one way of creating a disk image for Bochs to boot (included in Bochs distribution)
- dd: standard Linux command which can be used for creating a disk image
Creating a Disk Image
If you are using Bochs to run a disk-based operating system, you will need to create a simulated disk drive, or "disk image", for Bochs to use. You can use either dd or bximage to do this.
- dd can be used to create a disk image by running this command:
- dd if=/dev/zero of=filename bs=512 count=sectors
- sectors = Cylinders * Heads * SectorsPerTrack
- filename = name of output file, usually (something).img
- You will need to remember the three figures (cylinders, heads, sectors/track) used to calculate the sectors value; they go in the Bochs configuration file. (Tip: name your file using the actual numbers use for the three figures, e.g. for a 1 GB drive with 2080 cylinders, 16 heads, and 63 sectors per track, name your file myfile-2080cyl-16hds-63sec.img, as a memory aid.)
- dd if=/dev/zero of=filename bs=512 count=sectors
- bximage has a user-friendly interactive mode, which you invoke by running it with no command-line parameters.
Setup Notes
I had Bochs working using an .img file as the Windows c:\ drive, and then it mysteriously stopped working (probably due to an Ubuntu upgrade) so I'm taking notes as I rebuild the .img file to (hopefully) fix the problem. The same image worked quite well under Qemu, though.
Some notes I took last time (will explain them when I figure out what they mean):
mknod /dev/loop0 modprobe loop /sbin/losetup /dev/loop0 /home/woozle/win98/c.img
"Edit /etc/fstab -- set up /dev/loop0 just like D drive"
mount /dev/loop0 mknod /dev/tap0 c 36 16
"Next time: try tuntap"