Tuesday, August 14, 2012

Linux-0 #2: Getting files inside Minix

According to the linux-0.01 release notes, gcc-1.40 was used and 1.37.1 is mentioned but with a slight note. Googling for 1.4.0 against minix 1.x didn't turn up anything but 1.37.1 did. Thought I'll try to get 1.37.1 running then compile 1.4.0 on that.

But first I needed to figure a way to get files inside the minix system.

The best method I found was to create a dos partition then use the dos* utilities to read files. I hooked the qemu hd image via loop device (losetup and kpartx), good thing I used the raw format. Creating and formatting the partition on linux was problematic, minix can't read files from it.

The problem stemmed from the mapped partition being unable to report proper geometry to mkdosfs and apparently cluster sizes. To get around the geometry issue, I booted a dos image along with my minix system and used the old fdisk/format to create the partition.

After a few tries, I got a good partition size of 24mb that minix can read. Cluster size on the partition is 2k, anything more than that minix won't be able to use. Referring to some docs, seems minix 1.x friendly partitions can go up to 127mb.

Mounting and writing on the dos partition while the system is running didn't pose any issues, though I make sure I sync first before running dosdir.

Readme for gcc-1.37.1 on minix 1.x

No comments:

Post a Comment