Overview Features Requirements Download Quick Start Installation FAQ History Philosophy Contact Project Page Donate

BackupNetClone Installation

<< Step 1 Step 2 >>

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.

  1. 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.
  2. 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:
    1. 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.
    2. 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
    3. Start the USB device driver on the DNS-323:
      insmod "${VOL1}/usb-storage.ko"
    4. Plug your USB device into the back port of the DNS-323.
    5. 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:
    6. 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
    7. 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:
      • Your newly-attached device should be listed last in the list.
      • Check the third column (#blocks). Make sure this value matches the number of KB on your USB device. For example, my 512MB USB key lists 510592 in this column.
      • The device name you're looking for is in the fourth column (name). It should start with the letters sd.
      • If you have one disk drive installed in the DNS-323, your new device name should be sdb or sdb1.
      • If you have two disk drives installed in the DNS-323, your new device name should be sdc or sdc1.
      • A command to automatically grab the last device name in the list (which should be correct 90% of the time) is:
        cat /proc/partitions | tail -n 1 | awk '{print $4}'
    8. 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.
    9. Repartition the USB device for ext2. Run the following command, substituting in the correct device name in place of sdc:
      fdisk /dev/sdc
    10. 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
    11. 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
    12. 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
    13. Now complete the format (note that you add the "1" back into the device name for this step):
      mke2fs /dev/sdc1
    14. If you want to access your ext2-formatted USB device from a Windows PC, install ext2fsd
    15. If you need more tips, visit this tutorial that covers the same steps for formatting a USB device with ext2.
  3. 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.
  4. 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"
  5. 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"
  6. 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 After logging in, click on the "TOOLS" tab at the top, then the "SYSTEM" item along the left side, then on the "Restart" button.
  7. 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")
  8. 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: 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)
    # (the hash/pound character)
    (escape key)
    o (the letter "oh")
    export FUNPLUGDIR=/mnt/usb_1/fun_plug.d
    (escape key)
    : (colon character)
    (enter key)
  9. Congratulations! You've changed the DNS-323 to run add-ons from a USB device and can move on to the next step.
  10. For more help or information, visit the following links:

<< Step 1 Step 2 >>

Benjamin L. Brown, released to the Public Domain.