The most important file is /etc/init.d/rc.S
found on the
VMU. So, we first have to prepare the VMU for
storing the persistent configuration. Boot your SEGA Dreamcast
and plug in the VMU. You'll notice some Linux kernel messages
about the found flash memory system. Log in as root and type in:
# mkfs.minix /dev/mtdblock0
Now, your VMU is formatted. Following, you can mount your VMU for storing files:
# mount -t minix /dev/mtdblock0 /mnt
Your flash memory is now accessible under /mnt
.
The first file being created is /mnt/etc/init.d/rcS
:
# mkdir -p /mnt/etc/init.d # cat <<. >/mnt/etc/init.d/rcS #!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin echo "Setting up filesystem..." # First, set up the users. rm -f /etc/passwd rm -f /etc/shadow rm -f /etc/group rm -f /etc/gshadow ln -s /mnt/etc/passwd /etc/passwd ln -s /mnt/etc/shadow /etc/shadow ln -s /mnt/etc/group /etc/group ln -s /mnt/etc/gshadow /etc/gshadow # Then, set up hosts. rm -f /etc/hosts ln -s /mnt/etc/hosts /etc/hosts # Now, set up ADSL connection. cp /mnt/etc/ppp/pap-secrets /etc/ppp cp /mnt/etc/ppp/pppoe.conf /etc/ppp # Following, prepare SSH host_key. cp /mnt/etc/ssh/ssh_host_key /etc/ssh cp /mnt/etc/ssh/ssh_host_key.pub /etc/ssh # Then, we set up the /home directories. ln -s /mnt/home/christian /home/christian echo "Setting hostname..." hostname hercules # If you have a german keymap #echo "Setting keymap..." #loadkmap < /mnt/usr/share/keymaps/qwertz.map echo "Configuring lo..." ifconfig lo 127.0.0.1 up echo "Configuring eth0..." ifconfig eth0 192.168.1.1 up echo "Starting klogd..." klogd echo "Starting syslogd..." syslogd echo "Starting udhcpd..." udhcpd echo "Starting yaku-ns..." /usr/yaku-ns/yaku-ns -c /usr/yaku-ns/yaku-ns.conf \ -l /usr/yaku-ns/yaku-ns.log -u yaku -d echo "Starting sshd..." sshd -f /etc/ssh/sshd_config sleep 1 echo "Everything's done. Have fun." . # chmod 744 /mnt/etc/init.d/rcS
The first few lines remove the generic passwd
- and group
- files
and replace them with my personal configuration.
The next two lines set up a specific /etc/hosts
- file.
Following, my personal ADSL account information will be copied to the root filesystem.
Furthermore, the SSH specific host_key pair files (please see chapter eight) are transferred to the root file system.
Last but not least, my personal home directory with a SSH public key is linked to the root file system.
Obviously, you have to create or copy every linked or copied file from this script to your VMU. I suggest following procedure:
/etc/init.d/rcS
on your SEGA Dreamcast and
the corresponding /etc/init.d/rcS
for your VMU copying or
linking every needed file.
$ cd persistent_configuraton $ tar -cvpf ../vmufs.tar .
The option -p
is necessary for preserving the modes of the single files.
vmufs.tar
to your SEGA Dreamcast using
wget
for example (assuming you're running a local web - or ftp - server):
# cd /tmp # wget http://192.168.1.11/vmufs.tar
# mount -t minix /dev/mtdblock0 /mnt # cd /mnt # tar -xvf /tmp/vmufs.tar .
This procedure has two advantages: First, you don't need to edit and change your persistent configuration directly on your SEGA Dreamcast, and second, you've got a backup of your configuration on your host.