BackupNetClone Installation
Step 1a (Optional): Add USB Flash Drive to Minimize Power 
Consumption
The DNS-323 has a USB port on the back of the device that is meant for 
attaching printers and making the DNS-323 be a print server.  Thankfully
others in the DNS-323 Forum have 
paved the way by providing a Linux driver that allows us to plug any USB
device (including a hub to add multiple devices) into the open port on 
the back!
If you would like to change your DNS-323 to minimize power consumption and
hard disk drive wear, then perform the following steps to move all logging 
and add-on system files to a USB key (or other USB device).  Note that most 
of the code text that is on a grey background is meant to be typed into the 
command prompt of a telnet session on the DNS-323.  See 
Step 1 for instructions on getting to a 
telnet command prompt.
  - Get the necessary files from the Internet that you'll need to add 
      to the DNS-323 for USB device support.  Place all of these files in the 
      root directory of Volume_1 (as shown in Windows Explorer), in the same
      location you placed the fun_plug and fun_plug.tar 
      files during Step 1.
    
      - Download the USB driver itself (usb-storage.ko) from here:
          http://www.domaigne.com/download/dns-323/
          This version is mentioned in 
          this
          post and is slightly better than the one in 
          Fonz's fun_plug 
          version 0.3, because the one Fonz has (originally from 
          here)
          puts a lot of unnecessary debugging information into the DNS-323 
          system logs.  All of these usb-storage.ko files work with DNS-323
          firmware revisions 1.03 and 1.04. 
      - Download the start script that loads the USB driver and mounts the 
          USB device.  You can grab the ffp-on-usb.sh script 
          here or from the 
          BackupNetClone
          Install Package release 1.0.2 or later.
 
      - Download the modified version of Fonz' busybox especially 
          made to be used in the /mnt/HD_a2/usbboot/driver/ 
          directory.  You can grab the busybox.usbboot-driver file
          here.
 
      - Download the modified version of Fonz' fun_plug.tar 
          especially made to be used from /mnt/usb_1/ instead of 
          the first disk drive (/mnt/HD_a2/).  You can grab the 
          fun_plug.0.3.usb_1.tar file 
          here.
 
      - Finally download the modified version of Fonz' fun_plug
          made to first try using an attached USB device for system files
          before defaulting to /mnt/HD_a2/fun_plug.d/.  You can grab
          the fun_plug.usb_1 file 
          here or from the 
          BackupNetClone
          Install Package release 1.0.2 or later.
 
      - Note that all of the above files relate to DNS-323 firmware version
          1.03 and 1.04 and Fonz' fun_plug package version 0.3.  Fonz may complete 
          a new fun_plug package at any time, thus making the above 
          unnecessary.
 
    
   
  - Format your USB device using a Linux file system 
      capable of symbolic links 
      (ext2 in our case).
      Use the following instructions to carefully erase the 
      contents of your USB device and format it for use with the DNS-323:
      
        WARNING:  This WILL ERASE all data on your 
            USB device!!
  Please be sure that you don't need whatever
            is currently on the USB device that you will attach to the 
            DNS-323, and BE SURE that you follow the 
            instructions and choose the correct device that will be 
            formatted!  I accept no responsibility for any damage or data
            loss. 
        - View the devices/partitions already present on your DNS-323.
            Take note of the last device in the list, so that you can check 
            if a new device is found when you try your USB device.
            
cat /proc/partitions
         
        - Start the USB device driver on the DNS-323:
            
insmod "${VOL1}/usb-storage.ko"
         
        - Plug your USB device into the back port of the DNS-323.
 
        - Wait up to 2 minutes for the device to be recognized by the 
            DNS-323.  Note that several people, myself included, have had 
            inconsistent results when trying to use various devices with the
            USB port on the DNS-323.  The solution to my particular problem
            ended being to simply plug my USB key into a cheap unpowered USB 
            hub and then into the DNS-323.  If I plugged my USB key directly 
            in, the DNS-323 would sometimes not see the key.  The symptoms
            for this problem vary a lot, so be sure to try a powered or 
            unpowered hub if things aren't going well.  For more 
            suggestions and discussion, see the following Wiki posts:
            
        
 
        - View the devices/partitions now present on your DNS-323.
            Take note of the last device in the list and make sure it is a 
            new device compared with what you saw before loading 
            usb-storage.ko.
            
cat /proc/partitions
         
        - Decide which device is your newly-attached USB device.  
            It is VERY IMPORTANT to pick the correct device to format
            in this step!  Here's some hints to help you choose:
            
        
 
        - When you are sure which device to format, you 
            may continue.  Ignore the single-digit number at the end, so 
            if your new device is sdc1 just use sdc for the
            next step.
 
        - Repartition the USB device for ext2.  Run the following command, 
            substituting in the correct device name in place of sdc:
            
fdisk /dev/sdc
         
        - Complete the following progression of commands within 
            fdisk:
            
