Back to 386 BSD

Well gunkies is getting a little more life to it, and Dugo contributed this install guide for 386 BSD. Along the way I installed it again with floppy images, and I hit the same fault again:

/386bsd: wd0a: overlaps open partition (b)

However this time I noticed that if you keep on rebooting, it’ll actually stop complaining and work!

So not only was I able to recover from a crash after trying to install the source code, but I was able to complete the install, and install the patchkits! What this has resulted in, is that Qemu can now run 386BSD!!! And it’s significantly faster then Bochs. Not to mention you gain the whole SLiRP / Usermode networking.

So far I’ve tested this with Qemu-0.11.0 just fine. I’m not sure about other levels… so it’s another YMMV.

So now I’ve been able to not only rebuild the kernel & world, but the following programs:

gzip 1.2.4
unzip 5.52
irc II-4.4
lynx 2.8.2

Oh yeah, and another f2c build, and yes it’ll run Dungeon!

So for the few people interested in some BSD history, as this is the ‘first’ Net/2 derived freely available release in a qemu format right here (sorry, link removed, if you want it install this instead).

Just uncompress the qcow2 file (sorry it’ll blow out to 500MB), then run Qemu something like this:

i386-softmmu/qemu.exe -L pc-bios -hda bsd386.qcow2 -M isapc -net nic -net user -no-reboot -m 256

And with any luck, you’ll find the VM booting, and all set and ready to roll. If it comes up in single user-mode, just close Qemu & fire it up again..

I’ll probably put together a windows install package for this later, but for now I figure I’ll unleash some 386BSD onto the world.

More CDROM madness.

Well I found that one of the things that was preventing me from booting up this “Solaris 1.1.2” AKA SunOS 4.1.4 CD is that Qemu on Win32 using raw devices has issues with all these slices and whatnot.

Slices you say?

Yeah, back in the ISO9660 Rock Ridge days, CD-ROMS were basically given a common format for the “LCD” of the day. In that case MS-DOS. Naturally people like Unix vendors were not to keen on that, as they wanted file attributes, long file names, symbolic links etc… So a *LOT* of people started to split up their CD’s into partitions like hard disks, and slap down actual filesystems on the disks. NeXT just used one giant partition on the CD-ROM, but their exe format let them ‘bind’ all the CISC machines onto one CD, and all the RISC machines on another. Meanwhile SUN decided to make all these ‘boot’ partitions for various machines, a miniroot, then an I9660 partition for basic tar files of the OS…

Like this:

2,998,272 DEBUGGING
4,161,536 DEMO
3,219,456 GAMES
1,826,816 GRAPHICS
999,424 INSTALL
1,073,152 NETWORKING
7,815,168 OPENWINDOWS_DEMO
9,748,480 OPENWINDOWS_FONTS
23,756,800 OPENWINDOWS_PROGRAMMERS
34,316,288 OPENWINDOWS_USERS
925,696 RFS
327,680 SECURITY
1,409,024 SHLIB_CUSTOM
524,288 SUNVIEW_DEMO
1,884,160 SUNVIEW_PROGRAMMERS
2,727,936 SUNVIEW_USERS
4,104,192 SYSTEM_V
729,088 TEXT
49,152 TLI
7,872,512 USER_DIAG
29,638,656 USR
622,592 UUCP
6,103,040 VERSATEC

Which is kind of funny seeing how some BSD derived OS’s still keep some of these package names alive.

Anyways, the problem is that I tried to use \\.\d: for the cdrom, and booting didn’t work at all. I even tried reading an ISO from the CD, but all it ended up doing was skipping to the ISO9660 part, and dumping that, ignoring the slices, giving me this:

243,599,360 sol14.iso

So after googling around, trying to at least find a way to back up this CD (it was a souvenir from Japan!) I found someone mentioning to backup their Solaris CD, they had to use the “readcd” program.

Well, I’d never explored that much with the cdrtools, but behold there is a readcd program that’ll dump an entire CD out!

So running it with –scan-bus to find your CD drive…

readcd -scanbus
scsibus0:
0,0,0 0) *
0,1,0 1) ‘HL-DT-ST’ ‘BDDVDRW GBC-H20L’ ‘1.B8’ Removable CD-ROM
0,2,0 2) *

