October 2018 Archives
Wed Oct 10 02:02:02 CEST 2018
Success with UNIX V7/x86
After a longer hiatus on I continued with the v7x86 project. Prior status, a bit more in depth than the last time:
The INSTALL
hints recommend to use some external method to prepare the
(fdisk) partitioning of the target IDE disk but also point out the
option to use the ptdisk
tool coming with the
installer. I chose that and ran into these problems:
-
When
ptdisk
ing as described in the INSTALL notes, the rudimentory RAM filesystem lacks the file containing the actual MBR boot code. This went unnoticed by me (perhaps I did not pay enough attention?) before I continued with the (successful) installation of the entire unix/v7 system to its new partition. I ended up with an MBR describing the primary partition table entry for the v7x86 system but no boot code -- and hence with a non-booting system. -
I then found this problem mentioned in this ISSUE note and attempted an appropriate fix.
On my "Proxmox" virtualization linux system, I mounted the installation ISO, extracted the the prototypical MBR record, and dumped its boot code (the initial 446 bytes) to the (virtual) hard disk:
mount -o loop v7x86-0.8a.iso /mnt
tar xOf /mnt/v7x86-0.8a.tar usr/boot/mbr > /tmp/mbr
dd bs=446 count=1 conv=notrunc \
if=/tmp/mbr \
of=/var/lib/vz/images/101/vm-101-disk-1.raw
At this point, it was extremely helpful that I had chosen the dead-simple "raw" disk image format and not something complicated such as "cowq2".
However, the system still refused to boot.
Today, I took the standard NetBSD/i386
/usr/mdec/mbr
boot code instead. Same method as above
to dd
the 446 bytes boot code. These successfully
picked up the single, active partition, and I finally arrived at
the UNIX V7 boot loader. \o/
At this point, I could continue with Robert Nordier's excellent introduction on how to boot unix/v7 and go from single to multi-user.
Great fun. I happen to like systemd
but then again,
I still love the simplicity of an /etc/rc
(or perhaps
even /etc/rc.local
) you create from scratch and hence
actually understand.