Talk:Installing 386BSD 1.0 on Qemu

From Computer History Wiki
Revision as of 20:38, 6 May 2010 by Dugo (talk | contribs) (Testing a New Kernel Program: new section)
Jump to: navigation, search

A bit raw still, but this gets the installer going on some default cloud computing service fedora box.

yum -y install wget
yum -y install gcc
yum -y install gcc-c++
yum -y install ncurses-devel
yum -y install zlib-devel.i386
cd /usr/local/src
wget http://download.savannah.gnu.org/releases/qemu/qemu-0.12.3.tar.gz
gunzip -c qemu-0.12.3.tar.gz |tar -xvf -
cd qemu-0.12.3
./configure --enable-curses
make
make install
cd
wget http://www.xs4all.nl/~dugo/5boot.img
wget http://www.xs4all.nl/~dugo/ddbboot.img
#get CD image XXX
qemu-img create disk 1G
cp ddbboot.img 5.img; qemu -fda 5.img -hda disk -hdb 386BSDCD -curses -m 8

Then in *brrr* DOS:

A:\boot 386bsd.ddb wd1d

then..:

          Text 466944
          Data 20480
          Start 0xfe000000
          can't open emm
          386BSD Release 1.0 by William & Lynne Jolitz. [1.0.22  10/27/94 15:32]
          Copyright (c) 1989-1994 William F. Jolitz. All rights reserved.
          clk:  irq0
          pc: pc0 <color> port 60 irq1
          aux:  port 310 irq12
          wd: wd0 <QEMU HARDDISK> wd1 <QEMU HARDDISK>  port 1f0 irq14
          fd: fd0: 1.44M port 3f0 irq6 drq2
          com: com1: fifo port 3f8 irq4
          lpt: lpt0  port 378 irq7
          npx: npx: irq13
          mcd:  port 300 irq10
          erase ^?, kill ^U, intr ^C
          # ./install

Yes, US/Pacific is fine, partitioning, not so much.

Dugo 23:54, 4 May 2010 (UTC)

Building a Kernel Program

The default kernel works like total crap for after the install. I didn't make a /.config file for it, but that shouldn't stop it from understanding inet. Let's try the book:

Building a Kernel Program

In use, this arrangement is much akin to the layout of utilities in the rest of the system. To build a stock kernel out of the stock release, type make in the kernel directory (/usr/src/kernel).

Can't be that simpel. The Makefile looks for stock.mk, which isn't there.

The stock kernel simply selects the modules necessary to run the system on a ordinary IBM clone PC. This defacto industry standard is a system with a video display, IDE drive, floppy, serial and parallel ports.

Ok,ok, back then the industry standard was running without ethernet adapters, now I understand.

Other "ready-made" configurations are available in the configuration subdirectory, by copying one to the computer's hostname file (ex: host "foo" would use the config/foo.mk file). Custom configurations may be made by editing the file with a text editor.

On initial (re)configuration, the configured kernel should have its compilation dependencies set by issuing a make depend. A stale set of object files can be erased by issuing a make clean prior to recreating a kernel.

Which one do you copy? Know what, will just use what the Jolitzes used on their laptop.

hostname odysseus
mount -u /
cd /usr/src/kernel
make clean
make depend
make

And then the whole thing breaks, moaning about Unclosed conditionals starting with config.std.mk. When you look at it, you see a .if an a .endif plus a bunch of .include. Looks closed to me. To be continued....

Testing a New Kernel Program

A freshly made kernel can be tested by installing it with the make install command, which places it in the root as the file /386bsd.alt. This file can be booted selectively by the system bootstrap (see man bootstrap). Alternatively, a bootable floppy (see "man floppy") can be used to hold the new kernel and its dedicated root filesystem to check out a new kernel in isolation from the main system.

The "-debug" and "-specify" flags can be used with the bootstrap to invoke run time diagnostic facilities to illustrate kernel operation on the console as a means to allow fault isolation.

There is no man floppy and no man bootstrap. Now if the default bootblocks worked out of the box that wouldn't be such a problem.

How you are supposed to pass these parameters when booting from your bootflop and have a dedicated root filesystem on it? The params can be passed with BOOT.EXE, but this is a dos binary. Wonder what is in man floppy, a tutorial how to make a floppy dual boot dos & 386bsd?

The specify flag hasn't done anything for me yet. I have no idea what the run time diagnostic facilities are, the debug kernel drops into a debugger when you least expect it and then spits out ASM like cruft. Bourne Shell scripts aside I'm not much of a coder, trying to make asm shellcode for a hole in sendmail 8.9.1/8.9.3 gave me huge headaches once, trying to get this running needs to stay `Fun!'.

Where was I? Ah, yes, I don't have the system booting from the HD yet and when booting from dosflop it rarely does anything the same while using the same commands. Back to the drawing board and the liner notes I guess.

Dugo 19:38, 6 May 2010 (UTC)