The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Tuesday, Debtember 14, 1999

@%$@#@$^@$@#$@#!%

Mark pointed me to Thix, yet another free Unix clone for 80x86 based machines. This one was written back in '94 or so and it looks like it's self-hosting, which is good. It doesn't support networking, which is bad (but not that bad). It looks like it'll run fine on a small system, which is good. But the installation disk doesn't contain a program to make the filesystem, which is bad (and that's bad).

This makes the current installations of Linux trivially easy by comparrison.

The setup assumes you have Linux already installed on another partition and can run the mktfs program from Linux. Ha ha. That's a good one.

I took a look at the source code to mktfs (good thing this is an Open Source ™ project) to see how the filesystem is laid out and thinking I could write a quick assembly hack to create the filesystem, dump the program to a floppy so that it executes when booted and go from there.

I then got the idea to hack mktfs itself to read/write to an image file. My thought—instead of having it write to a device, just have it act on a file, then dump that image to the harddrive.

Hack hack hack debug debug debug ah good. Compress the image, dump to floppy, move over to the lap top, extract from floppy and decompress onto the appropriate partition, reboot and …

No go.

Next up … hack up the TFS version of fsck, run that on the image file, and try again.

Well … something's wrotten in the state of Denmark. It seems the author keeps mixing up if he has his units in blocks or bytes.

Or it could be that it's so crocked up it can't be fixed …

Wednesday, Debtember 15, 1999

D'oh!

I finally got the Thix filesystem utilities mktfs and tfsck working, although what I changed to make it work I'm not entirely sure since I wasn't keeping that close a track of what I was doing. It seemed to go okay after I went through the mktfs code line by line, seeing the values being calculated and stored in the superblock of its filesystem.

I had created two partitions on the drive in the laptop—an 8M partition for swap (if Thix supports it, I'm still not sure) and the rest (~108M) for the actual filesystem.

Finally I got an 108M (108.0117188 * 1024 * 1024 gives 113,258,496 bytes, so you see I'm using the computer definition of megabyte, not the disks manufacturer's definition) image file created, and a few runs through tfsck fixed it up. Ran gzip over the image, which compressed it down to something like an 11K file. I transfered it to floppy (tar cf /dev/fd0 thxfs.img.gz), sneakered it over to the laptop.

I created a Minix filesystem on the 8M partition (using Tom's Root Disk), extracted the file from the floppy (tar xf /def/fd0) and then extracted the image file to the appropriate partition(gzip -dc thxfs.img.gz | dd of=/dev/hda2).

Several long minutes later, it was done. Booted from the Thix installation disk, it mounted the partition no problem, installed a bunch of stuff, popped the floppy out and rebooted.

To an error screen.

Ah, the master boot record must be bad. Okay, this is easy. Let me approach this all wrong and spend an hour or so writing a custom boot sector on a floppy that will then read the partition table from a harddrive and boot from that.

It would have worked too, if it weren't for those pesky kids.

Sorry. I would have worked too, if in fact, a boot sector and kernel were actually part of the partition!

Oops. I should have read the installation instructions better. Especially the part:

Go into the Thix source tree (../thix).

Edit  the  file fs/mount.c and  set the  root_device  to  point to the
partition you want to install Thix on. That is, uncomment this lines:

/* /dev/hda3  */
int root_device = HDC_MAJOR * 0x100 + 4;

and well, it goes on from there. Had I a bit more time, I probably could do it. Heck, had I a bit more time, I probably could have gotten Linux on the thing.

Mark suggested FreeBSD or Slackware. Can't use FreeBSD since I think that requires a math-coprocessor (although I'm sure Mark will correct me if that is not the case) and I unfortunately ran out of time to try Slackware (which probably would work).

I'm out of time, because I'm leaving for Palm Springs in, oh, less than 12 hours now.

Obligatory Picture

[The future's so bright, I gotta wear shades]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.