Sponsoring website: Emergency Boot CD



How to Set Up ttylinux
under the Bochs Emulator


Copyright©2013 by Daniel B. Sedory


If you have not yet done so, please install the Bochs Emulator under your OS Platform. Although most of the following will apply only to those using Microsoft® Windows™, some of this page will also be useful to those running a Linux distribution as well. To install Bochs, please see our How to Set Up and Run the Bochs Emulator page with dlxlinux, and be sure to download the ttylinux-virtio_i486-16.1.iso.gz file from the ttylinux web site.

The following assumes you already have BOCHS installed on your PC, and know how to navigate to its install location. On a Windows™ PC, this should be: "C:\Program Files\Bochs-2.6.2\" (or whatever current version of Bochs is installed as the folder name). Let's begin:

========================================================================
                                bximage
                  Disk Image Creation Tool for Bochs
          $Id: bximage.c 11315 2012-08-05 18:13:38Z vruppert $
========================================================================

Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd]  Press ENTER key!

What kind of image should I create?
Please type flat, sparse or growing. [flat]  Press ENTER key!

Enter the hard disk size in megabytes, between 1 and 8257535
[10] 180  Type 180, then press ENTER key!

I will create a 'flat' hard disk image with
  cyl=365
  heads=16
  sectors per track=63
  total sectors=367920
  total size=179.65 megabytes

What should I name the image?
[c.img] hda.img  Type hda.img, then press ENTER key!

Writing: [] Done.

I wrote 188375040 bytes to hda.img.

The following line should appear in your bochsrc:
  ata0-master: type=disk, path="hda.img", mode=flat, cylinders=365,
 heads=16, spt=63
(The line is stored in your windows clipboard, use CTRL-V to paste)

Press any key to continue
_
========================================================================
                                bximage
                  Disk Image Creation Tool for Bochs
          $Id: bximage.c 11315 2012-08-05 18:13:38Z vruppert $
========================================================================

Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd] fd  Type fd, then press ENTER key!

Choose the size of floppy disk image to create, in megabytes.
Please type 0.16, 0.18, 0.32, 0.36, 0.72, 1.2, 1.44, 1.68, 1.72, or 2.88.
 [1.44]  Press ENTER key!
I will create a floppy image with
  cyl=80
  heads=2
  sectors per track=18
  total sectors=2880
  total bytes=1474560

What should I name the image?
[a.img]  Press ENTER key! (Change to b.img 2nd time through.)

Writing: [] Done.

I wrote 1474560 bytes to a.img.

The following line should appear in your bochsrc:
  floppya: image="a.img", status=inserted
(The line is stored in your windows clipboard, use CTRL-V to paste)

Press any key to continue
_

# fdisk -l

Disk /dev/hda: 188 MB, 188375040 bytes
255 heads, 63 sectors/track, 22 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hda doesn't contain a valid partition table
# fdisk /dev/hda
Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT di
sklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.


Command (m for help): c  (ENTER c to turn off DOS Compatibility.)
DOS Compatibility flag is not set

Command (m for help): x  (ENTER x to access additional 'expert' commands.)

Expert command (m for help): c  (ENTER c to change number of cylinders.)
Number of cylinders (1-1048576, default 22): 365  (ENTER 365.)

Expert command (m for help): h  (ENTER h to change number of heads.)
Number of heads (1-256, default 255): 16  (ENTER 16.)

Expert command (m for help):r  (ENTER r to return to main menu.)

Command (m for help): n  (ENTER n to create a new partition.)
Command action
   e   extended
   p   primary partition (1-4)
p  (ENTER 'p' to create a primary partition.)
Partition number (1-4): 1  (ENTER a 1.)
First cylinder (1-365, default 1):  Press the ENTER key (to use '1')!
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-365, default 365): +24M
                                                                 (ENTER +24M.)
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2  (ENTER a 2.)
First cylinder (49-365, default 49):  Press the ENTER key (to use '49')!
Using default value 49
Last cylinder or +size or +sizeM or +sizeK (49-365, default 365): +32M
                                                                  (ENTER +32M.)
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3  (ENTER a 3.)
First cylinder (112-365, default 112):  Press the ENTER key (to use '112')!
Using default value 112
Last cylinder or +size or +sizeM or +sizeK (112-365, default 365): Press the
Using default value 365                                          ENTER key!

Command (m for help): p  (ENTER 'p' to print summary of partition table.)

Disk /dev/hda: 188 MB, 188375040 bytes
16 heads, 63 sectors/track, 365 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/hda1               1          48       24191+ 83 Linux
/dev/hda2              49         111       31752  83 Linux
/dev/hda3             112         365      128016  83 Linux

Command (m for help): w  
The partition table has been altered.
Calling ioctl() to re-read partition table
# ttylinux-installer --config=install.conf /dev/hdb
Listing device partition format options:
...will format /dev/hda3 as ext3
...will format /dev/hda2 as swap
...will format /dev/hda1 as ext3
Making file systems:
-> mkfs.ext3 on /dev/hda3
-> mkswap on /dev/hda2
Setting up swapspace version 1, size = 32509952 bytes
UUID=15fb943a-9f11-4868-8c7c-8b9166982c0e
-> mkfs.ext3 on /dev/hda1
Mounting file systems:
-> mount [ext3] /dev/hda3 at /tmp/ttylinux/targt/
-> mount [ext3] /dev/hda1 at /tmp/ttylinux/targt/boot
i> Mounting ttylinux CD-ROM on /dev/hdb ... OK
i> Installing ttylinux distribution packages.
   ***** Installing ttylinux-i486-16.1
=> bash-4.2
=> busybox-1.21.0
=> dropbear-2013.58
=> e2fsprogs-1.42.7
=> glibc-2.9
=> iptables-1.4.18
=> lilo-23.2
=> ncurses-5.9
=> retawq-0.2.6c
=> thttpd-2.25b
=> ttylinux-basefs-1.0
=> ttylinux-devfs-1.0
=> ttylinux-utils-1.5
i> Installing ttylinux distribution data [/ttylinux] ... DONE
i> Copying ttylinux kernel ....... OK
i> Unmounting ttylinux CD-ROM on /dev/hdb ... OK
i> Installing LILO boot loader.
Warning: Unable to determine video adapter in use in the present system.
Warning: Video adapter does not support VESA BIOS extensions needed for
  display of 256 colors.  Boot loader will fall back to TEXT only operation.
Added ttylinux  *
2 warnings were issued.
-> umount /dev/hda1 from /tmp/ttylinux/targt/boot
-> umount /dev/hda3 from /tmp/ttylinux/targt/

i> Installation complete.

 


More will be posted in the near future... this page is still Under Construction !!!

If you need any help in setting up the Bochs Debugger, please email us.


 


First Published: July 28, 2013 (28.07.13).
Last Update: July 29, 2013 (29.07.2013).


You can write to me using this: online reply form. (It opens in a new window.)

The Starman's x86 ASSEMBLY Pages

The Starman's Realm Index Page