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

Re: [nslu2-linux] Re: Changing default IP address after openSlug?

Expand Messages
  • Rod Whitby
    ... You can t change the redboot ip address without modifying and rewriting the boot loader. I would *strongly* advise against doing this - you will need to
    Message 1 of 9 , Sep 30, 2005
    View Source
    • 0 Attachment
      On 10/1/05, wtkrein <todd@...> wrote:
      Yup, tried that, but it keeps getting lost. Somewhere in the flash
      the old Linksys address is written, and I can't seem to change it.
       
      You can't change the redboot ip address without modifying and rewriting the boot loader.  I would *strongly* advise against doing this - you will need to have verified JTAG access before you even think about it.
       
      If you use "reflash -i" to flash a new kernel from OpenSlug, then it will retain your network settings.
       
      -- Rod

       
    • John Bowler
      From: wtkrein ... Doctor s orders... don t do that. Use reflash - it will preserve the IP you enter with turnup init. ... TANSTAFL. You zapped the (flash
      Message 2 of 9 , Sep 30, 2005
      View Source
      • 0 Attachment
        From: wtkrein
        > > IP address was changed via the linksys software.
        > >
        > > I've now put openSlug on it here at work, and I'm getting tired (as is
        > > the IT department) of having it revert to a useless IP address when I
        > > boot into redboot/flash the kernel/etc. The linksys software doesn't
        > > work anymore.

        Doctor's orders... don't do that. Use reflash - it will preserve the IP
        you enter with turnup init.

        If you can and must use upslug, or upslug2, or redboot then:

        > > Anyone know how to change that hardwired address from
        > > redboot/openSLug/openDebianSLug?
        >
        > turnup init

        TANSTAFL.

        You zapped the (flash file system) config, you must restore it. If you
        expect openslug to restore it from the LinkSys flash config (which is in the
        partition /dev/mtdblock1) then you are in tricky territory - it's definately
        on my to do list to be able to 'preserve' the turnup init config back into
        SysConf (aka /dev/mtdblock1), but at present the immediately preceding item
        on that todo list is "learn to be sympathetic".

        >Yup, tried that, but it keeps getting lost. Somewhere in the flash
        >the old Linksys address is written, and I can't seem to change it.

        Ah, ok - that's fine, I hadn't realised you were volunteering to write
        "turnup preserve". Congratulations.

        It's really quite simple:

        1) Examine /etc/init.d/sysconfsetup, you will probably need to look at
        /etc/default/functions too but the important lines are the devio ones.
        2) You probably need to read the devio manual. Writing it is actually on my
        todo list above "learn to be sympathetic" - for the moment see
        http://devio.sourceforge.net/devio-manual/index.htm - most of the time it
        says 'use devio -h'.
        3) Notice that the devio fixes up the contents of /dev/mtdblock1 and will
        also (under rare circumstances - specifically if you never booted the NSLU2
        before flashing openslug) read the ethernet id from its real location.
        4) Take a look at what does and does not get read from SysConf during the
        boot - that's *all* you need to preserve. Now look at /etc/default/sysconf
        after a turnup init - it should *just* contain the settings which need to be
        preserved (I'm not absolutely sure about this).
        5) If you write the minimalist /etc/default/sysconf back into /dev/mtdblock1
        (using devio, so that you can trivially precede it with the 4 byte big
        endian length) then you will have done what you want (UNTESTED!)
        6) Write "turnup preserve" to do just that.

        That's pretty much a step-by-step guide to how to do it. Here is an
        untested UNTESTED untested devio command which I THINK BUT MAKE ABSOLUTELY
        NO GUARANTEE does this in one step:

        echo "I am about to execute an untested command"
        cat /proc/mtd
        echo "I have made sure that /dev/mtdblock1 really is the SysConf partition"
        devio '>>/dev/mtdblock1;<</etc/default/sysconf;wb$4;cp$'

        If you damage SysConf then use the 'reset SysConf' stuff from the wiki to
        zap it.

        John Bowler <jbowler@...>
      • wtkrein
        Eek! Is that what the linksys software is doing? I wonder how many bricks they got back because someone acidentially nudged the power while changing the
        Message 3 of 9 , Sep 30, 2005
        View Source
        • 0 Attachment
          Eek! Is that what the linksys software is doing? I wonder how many
          bricks they got back because someone acidentially nudged the power
          while changing the settings.

          I suppose I could reload the linksys code, change the address, and
          reflash openslug. Seems like the safest route.


          Thanks for all the info (on all of my questions!)
          --- In nslu2-linux@yahoogroups.com, Rod Whitby <list.nslu2-
          linux@r...> wrote:
          > On 10/1/05, wtkrein <todd@k...> wrote:
          > >
          > > Yup, tried that, but it keeps getting lost. Somewhere in the
          flash
          > > the old Linksys address is written, and I can't seem to change
          it.
          >
          > You can't change the redboot ip address without modifying and
          rewriting the
          > boot loader. I would *strongly* advise against doing this - you
          will need to
          > have verified JTAG access before you even think about it.
          > If you use "reflash -i" to flash a new kernel from OpenSlug, then
          it will
          > retain your network settings.
          > -- Rod
        • wtkrein
          Hey, I like a challange... Good chance to learn, too. (Hell, I just got LAM/MPI running on the slug. Does that make it a slug farm? And being a glutton for
          Message 4 of 9 , Sep 30, 2005
          View Source
          • 0 Attachment
            Hey, I like a challange... Good chance to learn, too.
            (Hell, I just got LAM/MPI running on the slug. Does that make it a
            slug farm? And being a glutton for punishment, I build it native.)

            The problem is that in the last day I've twice managed to get the
            slug into a state where I had to reflash openSLug to get anything
            useful out of it. In one case, I accidentally hit the power button
            in the middle of a compile, and the thing would just never reboot.
            (The disk looked fine on another slug, and I couldn't SSH into any
            of the expected addresses, save redboot.)

            The other was, I think, when I pressed on the battery during a turbo-
            slugification. I must have blown some config away, and reflashing
            was the only thing that saved me.

            Since I seem to be good at this sort of damage, I figured I might as
            well save myself the hassle of resetting my FC2 network interface a
            bunch of times (which was pissing off the IT guy who kept seeing
            wierd behaviour.)


            I'll take a peek at this next week, and if it doesn't make my brain
            bleed, I'll try to pay back the group with a little work...

            --- In nslu2-linux@yahoogroups.com, John Bowler <jbowler@a...> wrote:
            > From: wtkrein
            > > > IP address was changed via the linksys software.
            > > >
            > > > I've now put openSlug on it here at work, and I'm getting
            tired (as is
            > > > the IT department) of having it revert to a useless IP address
            when I
            > > > boot into redboot/flash the kernel/etc. The linksys software
            doesn't
            > > > work anymore.
            >
            > Doctor's orders... don't do that. Use reflash - it will preserve
            the IP
            > you enter with turnup init.
            >
            > If you can and must use upslug, or upslug2, or redboot then:
            >
            > > > Anyone know how to change that hardwired address from
            > > > redboot/openSLug/openDebianSLug?
            > >
            > > turnup init
            >
            > TANSTAFL.
            >
            > You zapped the (flash file system) config, you must restore it.
            If you
            > expect openslug to restore it from the LinkSys flash config (which
            is in the
            > partition /dev/mtdblock1) then you are in tricky territory - it's
            definately
            > on my to do list to be able to 'preserve' the turnup init config
            back into
            > SysConf (aka /dev/mtdblock1), but at present the immediately
            preceding item
            > on that todo list is "learn to be sympathetic".
            >
            > >Yup, tried that, but it keeps getting lost. Somewhere in the flash
            > >the old Linksys address is written, and I can't seem to change it.
            >
            > Ah, ok - that's fine, I hadn't realised you were volunteering to
            write
            > "turnup preserve". Congratulations.
            >
            > It's really quite simple:
            >
            > 1) Examine /etc/init.d/sysconfsetup, you will probably need to
            look at
            > /etc/default/functions too but the important lines are the devio
            ones.
            > 2) You probably need to read the devio manual. Writing it is
            actually on my
            > todo list above "learn to be sympathetic" - for the moment see
            > http://devio.sourceforge.net/devio-manual/index.htm - most of the
            time it
            > says 'use devio -h'.
            > 3) Notice that the devio fixes up the contents of /dev/mtdblock1
            and will
            > also (under rare circumstances - specifically if you never booted
            the NSLU2
            > before flashing openslug) read the ethernet id from its real
            location.
            > 4) Take a look at what does and does not get read from SysConf
            during the
            > boot - that's *all* you need to preserve. Now look
            at /etc/default/sysconf
            > after a turnup init - it should *just* contain the settings which
            need to be
            > preserved (I'm not absolutely sure about this).
            > 5) If you write the minimalist /etc/default/sysconf back
            into /dev/mtdblock1
            > (using devio, so that you can trivially precede it with the 4 byte
            big
            > endian length) then you will have done what you want (UNTESTED!)
            > 6) Write "turnup preserve" to do just that.
            >
            > That's pretty much a step-by-step guide to how to do it. Here is
            an
            > untested UNTESTED untested devio command which I THINK BUT MAKE
            ABSOLUTELY
            > NO GUARANTEE does this in one step:
            >
            > echo "I am about to execute an untested command"
            > cat /proc/mtd
            > echo "I have made sure that /dev/mtdblock1 really is the SysConf
            partition"
            > devio '>>/dev/mtdblock1;<</etc/default/sysconf;wb$4;cp$'
            >
            > If you damage SysConf then use the 'reset SysConf' stuff from the
            wiki to
            > zap it.
            >
            > John Bowler <jbowler@a...>
          • John Bowler
            From: wtkrein ... And, of course, write it up on the wiki. This approach will work, but you need to test the effect of setting dhcp here. I think that will
            Message 5 of 9 , Sep 30, 2005
            View Source
            • 0 Attachment
              From: wtkrein
              >I suppose I could reload the linksys code, change the address, and
              >reflash openslug. Seems like the safest route.

              And, of course, write it up on the wiki.

              This approach will work, but you need to test the effect of setting 'dhcp'
              here. I think that will work also (because DHCP works in OpenSlug, and
              because that's how my SysConf was set for many months), but I haven't tested
              it.

              John Bowler <jbowler@...>
            • John Bowler
              From: wtkrein ... I think it s a pretty common occurence for any developer - particularly for anyone who changes the kernel. It s certainly common for me
              Message 6 of 9 , Sep 30, 2005
              View Source
              • 0 Attachment
                From: wtkrein
                >The problem is that in the last day I've twice managed to get the
                >slug into a state where I had to reflash openSLug to get anything
                >useful out of it.

                I think it's a pretty common occurence for any developer - particularly for
                anyone who changes the kernel. It's certainly common for me because I
                switch between openslug and ucslugc.

                So being able to 'freeze' the result of turnup init so it isn't necessary to
                run it each time would, in fact, be very useful. I *think* it is sufficient
                just to overwrite the SysConf plus a little hack to /etc/init.d/sysconfsetup
                to not set up the /etc/motd if this has been done (maybe a serial number in
                SysConf to say which sysconfsetup it was created from?)

                John Bowler <jbowler@...>
              Your message has been successfully submitted and would be delivered to recipients shortly.