We can go on to dump a full image of the CD.

readcd -dev=0,1,0 f=sunos.iso

Which now gives us a much larger ISO image…

329,605,120 sunos.iso

Sadly it crashes on bootup… But on Win32 it’s a lot better then not reading *ANYTHING* at all!

ok boot disk1:d -vs
Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@1,0:d File and args: -vs
Boot Release 4.1.4 (sun4m) #2: Fri Oct 14 11:07:52 PDT 1994
Copyright (c) 1983-1990, Sun Microsystems, Inc.
Boot: Romvec version 3.
root on /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@1,0:d fstype 4.2
Boot: vmunix
.Size: 868352…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………+2319136+75288 bytes
Statistics:

–edit

I should also add that Qemu’s CDROM (like 99% in the world) are fixed block, while SUN (and other vendors) had these CD ROM’s that could change block size… So in Qemu you have to use the DISK driver vs the CDROM driver….

ie use -hdb sunos.iso instead of -cdrom sunos.iso

Qemu Sparc snapshot getting better!

Thanks to Artyom Tarasenko‘s tireless work on the Sparc MMU, DMA, SCSI It’s not possible to install some versions of Solaris, and boot others to single user mode!
Heck, even the NeXTSTEP 3.3 boot program goes ahead and loads up..

However this is all done without a graphical console, as the sparc rom’s dont understand the framebuffer that Qemu emulates…

qemu-system-sparc.exe -nographic -monitor null -serial mon:telnet:127.0.0.1:23,server -bios ..\ss5-170.bin -M SS-5 -m 256 -hda ..\solaris.disk -startdate “2009-12-13” -cdrom \temp\cd46.iso

Running it is something like this. The key here is the lines:

-nographic -monitor null -serial mon:telnet:127.0.0.1:23,server

Which setup a serial port console you can just telnet into (for us Windows users).

This gets around all the errors like this:

chardev: backend “stdio” not found
qemu: could not open serial device ‘mon:stdio’: Result too large

Sadly my SunOS cd doesn’t seem to want to boot, and I somehow saved a copy of Solaris 8, but not 6..? Sigh.

ok
ok boot cdrom -vb
Boot device: /iommu/sbus/espdma@5,8400000/esp@5,8800000/sd@6,0:d File and args:
-vb
Size: 259712+54162+47510 Bytes
SunOS Release 5.8 Version Generic_108528-13 32-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
Ethernet address = 52:54:0:12:34:56
Using default device instance data
vac: enabled in write through mode
mem = 262144K (0x10000000)
avail mem = 258322432
root nexus = SUNW,SPARCstation-5
iommu0 at root: obio 0x10000000
sbus0 at iommu0: obio 0x10001000
dma0 at sbus0: SBus slot 5 0x8400000
dma0 is /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000
/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000 (esp0):
esp-options=0x46
esp0 at dma0: SBus slot 5 0x8800000 sparc ipl 4
esp0 is /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000
sd6 at esp0: target 6 lun 0
sd6 is /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@6,0
root on /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/sd@6,0:
b fstype ufs
obio0 at root
obio0 at obio0: obio 0x100000, sparc ipl 12
zs0 is /obio/zs@0,100000
obio1 at obio0: obio 0x0, sparc ipl 12
zs1 is /obio/zs@0,0
cpu0: FMI,MB86907 (mid 0 impl 0x0 ver 0x4 clock 1070 MHz)
# uname -a

SunOS 5.8 Generic_108528-13 sun4m sparc SUNW,SPARCstation-5
#

Which is all cool. And check the CPU, 1070Mhz! Don’t we all wish we had SPARC’s that fast!

I’ve even managed to install OpenBSD/Sparc! … But it crashed on booting.

Anyways it’s late, and thats it for now.

NetBSD 1.5.1 follow up

I figured I’d share what I had, and allow people to download my disk image, and for win32 users, it has all the bits to go…

Just extract THIS zip file, and then run the mips.cmd file, and you’ll be in NetBSD ARC/MIPS land in no time!

Other platforms will need to build Qemu 0.12.3 and use the mips 64bit little endian emulator to run the disk image…

NetBSD 1.5.1 – arc

