next up previous contents index
Next: Persistent configuration on the Up: Setting up a persistent Previous: Setting up a persistent   Contents   Index


Changes on your SEGA Dreamcast

For using your VMU to store your configuration files, you've to determine if the VMU is plugged in. There are several options to do this job, I'll show the easiest one.

At system boot, we try to mount the VMU. Either the mounting fails or succeeds. The latter, we look for an executable configuration file on the VMU for delivering system control. This configuration file is comparable to /etc/init.d/rcS. The tasks of this file are to copy or link the necessary configuration files to the root file system.

For using a persistent configuration, simply edit /etc/init.d/rcS of your initial ramdisk (your file may vary, please refer to chapter three) and change the following lines (new lines are marked with an asterisk):

      .
      .
      .

      echo "Setting up routing..."
      iptables -t nat -A POSTROUTING \
       -o ppp0 -j MASQUERADE
      echo 1 > /proc/sys/net/ipv4/ip_forward

(*)   echo "Trying to load a persistent configuration..."
(*)   mount -t minix -o ro /dev/mtdblock0 /mnt 2>&1 > /dev/null
(*)   if [ -x /mnt/etc/init.d/rcS ]; then
(*)       echo "Persistent configuration found. Invoking..."
(*)       /mnt/etc/init.d/rcS
(*)   else
(*)       echo "No persistent configuration found. \
(*)        Reverting default configuration..."
    
          echo "Setting hostname..."
          hostname dreamcast

          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."
(*)   fi

As you see, your VMU is mounted read only. This option is given to mount for avoiding any file system errors and inconsistencies while loosing power.

Now, your configuration file on the SEGA Dreamcast is set up.


next up previous contents index
Next: Persistent configuration on the Up: Setting up a persistent Previous: Setting up a persistent   Contents   Index
Christian Berger 2004-10-19