Difference between revisions of "Bochs on Linux"
Jump to navigation
Jump to search
m (post-import cleanup) |
m (template updates) |
||
Line 8: | Line 8: | ||
==Articles== | ==Articles== | ||
===Commands=== | ===Commands=== | ||
− | *[[bximage]]: one way of creating a disk image for Bochs to boot (included in Bochs distribution) | + | * [[bximage]]: one way of creating a disk image for Bochs to boot (included in Bochs distribution) |
− | * | + | * {{l/linux/cmd/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 need to create a simulated disk drive, or "disk image", for Bochs to use. You can use either dd or bximage to do this. | 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. | ||
− | * | + | * {{l/linux/cmd/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 | ||
Line 22: | Line 22: | ||
Some notes I took last time (will explain them when I figure out what they mean): | Some notes I took last time (will explain them when I figure out what they mean): | ||
− | + | {{l/linux/cmd|mknod}} /dev/loop0 | |
− | + | {{l/linux/cmd|modprobe}} loop | |
− | /sbin/ | + | /sbin/{{l/linux/cmd|losetup}} /dev/loop0 /home/woozle/win98/c.img |
− | "Edit /etc/ | + | "Edit /etc/{{l/linux/cmd|fstab}} – set up /dev/loop0 just like D drive" |
− | + | {{l/linux/cmd|mount}} /dev/loop0 | |
− | + | {{l/linux/cmd|mknod}} /dev/tap0 c 36 16 | |
"Next time: try tuntap" | "Next time: try tuntap" |
Latest revision as of 20:56, 5 January 2018
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"