Talk:Installing 386BSD 1.0 on Qemu

From Computer History Wiki
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
gunzip -c qemu-0.12.3.tar.gz |tar -xvf -
cd qemu-0.12.3
./configure --enable-curses
make install
#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


          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, 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/ 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

And then the whole thing breaks, moaning about Unclosed conditionals starting with 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)



Once you have the 386BSD Sampler successfully running off the CD itself, you can install the 386BSD system in your free DOS partition on your hard disk. In 386BSD, after the# prompt, type install and follow the interactive installation instructions. To leave the system once it is installed, after the # prompt type reboot or press Ctrl-Alt-Del.

Qemu closed so fast after sending Ctrl-Alt-Del I doubt the CPU did anything more than a hlt intruction of sorts. As the kernels don't like an unclean rootfilesystem very much and the /install leaving filesystems mounted maybe that's where things go south already and the bootblocks are actually ok. I would like to check out how the bootblocks were installed but Lynnes view of release engineering an open source operating system release is to release all sources except for the sources of the BOOT.EXE program and the installer :-/

I'm still miffed about this piece of sentence you can install the 386BSD system in your free DOS partition. I can't believe this means I have to make a DOS partition first, but maybe it is worth trying if all else fails.

0.1 had a large (use)net following and because the posts are archived I didn't have to reinvent the wheel everytime to get it to run and patched. This is going to cost some hairpulling before I have a reproduceable emulator install documented down for posterity. I really hope 1.0 is worth the trouble and beats the hell out of 0.1 + the "bad" unblessed patches, but so far I'm not impressed. The default kernel can't even do a default multiuser boot because network (inet) has not been compiled in. Sendmail leaves the rc hanging for ages, nfs comes crashing down often taking the whole system with it etc.. but I can get into single user mode with a full install for now.

Dugo 20:26, 6 May 2010 (UTC)

Got it up, recompiled the kernel with inet and can telnet in now. Dugo 17:37, 11 May 2010 (UTC)

I'm looking forward to the X11.... :) neozeed 03:58, 9 October 2011 (PDT)

My notes and discovery:

  • 386BSD 1.0 doesn't like translated CHS value, so keep using 1024*16*63*512=528482304 bytes harddisk image for installer
  • 386BSD 1.0 doesn't read SeaBIOS CMOS correctly, so keep using QEMU-0.11
  • 386BSD 1.0 indeed needs /.config file for enabling ne2k_isa, but from my testing, it stalls in "Starting networking" when it discovers NE2000 NIC
  • bundled kernel(ddb/normal) kernel is not stable, build your own by copying to and edit it
  • when compile kernel, do NOT run "make depend", .depend file will mess up the kernel compilation
  • bundled sed is broken (autoconf-based configure script affects), so compile sed-2.05 instead
  • kernel bug is not fixed like in 0.1-pl24, compiling lynx >2.8.2 HTML.c is not possible
  • when compiling perl 5.003_07, x2p/makefile $(obj) line and following line need to be deleted, <times.h> include in POSIX.xs need to be removed, adding "#define SIG_ERR ((__sighandler_t)-1)" line in mg.c is needed.

--Roytam 06:30, 14 April 2012 (PDT)