Well… I was looking around for another OS that’d run on a MAGNUM (ie ARC MIPS in little endian mode), and I found that NetBSD supports the ARC Magnum, unlike OpenBSD.

Sadly it’s *VERY* touchy…. The current version 5.0.2 crashes when unpacking the distribution… However 1.5.1 runs! … kind of.

NetBSD 1.5.1 for the ARC has no install program… So I had to prepare a system partition with Windows NT, then boot that disk under the i386 qemu emulator with NetBSD 1.5.1, setup the disk, and unpack the distro.

From there it was a matter of rigging the ARC loader to boot up an ecoff kernel.

There were a few files in the /etc directory to ‘fix’ to allow normal booting (fstab/rc.conf) and to make sure there is no /netbsd in the root.. For some reason while extracting symbols for the ps tables and whatnot it CRASHES.

So far I’m having issues with the networking, but it is running!

I may have to do some more experimenting with this to see if later versions of NetBSD can get their networking going… The ‘big’ issue at the moment is the ethernet reports a MAC address of all zeros… While the same nvram file in Windows NT works just happily……..

Oh well, here is a screen shot!

NetBSD 1.5.1 ARC on Qemu 0.12.3

NetBSD 1.5.1 ARC on Qemu 0.12.3

I guess it’s worth mentioning that once it boots up, it’s been stable enough for me to rebuild a kernel.. And the kernel even booted! (but transferring it out was such a major ordeal…)

Dungeon for NetBSD little endian MIPS

Dungeon for NetBSD little endian MIPS

Oh, and of course it runs dungeon!

Qemu 0.12.3 win32 build available

Hot off the compiler….

http://vpsland.superglobalmegacorp.com/install/qemu-0.12.3.zip

I even remembered to strip the exe’s so it’s WAY smaller then the other versions….

Also for those *ONLY* interested in x86 emulation (ie regular PC) I’ve created a far smaller archive here, that only contains the pc emulator.

I figure the amount of people that run the non x86 stuff is few & far between.

Qemu 12.3 is out!

didn’t the time fly by?

Anyways scanning through the list I see that the SDL full screen/windowing has been fixed!

I’ll have to crank out some binaries later, but I had to write something here, otherwise I’d forget it.

Also on the topic of Qemu, I see this site qemu-buch.de has me listed as the latest win32 build site for Qemu on Win32…

Cool!

Updated Qemu for MIPS emulation

Today I found out that the latest ‘git’ repository version can run Windows NT in color, and with corrected mouse support! The NVRAM is still corrupting and you’ll have to fix the time/date but a usable mouse, and being able to see what you are doing go a long way!

I’ve put the updated binaries here.

If you feel adventurous you too can compile the emulator, I’ve downloaded todays snapshot to here in the off chance this won’t be build able for some time.

I don’t know if there is any good way to enable sound, but things like Visual C++ 4.0 & Quake 1 are usable in that you can actually see what is going on!

Here’s a screen shot of my NT 4.0 workstation….

Qemu MIPS Windows NT color

Qemu MIPS Windows NT color

Qemu ARM, MIPS & PowerPC images…

Well I was thinking of building something like this, but someone did the work for me….

You can find various images here.

So needless to say, a special thank you goes to the dietpc guy… These are all set for MS Windows users, just download the VM you want, and you are ready to go. The only ‘issue’ I had with the PowerPC one, is that I needed to run fsck on the root and reboot it…. (remember the root password is foobar).

Other then that it seems happy as it can be.

root@dietpc3-dev-ppc:/usr/src/f2c# cat /proc/cpuinfo
processor : 0
cpu : 740/750
temperature : 62-64 C (uncalibrated)
clock : 1000.000000MHz
revision : 3.1 (pvr 0008 0301)
bogomips : 40.44
timebase : 16605783
platform : PowerMac
model : Power Macintosh
machine : Power Macintosh
motherboard : AAPL,PowerMac G3 MacRISC
detected as : 49 (PowerMac G3 (Silk))
pmac flags : 00000000
pmac-generation : OldWorld

I wouldn’t dream of really benching it, but this is better then blindly cross compiling as you can check your work…

The downloads are quite sizable about 450mb each… but it is a complete run & go linux environment.

And here is a gratuitous screenshot: