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

Re: Help please. I'm going nuts here

Expand Messages
  • emm_is
    ... Yes, I too had this problem. There does seem to be an unresolved issue when using flash and HD (Openslug too). I solved it by forgoing the flash disc
    Message 1 of 12 , May 2, 2006
    • 0 Attachment
      > First off, let me make one thing clear: I know nothing about Linux.
      >
      > Two weeks ago I upgraded to unslung 6.8 and everything seemed to work
      > fine. Unsling to disk2 (a 512MB USB flash drive formatted by the slug).
      >
      > Plugged in a 250GB drive to port 1, formatted it in the slug, and
      > everything went well.

      Yes, I too had this problem. There does seem to be an unresolved issue
      when using flash and HD (Openslug too).

      I solved it by forgoing the flash disc (which is fine if you do not
      use NTFS). You can unsling to a HD and do not need to worry about
      messing up the disc (the unslung files are separate from your data) so
      in an emergency you can reflash with the LinkSys firmware and be up
      and accessing your data in ten minutes.

      As to spindown, if you follow the instructions on the wiki
      (setspindownformaxtor) and move /dev and /var to a ramdisc then so
      long as the disc spinsdown by default you will find the system is
      silent unless in use.
    • fjsc3
      Good points you made there. It s all clear now, after reading the Wiki again (had done it before unlsinging, but forgot about the small detail that the hdd
      Message 2 of 12 , May 2, 2006
      • 0 Attachment
        Good points you made there. It's all clear now, after reading the Wiki
        again (had done it before unlsinging, but forgot about the "small
        detail" that the hdd in port 1 couldn't be natively formatted.).

        Thanks for your help.


        --- In nslu2-linux@yahoogroups.com, "Mike \(mwester\)" <mwester@...>
        wrote:
        >
        > > Two weeks ago I upgraded to unslung 6.8 and everything seemed to work
        > > fine. Unsling to disk2 (a 512MB USB flash drive formatted by the
        slug).
        > >
        > > Plugged in a 250GB drive to port 1, formatted it in the slug, and
        > > everything went well.
        >
        > There's problem #1. As noted in the README as well as in the wiki
        (http://www.nslu2-linux.org/wiki/Unslung/WhichUSBPortforUnslung6), if
        you are going to have two natively-formatted devices on the NSLU2,
        then you should be unslinging to the first device.
        >
        > > ...
        >
        > > I then reflahed Unslung 6.8, re-formatted the flash drive (to start
        > > from scratch). This time, it worked fine with the flash drive (port
        > > 2). As soon as I plugged in the hdd into port1, the slug stopped
        > > recognizing both: it shows both as "not formatted", even though 1
        > > second before I connect the drive 1, the other one (unslinged usb
        > > stick) works fine.
        > > If I reboot and start with only disk2, it works well. Plug in disk 1
        > > and the same thing happens again (both "not formatted"). But I know
        > > hdd1 is good and well formatted.
        >
        > Yes. When you plug your disk1 in, since it was natively formatted,
        it contains certain critical configuration files for the slug. The
        slug always prefers to use the configuration information on disk 1
        over disk 2, even if you have unslung to the flash disk in disk 2.
        When you plug in disk 1, it switches over to disk 1 for this
        information, and abandons the perfectly valid information that might
        be on disk 2. Apparently the information on your disk 1 is not so
        very valid -- because as far as Linksys is concerned, the disk does
        not appear to be a valid natively formatted disk. But it does not
        revert to the perfectly good information on disk 2. So now, both
        disks show up as not formatted, and the slug is in a very bad state --
        it has no valid on-disk passwd, group, samba.conf, etc files.
        >
        > This odd cross-disk behaviour is specifically why the README and
        wiki recommend that if you have two natively-formatted disks on the
        slug, you MUST unsling to the one in port 1.
        >
        > Also note that you cannot hot-plug natively-formatted disks on the
        slug -- if you have a native disk, you must power-down to unplug it or
        plug it in, or risk having your slug crash, hang, or do other strange
        activity.
        >
        > Mike (mwester)
        >
      • Mr Doug -
        I am curious about the native definition. Does this apply to only drives formatted on the NSLU2? would a drive formated on a Linux system be considered
        Message 3 of 12 , May 2, 2006
        • 0 Attachment
          I am curious about the "native" definition. Does this apply to only drives
          formatted on the NSLU2? would a drive formated on a Linux system be considered
          native? If so I wonder if there is anything that could be done to make the
          NSLU2 think it was not. This is such a screwy limitation. I started off
          thinking I would only use one 'native' drive so I unslung it on port 2. Now I
          am reconsidering that. I see no reason to use NTFS. While it seemed a nice
          feature after using the NSLU2 for awhile it's appeal has gone away. So I guess
          I am now stuck unless I want to got through the process again.

          I assume the drive itself does not have any specific connection to a port -
          I.E. if a drive was unslung to port 2 it could be mounted on port 1 and work
          equally well assuming the changes were made in flash.

          I still like the flexibility of port 1 not being a system disk though. Being
          able to use a hub, etc. I really wish we could hack the code to change this
          bizarre port1/2 native behavior. I would not count on Linksys to do anything
          about it. I am surprised (but glad) it is still in their product line.

          Doug

          --- fjsc3 <fjsc3@...> wrote:

          > Good points you made there. It's all clear now, after reading the Wiki
          > again (had done it before unlsinging, but forgot about the "small
          > detail" that the hdd in port 1 couldn't be natively formatted.).
          >
          > Thanks for your help.
          >
          >
          > --- In nslu2-linux@yahoogroups.com, "Mike \(mwester\)" <mwester@...>
          > wrote:
          > >
          > > > Two weeks ago I upgraded to unslung 6.8 and everything seemed to work
          > > > fine. Unsling to disk2 (a 512MB USB flash drive formatted by the
          > slug).
          > > >
          > > > Plugged in a 250GB drive to port 1, formatted it in the slug, and
          > > > everything went well.
          > >
          > > There's problem #1. As noted in the README as well as in the wiki
          > (http://www.nslu2-linux.org/wiki/Unslung/WhichUSBPortforUnslung6), if
          > you are going to have two natively-formatted devices on the NSLU2,
          > then you should be unslinging to the first device.
          > >
          > > > ...
          > >
          > > > I then reflahed Unslung 6.8, re-formatted the flash drive (to start
          > > > from scratch). This time, it worked fine with the flash drive (port
          > > > 2). As soon as I plugged in the hdd into port1, the slug stopped
          > > > recognizing both: it shows both as "not formatted", even though 1
          > > > second before I connect the drive 1, the other one (unslinged usb
          > > > stick) works fine.
          > > > If I reboot and start with only disk2, it works well. Plug in disk 1
          > > > and the same thing happens again (both "not formatted"). But I know
          > > > hdd1 is good and well formatted.
          > >
          > > Yes. When you plug your disk1 in, since it was natively formatted,
          > it contains certain critical configuration files for the slug. The
          > slug always prefers to use the configuration information on disk 1
          > over disk 2, even if you have unslung to the flash disk in disk 2.
          > When you plug in disk 1, it switches over to disk 1 for this
          > information, and abandons the perfectly valid information that might
          > be on disk 2. Apparently the information on your disk 1 is not so
          > very valid -- because as far as Linksys is concerned, the disk does
          > not appear to be a valid natively formatted disk. But it does not
          > revert to the perfectly good information on disk 2. So now, both
          > disks show up as not formatted, and the slug is in a very bad state --
          > it has no valid on-disk passwd, group, samba.conf, etc files.
          > >
          > > This odd cross-disk behaviour is specifically why the README and
          > wiki recommend that if you have two natively-formatted disks on the
          > slug, you MUST unsling to the one in port 1.
          > >
          > > Also note that you cannot hot-plug natively-formatted disks on the
          > slug -- if you have a native disk, you must power-down to unplug it or
          > plug it in, or risk having your slug crash, hang, or do other strange
          > activity.
          > >
          > > Mike (mwester)
          > >
          >
          >
          >
          >
          >


          __________________________________________________
          Do You Yahoo!?
          Tired of spam? Yahoo! Mail has the best spam protection around
          http://mail.yahoo.com
        • Mike (mwester)
          ... NSLU2 think it was not. Yes, usually. The wiki has a few words about what natively formatted means. (Since this has certainly become a FAQ, it would be
          Message 4 of 12 , May 2, 2006
          • 0 Attachment
            > I am curious about the "native" definition. Does this apply to
            only
            > drives formatted on the NSLU2?
            > would a drive formated on a Linux system be considered
            > native?
            If so I wonder if there is anything that could be done to make the
            NSLU2 think it was not.
             
            Yes, usually.  The wiki has a few words about what "natively formatted" means. (Since this has certainly become a FAQ, it would be an ideal opportunity for someone to put the information in this email in a more appropriate or prominent place on the wiki...)
             
            ** The Natively-Formatted Device **
             
            A "natively-formatted" drive is a drive that is recognized as, well -- something unique to Linksys.  The closest I can come is to say that an NSLU2 with the Linksys firmware will recognize a "natively-formatted" drive like a "system drive".
             
            Such a drive has exactly three partitions.  The first is the data partition.  The second is the "conf" partition - it's usually around 128MB in size.  The third is a Linux swap partition, also about 128MB in size.  The first partition, the "data" partition is whatever space is left over when the other two are allocated.  This explains why you need at least a 256MB flash memory key to unsling -- anything smaller and you can't format it because there's no room.  (I'm really curious -- but I have no 256MB memory keys of my own -- exactly how much space is really left over when the Linksys utility tries to format one of those?  Could the difficulty some people have in getting their 256MB memory sticks formatted be simply that the "geometry" of their sticks is such that there's no space at all for the "data" partition - could it be so simple?)
             
            Ok, that covers the partitioning - next is the filesystem.  The first two partitions contain persistent filesystem data.  They need to be formatted with the "ext3" filesystem (which is the filesystem of choice for most Linux systems).  The third is swap, it doesn't need any filesystem on it, but it does need to be marked as a partition of type "swap" (usually done during the partitioning operation).
             
            Finally -- as if that isn't enough -- there's the initial content of the filesystems.  I don't know what the minimum required content is, that remains a challenge for someone to take on.  However, here's some of the stuff Linksys will write out to the filesystems on the disk during it's formatting operation:
             
             - on the "data" partition: the /public directory, and the quota files.
             - on the "conf" partition: the "passwd", "group", "backup_sh.conf", "server.log", "share.info", "smb.conf", "smbpasswd" and others.
             
            So, that's what a natively-formatted drive is: three partitions, two Linux ext3, one Linux swap -- the first one contains a directory /public, and a quota file, the second partition contains a number of pre-populated files, some of which (like the passwd file) are standard Linux files that we know the format and purpose of, others we do not.
             
            ** Using the Device **
             
            That's great, but what is all this used for?  Well, swap is easy -- the NSLU2 will use that for swap space.  It usually doesn't need it, but there are a few cases (most involving using the Linksys GUI while other things are going on) where it actually can run out of memory on a base system.  So the swap space is a Really Good Thing to have on any NSLU2.  The data partition is easy -- that's where the data is, of course.  The share "Admin 1" share maps to the entire data partition, the "Disk 1" share maps to the "/public" directory on that data partition.  If you create additional default-style shares, the Linksys GUI will create additional directories alongside the "/public" directory, and create the appropriate shares as well.
             
            Which gets to the whole problem of "housekeeping".  When you created those extra shares -- or heck, when you changed the password from the Linksys default (you didn't leave it, did you?  Please tell me you didn't leave it as "admin" and "admin"!), where does that get stored?
             
            Linksys puts that stuff on the "conf" partition.  That's what a lot of the files listed above are -- obvious examples include the "passwd" file and "group" files, which contain some of the security information.  Other of the files are not so obvious - they are Linksys-proprietary files, but with effort, someone could figure out what each one does.  In terms of how the files get used, well, that depends: some of them seem to be used by the Linksys utilities directly -- of course, they know to go to find them on the "conf" partition.  But things like the "passwd" file are Linux utilities, and Linux expects to see them in very specific places.  Linksys solves this problem by using symbolic links -- in place of the "passwd" file in the /etc directory, Linksys places a symbolic link that points over to the file on the "conf" partition.  It works.  Mostly.  Basically the problem is that some Linux utilities don't expect symbolic links, and don't behave just right.  Linksys makes sure it works in their firmware, though.
             
            ** Detecting the Disk **
             
            There's clearly a lot that can go wrong.  For good or for bad, Linksys does a number of checks before it just mounts the disk and lets you use it.  Basically, it will first detect the drive:
            ? Does it have at least three (non-extended) partitions?
            ? Are the first two ext3, and the third Linux swap?
            ? Can the first two be mounted on /mnt/tmpmnt/data and /mnt/tmpmnt/conf?
            ? If the flags say the disk needs to be fsck'd, does the fsck eventually return marking the filesystem clean?
            ? Do the partitions have what appear to be the correct files in the right places to be useable?
            If the answer to the above is all "yes", then the partitions are unmounted, and remounted in their correct place (/share/disk... or /share/flash... depending on the USB port into which they are plugged).  And then the Linksys code goes along and tweaks all the right stuff: the /etc/passwd file (which you may have labored long and hard editing to make it just so) will be replaced by a symbolic link to the new passwd file on the "conf" partition just mounted, etc.  The right entries are written to the samba config files, and the right processes are restarted so that everything just pops up with all the right stuff.
             
            It's quite the intricate mechanism.
             
            When it goes wrong, there's no indication from Linksys as to what failed.  You'll just see the drive mounted for a second, then it will vanish. In the Web GUI it will show up as present but not formatted.  Frustrating.  And a great challenge for someone in our community here -- a utility that checks all the same things the Linksys tools checks, with the ability to fix up some of them would be a very useful gadget indeed.
             
            ** Multiple disks and disk device soup ***
             
            The NSLU can support multiple drives.  If the disk is in USB Port 1, then it is seen by the kernel as /dev/sdb (SCSI Disk B), and mounted on /share/hdd/data and /share/hdd/conf.  Seems odd, because with this strange logic then, a disk in USB Port 2 should be drive "A", right?  Only if you think like Escher.  But that's what Linksys did with the R63 firmware.  It gets even better: consider that USB Port 1 is the only port that can handle multi-LUN devices (like those 7-in-one flash-memory card readers).  The implication there is that Port 1 is the best place for flash disk devices.  So, that same backwards logic holds true:  Port 1 is (illogically) mounted in /share/hdd/... and Port 2 -- which is usually the place to plug a disk drive, is mounted on /share/flash...   Does your head hurt yet?  Mine does.
             
            But wait!  There's more!
             
            What happens if there's actually TWO conf partitions?  This happens if you have two natively-formatted devices - a fairly common thing to have, actually.  Clearly there can be only one in use at a time.  But which one?
             
            I'm going to skip a lot of mind-bending detail here, because I don't quite understand it all and I'd have to go back to my notes anyway.  The point is that if you boot the NSLU2 with a natively-formatted disk in USB Port 1, it will use that for the conf partition.  In fact, it will mount that disk's conf partition twice -- once on the /share/hdd/conf and once on /share/flash/conf.  The contents of the conf partition on the disk in USB port 2 will simply be unavailable.
             
            As long as this remains static, Unslung is actually pretty OK with it.  But one massive potential problem is if a new natively-formatted disk is introduced while Unslung is running.  Don't do that.  It will break.  Just plugging a new drive, natively formatted, into USB Port 1 while Unslung is running will pretty much destabilize your NSLU2 to the point where a reboot is advised.  An interesting other case is that of formatting a drive: consider the frustrated user of an NTFS disk in USB Port 1 -- tired of the limitations, he goes to the Linksys WEB GUI, and formats that drive instead.  As soon as the format is complete, the now natively-formatted drive is detected, and as far as the device is concerned, it's a lot like a new disk being plugged in - the new disk will conceal the original "conf" partition and all the customized in-use configuration files, and replace them with the new ones.  The NSLU2 may or may not remain running for long.
             
            I'll bet that's more detail than most ever wanted to know... but I sure hope someone that finds this useful will take the time to put the information on the wiki -- the whole idea is that if those asking the questions put the answers in the wiki, it's far more likely to be in the correct place and in the correct form than if the development team does so!
             
             
            Mike (mwester)
             
             
             
          • Mr Doug -
            Well from what you said a drive formatted as one partitiion EXT3 on a linux system, no swap, would not be considered native. Is this correct? Has anyone tried
            Message 5 of 12 , May 2, 2006
            • 0 Attachment
              Well from what you said a drive formatted as one partitiion EXT3 on a linux
              system, no swap, would not be considered native. Is this correct? Has anyone
              tried this?

              Doug



              __________________________________________________
              Do You Yahoo!?
              Tired of spam? Yahoo! Mail has the best spam protection around
              http://mail.yahoo.com
            • emm_is
              ... a linux ... Has anyone ... it will not be native. As previously mentioned it needs the first two partitions to be ext3 and the next partition to be linux
              Message 6 of 12 , May 3, 2006
              • 0 Attachment
                --- In nslu2-linux@yahoogroups.com, Mr Doug - <dsc3507@...> wrote:
                >
                > Well from what you said a drive formatted as one partitiion EXT3 on
                a linux
                > system, no swap, would not be considered native. Is this correct?
                Has anyone
                > tried this?

                it will not be native. As previously mentioned it needs the first two
                partitions to be ext3 and the next partition to be linux swap. Of
                course, you can do just that on a linux system, though there would
                then be the matter of getting the conf files onto the second partition
                (the HowTo on using small flash discs helps here).

                E
              • Mr Doug -
                I guess my point here is I don t want it to be native. I don t want the NSLU2 to put anything system there. Could you not manually mount a non-native EXT3
                Message 7 of 12 , May 3, 2006
                • 0 Attachment
                  I guess my point here is I don't want it to be native. I don't want the NSLU2
                  to put anything system there. Could you not manually mount a non-native EXT3
                  drive to port 1 ???

                  The whole point is that port 1 is the flexible port. The logical port to put
                  the system on is port 2. The fact that it "prefers" port 1 is the problem.

                  Do the Openslug projects have this same problem? Is the multiple port 1 /
                  single port 2 a software or hardware issue?

                  Doug

                  --- emm_is <emm_is@...> wrote:

                  > --- In nslu2-linux@yahoogroups.com, Mr Doug - <dsc3507@...> wrote:
                  > >
                  > > Well from what you said a drive formatted as one partitiion EXT3 on
                  > a linux
                  > > system, no swap, would not be considered native. Is this correct?
                  > Has anyone
                  > > tried this?
                  >
                  > it will not be native. As previously mentioned it needs the first two
                  > partitions to be ext3 and the next partition to be linux swap. Of
                  > course, you can do just that on a linux system, though there would
                  > then be the matter of getting the conf files onto the second partition
                  > (the HowTo on using small flash discs helps here).
                  >
                  > E
                  >
                  >
                  >
                  >


                  __________________________________________________
                  Do You Yahoo!?
                  Tired of spam? Yahoo! Mail has the best spam protection around
                  http://mail.yahoo.com
                • emm_is
                  ... the NSLU2 ... non-native EXT3 ... yes, on openslug or unslung, mount /dev/sdXN /mnt/here You may want to put this in a startup script (safer for unslung)
                  Message 8 of 12 , May 3, 2006
                  • 0 Attachment
                    --- In nslu2-linux@yahoogroups.com, Mr Doug - <dsc3507@...> wrote:
                    >
                    > I guess my point here is I don't want it to be native. I don't want
                    the NSLU2
                    > to put anything system there. Could you not manually mount a
                    non-native EXT3
                    > drive to port 1 ???

                    yes, on openslug or unslung,

                    mount /dev/sdXN /mnt/here

                    You may want to put this in a startup script (safer for unslung) or
                    /etc/fstab
                  • Mr Doug -
                    ok, So you can mount a non-native EXT3 drive on USB1. Then this solves the problem of having to use an NTFS drive there. All you need is a another Linux
                    Message 9 of 12 , May 3, 2006
                    • 0 Attachment
                      ok, So you can mount a 'non-native' EXT3 drive on USB1. Then this solves the
                      problem of having to use an NTFS drive there. All you need is a another Linux
                      system to partition and format the drive. I assume these tasks cannot be
                      accomplished in unslug from a command window?

                      So would this all being true would it not be better to (almost) always use port
                      2 as the 'native' system disk and use port 1 for multiple devices, including
                      linux (non-native) formatted disks?

                      Doug

                      --- emm_is <emm_is@...> wrote:

                      > --- In nslu2-linux@yahoogroups.com, Mr Doug - <dsc3507@...> wrote:
                      > >
                      > > I guess my point here is I don't want it to be native. I don't want
                      > the NSLU2
                      > > to put anything system there. Could you not manually mount a
                      > non-native EXT3
                      > > drive to port 1 ???
                      >
                      > yes, on openslug or unslung,
                      >
                      > mount /dev/sdXN /mnt/here
                      >
                      > You may want to put this in a startup script (safer for unslung) or
                      > /etc/fstab
                      >
                      >
                      >
                      >
                      >
                      >
                      >


                      __________________________________________________
                      Do You Yahoo!?
                      Tired of spam? Yahoo! Mail has the best spam protection around
                      http://mail.yahoo.com
                    • Mike (mwester)
                      You can do it on the local NSLU2. The fdisk utility is crippled as provided by Linksys. Install busybox-base and use /opt/bin/busybox fdisk instead.
                      Message 10 of 12 , May 3, 2006
                      • 0 Attachment
                        You can do it on the local NSLU2.  The "fdisk" utility is crippled as provided by Linksys.  Install "busybox-base" and use "/opt/bin/busybox fdisk" instead.  The "mkfs.ext3" command (I think that's the name) has been accused of having problems, but it works well enough for Linksys, so that too is available on the command line.
                         
                        Would it be better to use port 2 as the "native" system disk?  Yes!  That's precisely the message the wiki articles are trying to point out -- the exception being if you have, or ever will have, two "native" devices, then you should use port 1.  :-)  Help us out here - can you edit the wiki to make the information more clear or helpful?  One of the big problems with having those close to the development and QA do the documentation is that it's perfectly clear to them when they write it because they're so familiar with the stuff.  It's so much more helpful if the wiki can be written or rewritten (as the case may be) by those who are new to it, or are asking the questions...
                         
                        Thanks!
                        Mike (mwester)
                        ----- Original Message -----
                        From: Mr Doug -
                        Sent: Wednesday, May 03, 2006 12:01 PM
                        Subject: Re: [nslu2-linux] Re: Help please. I'm going nuts here

                        ok, So you can mount a 'non-native' EXT3 drive on USB1. Then this solves the
                        problem of having to use an NTFS drive there. All you need is a another Linux
                        system to partition and format the drive. I assume these tasks cannot be
                        accomplished in unslug from a command window?

                        So would this all being true would it not be better to (almost) always use port
                        2 as the 'native' system disk and use port 1 for multiple devices, including
                        linux (non-native) formatted disks?

                        Doug
                      Your message has been successfully submitted and would be delivered to recipients shortly.