146 lines
4.8 KiB
Plaintext
146 lines
4.8 KiB
Plaintext
Warning: I have personally not done this the hard way, so I don't know
|
|
what problems could surface. In general, this version is still meant
|
|
for people with minix: they are more used to the system, and can do some
|
|
things that DOS-based persons cannot. If you have only DOS, expect some
|
|
troubles. As the version number suggests, this is still not the final
|
|
product.
|
|
|
|
This is a "fast hack", meant as a minimal guide to what you must do.
|
|
I'll expand this as soon as people tell me what they have problems with
|
|
etc etc. If somebody who has successfully installed the system wants to
|
|
write something better, I'd be delighted. This guide stinks to high
|
|
heaven.
|
|
|
|
|
|
Installing Linux-0.10 on your system
|
|
|
|
|
|
There are 5 major steps in installing linux on your system:
|
|
|
|
1 - BACK UP ANY IMPORTANT DATA. Linux accesses your hardware directly,
|
|
and if your hardware differs from mine, you could be in for a nasty
|
|
surprise. Doublecheck that your hardware is compatible: AT style
|
|
harddisk, VGA controller. (If somebody has EGA, please tell me if the
|
|
screen driver should happen to work)
|
|
|
|
|
|
2 - Make a file-system on your harddisk. This is easy if you have
|
|
minix, but if you haven't got minix, you'll have to get the minix
|
|
demo-disk from somewhere (plains.nodak.edu is one place), and use that.
|
|
There should be a manual accompanying the demo-disk, and you had better
|
|
read that carefully. Although this version of linux will boot up
|
|
without minix, a knowledge of minix would help. Especially if you have
|
|
never done any unix work, you'll be very confused.
|
|
|
|
Making a filesystem means getting a empty partition (with DOS fdisk or
|
|
similar), and using the 'mkfs /dev/hdX nnn' command to write out a empty
|
|
file-system.
|
|
|
|
|
|
3 - copy the diskimages to two floppies. Again, under minix (or any
|
|
unix), this is easy, as you can just do a simple 'dd' to a floppy, but
|
|
from within MS-DOS this might be a bit trickier. 'debug' should be able
|
|
to write diskettes directly, or you could get the sources to "raw-write"
|
|
from the same place as you got the minix demo disk, and modify them to
|
|
write out any disk image (or do they do that already?).
|
|
|
|
NOTE! The floppies MUST be of the same type: even though the boot-image
|
|
will fit nicely on a 360kB floppy, you have to write it to the same type
|
|
of floppy as the root-image. That means a 1.2M or 1.44M floppy. The
|
|
reason is that the floppy-type is determined at boot-time from the
|
|
boot-floppy. Thus the same binary works on both 3.5" and 5.25" drives.
|
|
|
|
|
|
4 - boot up from floppy. This should be obvious. Having a floppy as
|
|
root-device isn't very fast (especially on a machine with less than 6MB
|
|
total ram -> small buffer cache), but it works (I hope). Test the
|
|
programs on the root-floppy (cat mkdir etc).
|
|
|
|
|
|
5 - Mount the harddisk partition (I do it on /user: ie
|
|
'mount /dev/hdX /user'), and copy the file system over to the new
|
|
partition. The following is a example of how to do this:
|
|
|
|
$ cd /user
|
|
$ mkdir usr
|
|
$ for i in bin etc usr/bin usr/root mtools
|
|
> do
|
|
> mkdir $i
|
|
> cp `ls -A /$i` $i
|
|
> done
|
|
$ mkdir dev
|
|
$ cd dev
|
|
$ for i in 0 1 2 3 4 5 6 7 8 9
|
|
> do
|
|
> mknod 'hd'$i b 3 $i
|
|
> done
|
|
$ mknod tty c 5 0
|
|
$ mknod tty0 c 4 0
|
|
$ mknod tty1 c 4 1
|
|
$ mknod tty2 c 4 2
|
|
|
|
You should now have a filesystem you could boot from. Play around a bit,
|
|
try to get aquainted with the new system. Log out when you've had
|
|
enough.
|
|
|
|
|
|
6 - Changing the boot-diskette use your new harddisk partition as root.
|
|
The root device to be used for linux is encoded in a word at offset 508
|
|
in the boot image. Normally this is 0, meaning that the root is to be
|
|
the same type of floppy as was used in the boot process. This can be
|
|
changed to whatever you like.
|
|
|
|
Use a short program like the one at the end to change the word (I assume
|
|
everybody has access to some kind of C compiler, be it under dos or
|
|
unix). You can then write out the new bootdisk, and boot from it, now
|
|
using the harddisk as root (much faster). Once you have successfully
|
|
done that you might want to install additional programs (gcc etc) by
|
|
reading them from a dos-floppy with 'mcopy'.
|
|
|
|
|
|
Linus (torvalds@kruuna.helsinki.fi)
|
|
|
|
|
|
------ example program: use 'a.out < oldboot > newboot' ----
|
|
#include <unistd.h>
|
|
char tmp[512];
|
|
|
|
void main(void)
|
|
{
|
|
int i;
|
|
|
|
if (512 != read(0,tmp,512))
|
|
exit(1);
|
|
if (0xAA55 != *((unsigned short *)(tmp+510)))
|
|
exit(2);
|
|
*((unsigned short *)(tmp+508)) = NEW_DEV;
|
|
if (512 != write(1,tmp,512))
|
|
exit(3);
|
|
while ((i=read(0,tmp,512)) > 0)
|
|
if (i != write(1,tmp,i))
|
|
exit(4);
|
|
exit(0);
|
|
}
|
|
-------
|
|
|
|
Devices:
|
|
|
|
Harddisks:
|
|
0x301 - /dev/hd1 - first partition on first drive
|
|
...
|
|
0x304 - /dev/hd2 - fourth partition on first drive
|
|
|
|
0x306 - /dev/hd1 - first partition on second drive
|
|
...
|
|
0x309 - /dev/hd2 - fourth partition on second drive
|
|
|
|
0x300 - /dev/hd0 - the whole first drive. BE CAREFUL
|
|
0x305 - /dev/hd5 - the whole second drive. BE CAREFUL
|
|
|
|
|
|
Floppies:
|
|
0x208 - 1.2M in A
|
|
0x209 - 1.2M in B
|
|
0x21C - 1.44M in A
|
|
0x21D - 1.44M in B
|