Loading ...
Sorry, an error occurred while loading the content.

Re: Backup on openWrt

Expand Messages
  • lance_benson
    Ok, Rod, thanks for your suggestions. The following works for me (I don t know if the mount r/o and remounts are needed--still awaiting feedback--and do I
    Message 1 of 12 , Jan 3, 2009
    • 0 Attachment
      Ok, Rod, thanks for your suggestions. The following works for me (I
      don't know if the mount r/o and remounts are needed--still awaiting
      feedback--and do I have them specified right; should there be no
      slash before the "4"?):

      mount -o remount,ro /dev/mtdblock/4 /jffs
      dd if=/dev/mtdblock0 > /tmp/NSLU2C_image.bin
      dd if=/dev/mtdblock1 >> /tmp/NSLU2C_image.bin
      dd if=/dev/mtdblock2 >> /tmp/NSLU2C_image.bin
      dd if=/dev/mtdblock3 >> /tmp/NSLU2C_image.bin
      dd if=/dev/mtdblock4 >> /tmp/NSLU2C_image.bin
      dd if=/dev/mtdblock6 >> /tmp/NSLU2C_image.bin
      mount -o remount,rw /dev/mtdblock/4 /jffs

      This produces a file in tmp, NSLU2C_image.bin, which is 8388608 bytes
      long, the size of the image which is flashed into the NSLU2. Note
      that the dds omit mtdblock5, which is a subset of mtdblock4.

      Now how to get this file back on my Windows PC. There is probably a
      simpler way, but I don't know it. I made the file available over
      http by running this:

      /usr/sbin/httpd -p 82 -h /tmp -c /etc/httpd.conf

      which makes port 82 available with the home directory of /tmp. My
      httpd.conf does not specify a password.

      Then from the PC I ran this PHP program (php must be available).

      <?php // GetNSimg.php gets NSLU2 openWrt firmware image file
      $Geturl = "http://192.168.1.77:82/NSLU2C_image.bin";
      $A = file_get_contents($Geturl);
      $fh = fopen("NSLU2C_image.bin", 'w') or die("Can't open file");
      fwrite($fh,$A);
      fclose($fh);
      ?>

      I then successfully flashed this image (using the Sercomm upgrade
      utility) onto a new NSLU2 for which I had not been able to find the
      IP address. I was able to access this NSLU2, change the ip address,
      and voila, a cloned openWrt 7.09 slug.

      I will update the wiki.
    • lance_benson
      I m ready to add the following page to the wiki, and a link from the openwrt homepage in the wiki, but I don t see how to add a new page. If someone can tell
      Message 2 of 12 , Jan 3, 2009
      • 0 Attachment
        I'm ready to add the following page to the wiki, and a link from the
        openwrt homepage in the wiki, but I don't see how to add a new page.
        If someone can tell me how to add a page, I'll also add a page
        telling how to add a page.

        Backup openWrt Kamikazi 7.09 flash

        ! Backup Flash on NSLU2 running openWrt Kamikazi 7.09

        Prepared Jan 3, 2009

        After advice from Rod Whitby this works to produce a backup of the
        flash which can be reflashed onto another (or the same) NSLU2 (no
        external device on this slug):

        dd if=/dev/mtdblock0 > /tmp/NSLU2C_image.bin
        dd if=/dev/mtdblock1 >> /tmp/NSLU2C_image.bin
        dd if=/dev/mtdblock2 >> /tmp/NSLU2C_image.bin
        dd if=/dev/mtdblock3 >> /tmp/NSLU2C_image.bin
        dd if=/dev/mtdblock4 >> /tmp/NSLU2C_image.bin
        dd if=/dev/mtdblock6 >> /tmp/NSLU2C_image.bin

        This produces a file in tmp, NSLU2C_image.bin, which is 8388608 bytes
        long, the size of the image which is flashed into the NSLU2. Note
        that the dds omit mtdblock5, which is a subset of mtdblock4--leaving
        it in produces an image which is too large.

        Now how to get this file back on a Windows PC. There is probably a
        simpler way, but you can made the file available over http by running
        this:

        /usr/sbin/httpd -p 82 -h /tmp -c /etc/httpd.conf

        which makes port 82 available with the home directory of /tmp. This
        httpd.conf does not specify a password.

        Then from the PC you can run this PHP program (php must be available).

        <?php // GetNSimg.php gets NSLU2 openWrt firmware image file
        $Geturl = "http://192.168.1.77:82/NSLU2C_image.bin";
        $A = file_get_contents($Geturl);
        $fh = fopen("NSLU2C_image.bin", 'w') or die("Can't open file");
        fwrite($fh,$A);
        fclose($fh);
        ?>

        This image can then successfully be flashed (using the Sercomm
        upgrade utility) onto a new NSLU2. You can access this NSLU2, change
        the ip address, and voila, a cloned openWrt 7.09 slug.
      • Rod Whitby
        ... The remount as ro is definitely a good idea, in case the jffs2 changes while copying. ... WinSCP. ... Thanks. -- Rod
        Message 3 of 12 , Jan 3, 2009
        • 0 Attachment
          lance_benson wrote:
          > Ok, Rod, thanks for your suggestions. The following works for me (I
          > don't know if the mount r/o and remounts are needed--still awaiting
          > feedback--and do I have them specified right; should there be no
          > slash before the "4"?):
          >
          > mount -o remount,ro /dev/mtdblock/4 /jffs
          > dd if=/dev/mtdblock0 > /tmp/NSLU2C_image.bin
          > dd if=/dev/mtdblock1 >> /tmp/NSLU2C_image.bin
          > dd if=/dev/mtdblock2 >> /tmp/NSLU2C_image.bin
          > dd if=/dev/mtdblock3 >> /tmp/NSLU2C_image.bin
          > dd if=/dev/mtdblock4 >> /tmp/NSLU2C_image.bin
          > dd if=/dev/mtdblock6 >> /tmp/NSLU2C_image.bin
          > mount -o remount,rw /dev/mtdblock/4 /jffs

          The remount as ro is definitely a good idea, in case the jffs2 changes
          while copying.

          > This produces a file in tmp, NSLU2C_image.bin, which is 8388608 bytes
          > long, the size of the image which is flashed into the NSLU2. Note
          > that the dds omit mtdblock5, which is a subset of mtdblock4.
          >
          > Now how to get this file back on my Windows PC. There is probably a
          > simpler way, but I don't know it.

          WinSCP.

          > I then successfully flashed this image (using the Sercomm upgrade
          > utility) onto a new NSLU2 for which I had not been able to find the
          > IP address. I was able to access this NSLU2, change the ip address,
          > and voila, a cloned openWrt 7.09 slug.
          >
          > I will update the wiki.

          Thanks.

          -- Rod
        • Rod Whitby
          ... Just type the name of the new page into the browser at the right place, and it will ask you if you want to start editing it. -- Rod
          Message 4 of 12 , Jan 3, 2009
          • 0 Attachment
            lance_benson wrote:
            > I'm ready to add the following page to the wiki, and a link from the
            > openwrt homepage in the wiki, but I don't see how to add a new page.
            > If someone can tell me how to add a page, I'll also add a page
            > telling how to add a page.

            Just type the name of the new page into the browser at the right place,
            and it will ask you if you want to start editing it.

            -- Rod
          • Rod Whitby
            ... Actually, can you please just add it to the existing backup page? There s no need to add a new page for it when there s an existing page on howto backup
            Message 5 of 12 , Jan 3, 2009
            • 0 Attachment
              lance_benson wrote:
              > I'm ready to add the following page to the wiki, and a link from the
              > openwrt homepage in the wiki, but I don't see how to add a new page.
              > If someone can tell me how to add a page, I'll also add a page
              > telling how to add a page.

              Actually, can you please just add it to the existing backup page?
              There's no need to add a new page for it when there's an existing page
              on howto backup the slug.

              -- Rod
            • lance_benson
              ... Done, here: http://www.nslu2-linux.org/wiki/HowTo/CompletelyBackupTheNSLU2 with links added to several other backup pages. One question: the letters
              Message 6 of 12 , Jan 3, 2009
              • 0 Attachment
                > Actually, can you please just add it to the existing backup page?

                Done, here:
                http://www.nslu2-linux.org/wiki/HowTo/CompletelyBackupTheNSLU2 with
                links added to several other backup pages. One question: the
                letters "NSLU2C" were underlined and followed by a guestion mark, with
                a link suggesting that a wiki page be added for this. I don't know why
                this was, or what to do about it.
              • reuter.rudolf
                ... wrote: One question: the ... Hello Lance, NSLU2C is interpreted as a wiki word. But that page does not exist. In order to remove that interpretation just
                Message 7 of 12 , Jan 3, 2009
                • 0 Attachment
                  --- In nslu2-linux@yahoogroups.com, "lance_benson" <lance_benson@...>
                  wrote:
                  One question: the
                  > letters "NSLU2C" were underlined and followed by a guestion mark, with
                  > a link suggesting that a wiki page be added for this. I don't know why
                  > this was, or what to do about it.
                  >
                  Hello Lance,
                  NSLU2C is interpreted as a wiki word. But that page does not exist. In
                  order to remove that interpretation just type [=NSLU2C=].
                  Please see also http://www.nslu2-linux.org/wiki/PmWiki/PmWiki
                  and http://www.nslu2-linux.org/wiki/PmWiki/MarkupMasterIndex
                  and search for "[=".
                  Greetings, Rudy
                • lance_benson
                  ... Thanks, Rudy. I figured out that it was making a link, and fixed it by changing it to lower case. But I didn t know about [= --thanks for that tip.
                  Message 8 of 12 , Jan 3, 2009
                  • 0 Attachment
                    > In order to remove that [wiki word] interpretation just
                    > type [=NSLU2C=].

                    Thanks, Rudy. I figured out that it was making a link, and fixed it by
                    changing it to lower case. But I didn't know about "[="--thanks for
                    that tip.
                  Your message has been successfully submitted and would be delivered to recipients shortly.