This Lites release cannot yet be fully hosted by a Linux system. So far, the following things work:
/dev
conversion was added.
The motivation is that
Linux uses Minix device numbers, whereas Lites uses *BSD numbers.
Thus, if we don't want to have different servers (with different
conf.c
files),
Linux and Lites cannot share a common /dev
directory.
This is currently done by using the AFS @sys
hack
recognized by Lites.
To configure your Linux root filesystem to use either Linux or Lites
do the following (as root):
mkdir /i386_linux ln -s i386_linux @sys mv dev i386_linux/dev ln -s @sys/dev devThese commands enable Linux to continue working, with
/dev/
xxx
translating to
/i386_linux/dev/
xxx.
The following sets up a device
directory for Lites (you will need a copy of the NetBSD MAKEDEV
script to do this):
mkdir /i386_lites /i386_lites/dev cp MAKEDEV.NetBSD /i386_lites/dev/MAKEDEV cd /i386_lites/dev; ./MAKEDEV all mknod time c 25 0 ; mknod timezone c 26 0The time and timezone special files are used by the Lites emulator. You will also need to create Linux aliases for the NetBSD special files, for example:
ln -s wd0a hda1 ln -s wd0e hda2 ln -s console tty1Thus, when running a Linux binary under Lites,
/dev/hda1
will eventually
translate to
/i386_lites/dev/wd0a
, which has the right (*BSD) device number.
This seems to be a major hack. We're open for suggestions.
/mach_servers/mach_init
:
#!/bin/sh exec /sbin/agetty 38400 consoleNote that the console is not properly set up, you need to type ^J instead of Return. Other than that, you should be able to log on and issue commands.
/sbin/init
fails.
Due to some problems related to signal
handling, the kernel will usually panic after 45 sec.
/bin/ls
.
Presumably that's a bug in the emulator. Note that Linux
/bin/ls
works on a Lites/NetBSD system
and that NetBSD /bin/ls works on
Lites/Linux, just Linux /bin/ls
doesn't work on Lites/Linux.
wd0e
on /usr
(our tested system has a separate /usr
partition)
It says ``device not configured''. Maybe Mach doesn't recognize the
second Linux partition for some reason?
/
mounted read-only.
Remounting it
read-write is not as simple as it may seem, due to a number of
idiosyncrasies in *BSD/mount, Linux/mount, and the Lites mount
implementation. This is a long story nobody wants to hear.
ONLY the following command works:
/sbin/mount -wn -t ext2 -o remount /dev/hda1 /[because it says do not try to write
/etc/mtab
(-n),
do not probe for fstype (-t ext2), set MS_REMOUNT (-o remount)
do not read /etc/mtab
for the special file
(/dev/hda1
)]
Another problem is that Linux's mount writes canonicalized filenames in
/etc/mtab
.
Unfortunately, the Linux mount executed in rc.d/rc.S
reads from /etc/mtab
...