Command (m for help):d {enter}
Selected partition 1
Command (m for help):n {enter}
Command action
   e  extended
   p  primary partition (1-4)
p {enter}
Partition number (1-4):1 {enter}
First cylinder (1-63, default 1): {press enter}
Using default value 1
Last cylinder or ... (1-63, default 63): {press enter}
Using default value 63
         
        - Now verify that all went well by printing out the partition 
            details (still within fdisk):
            
Command (m for help): p {enter}
Disk /dev/sdc: 522 MB, 522878976 bytes
255 heads, 63 sectors/track, 63 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot Start End Blocks Id System
/dev/sdc1          1  63 506016 83 Linux
         
        - When you're done with fdisk, use the w
            command:
            
Command (m for help): w {enter}
The partition table has been altered!
Calling ioctl() to re-read partition table
         
        - Now complete the format (note that you add the "1" back into the
            device name for this step):
            
mke2fs /dev/sdc1
         
        - If you want to access your ext2-formatted USB device from a 
            Windows PC, install 
            ext2fsd
 
        - If you need more tips, visit this 
            tutorial
            that covers the same steps for formatting a USB device with 
            ext2.
 
      
   
  - Set some shell variables with your desired directory structure.  You
      may change these values if you like, but the paths listed in this step
      have been hard-coded into the busybox and fun_plug.tar
      you've already downloaded.  If you wish to use different directories,
      perform a binary string replacement in those two files and change
      the ffp-on-usb.sh and fun_plug.usb_1 scripts to 
      match your preferences.
      
USBMOUNT="/mnt/usb_1"
USBDRIVERLOC="${VOL1}/usbboot/driver"
USBDRIVERLOCFROMVOL1="${VOL1}/usbboot"
   
  - Copy the USB drivers to the proper location on the first disk drive
      so that they can be loaded automatically by fun_plug each 
      time the DNS-323 boots up:
      
mkdir -p "${USBDRIVERLOC}"
mv "${VOL1}/usb-storage.ko" "${USBDRIVERLOC}"
mv "${VOL1}/ffp-on-usb.sh" "${USBDRIVERLOC}"
chmod -R 0777 "${USBDRIVERLOCFROMVOL1}"
mv "${VOL1}/busybox.usbboot-driver" "${USBDRIVERLOC}"
chown root.root "${USBDRIVERLOC}/busybox.usbboot-driver"
chmod 0755 "${USBDRIVERLOC}/busybox.usbboot-driver"
chmod u+s "${USBDRIVERLOC}/busybox.usbboot-driver"
   
  - Change the fun_plug to make the DNS-323 to boot from the USB 
      device and setup fun_plug.d/:
      
mv "${VOL1}/fun_plug" "${VOL1}/fun_plug_old"
mv "${VOL1}/fun_plug.usb_1" "${VOL1}/fun_plug"
mv "${VOL1}/fun_plug.0.3.usb_1.tar" "${VOL1}/fun_plug.tar"
   
  - And finally reboot your DNS-323 using its web 
      interface.  If you set up your DNS-323 according to the instructions
      in Step 1, then your DNS-323 admin
      page would be http://192.168.1.200/.
      After logging in, click on the "TOOLS" tab at the top, then the 
      "SYSTEM" item along the left side, then on the "Restart" button.
 
  - You should see your USB device accessed during the reboot which might 
      take several minutes while the fun_plug.d/ directory structure
      is built on the USB device.  To verify the USB device is running 
      the system do the following steps in a new telnet window to the DNS-323:
      
ls -al /mnt/HD_a2/usbboot
   (look for item named "data -> /mnt/usb_1")
ls -al /mnt
   (look for item named "usb_1")
ls -al /mnt/usb_1
   (look for item named "fun_plug.d")
   
  - One last small modification will help ensure BackupNetClone runs 
      successfully from the USB device.  Modify the following file using 
      vi on the DNS-323 or 
      from the shared folder.  The file can be located at any of the 
      following paths:
      
        - /mnt/HD_a2/usbboot/data/fun_plug.d/etc/profile
 
        - /mnt/usb_1/fun_plug.d/etc/profile
 
        - Volume_1\usbboot\data\fun_plug.d\etc\profile
 
      
      For example, to change the file from a telnet/SSH session on the 
      DNS-323, type the following:
      vi /mnt/usb_1/fun_plug.d/etc/profile
      The file needs one line changed.  To perform the appropriate 
      change after having opened the profile file in 
      vi as done in the above command, use the following key strokes:
      (down arrow)
(down arrow)
(down arrow)
i
# (the hash/pound character)
(escape key)
o (the letter "oh")
export FUNPLUGDIR=/mnt/usb_1/fun_plug.d
(escape key)
: (colon character)
w
q
(enter key)
   
  - Congratulations!  You've changed the DNS-323 to run 
      add-ons from a USB device and can move on to the 
      next step.
 
  - For more help or information, visit the following links:
    
  
 
Benjamin L. Brown, released to the Public Domain.