Skip to Content.
Sympa Menu

baslinux - [BL] make a BL 3 qemu image: how to

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: baslinux AT lists.ibiblio.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: [BL] make a BL 3 qemu image: how to
  • Date: Wed, 19 Mar 2008 21:36:53 -0500 (CDT)

I'm writing this mainly as a reminder to myself about how this process is accomplished. It's not that complex but things stay in memory for shorter and shorter periods as we age :). The process uses qemu and its associated programs as well as some native Linux/Unix ones. As will become clear, these directions presume one is using a Linux computer.

1) Create the disk image to which BL will be installed

-------------------------------
qemu-img create BLdisk.img 100M
-------------------------------

creates a 100 MB virtual hard disk.

2) Download and unpack the BL floppy disks. BL's Floppy 1 (DISK1.IMG) is a disk image and can be used as-is to boot along with BLdisk.img using qemu. To use BL's floppy 2, which is not an image file but just a compressed file (tgz), requires getting the tgz file into an image file. To do this, either a) copy the file (DISK2.TGZ) to a floppy disk and then make an image of that disk using Linux's dd utility (dd if=/dev/fd0 of=disk2.img), or b) create a floppy-sized disk image on the hard drive using either dd or qemu-img, mount it as a loop device, copy over BL's DISK2.TGZ to it, and umount it. In any case, the end result should be two image files on your hard drive named (something like) DISK1.IMG and DISK2.IMG. I will just mention here that a real floppy drive can be used for this instead of image files located on the hard drive. Since this how to will focus on the image-files-on-the-HD method it will not attempt to cover that somewhat simpler method.

3) Once you've completed step 2, you boot using qemu. The BLdisk.img file specified to qemu as the hard drive and the first floppy image is specified as the floppy drive. That involves issuing a command like the following

----------------------------------------------------------
qemu -b a -fda /path/to/DISK1.IMG -hda /path/to/BLdisk.img
----------------------------------------------------------

(-b a tells qemu to boot from the virtual floppy drive instead of the virtual hard drive)

4) once qemu has loaded all of DISK1.IMG, the newly (partially) booted BL is going to ask you to insert the second diskette. You do this using what's called the qemu "monitor." Getting to the monitor involves a process very similar to switching virtual terminals on a regular Linux system. When DISK1.IMG is fully loaded and prompts for the second diskette, hit ctrl-alt-2 (the number 2, not F2). That takes you to a qemu monitor screen where you'll see a qemu command prompt. At the qemu prompt enter

----------
eject fda
----------

to eject the virtual floppy. Then enter

-----------------------------
change fda /path/to/DISK2.IMG
-----------------------------

(it's probably best and easiest to have all relevant file images in the same directory and to issue qemu commands from that directory).

Then switch back from the qemu monitor to the main qemu screen by hitting ctrl-alt-1 (that's a 1, not an F1) and hit the enter key. BL should continue booting using the second disk image you pointed it to and eventually take you to the BL welcome screen.

5) From this point you simply follow BL's install-to-hd directions: use fdisk to create a partition on /dev/hda, format the partition ext2, then mount it at /hd and run the install-to-hd script. When it asks you to insert floppy 1, adapt the steps outlined in step 4 to switch the floppy images again.

When you're done with that you should have a BL install on your 100 MB qemu disk image. Just like with a regular hard drive install of BL, you have to boot the hard drive using the floppy on a fresh installation and then install lilo using BL's supplied directions.

I would just point out in closing that I had to issue

-------------------
lilo -b /dev/hda -v
-------------------

several times before lilo was successfully and fully written to the mbr of the qemu virtual hard disk.

Look for revisions to this how to in case important details were inadvertently left out.

James




Archive powered by MHonArc 2.6.24.

Top of Page