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

OpenSlug + USB stick -- some questions

Expand Messages
  • lew1193
    I flashed OpenSlug-2.5-beta-firmware.zip with no difficulty, and had Linux up and running. It was nice to feel at home and find all the usual tools. I have
    Message 1 of 7 , Aug 31, 2005
    • 0 Attachment
      I flashed OpenSlug-2.5-beta-firmware.zip with no difficulty, and had
      Linux up and running. It was nice to feel at home and find all the
      usual tools. I have nearly twenty years of Unix, but unfortunately,
      not enough as sysadmin (and my copy of O'Reilly's "Essential System
      Administration" is 1996 vintage!). Still, I think I should manage.

      Some initial questions that came to mind. I did some browsing, but
      I'm still not fully oriented in the www.nslu2-linux.org pages.

      The openSlug image is about the same size as official LinkSys images.
      Yet it contains neither Samba nor HTTPD. Is this because, instead, it
      contains a whole lot of Unix tools? Ie, a more "general purpose"
      Linux?

      If all I initially wish to do is Samba (but with better control over
      the problems & config), which of the samba package do I want. ipkg
      list gives me a few.
      cifs - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
      + kernel-module-cifs - 2.6.12.2-r6 - cifs kernel module
      samba - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
      swat - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
      I presume "samba - 3.0.14a-r12" ?

      Is Samba with FAT drives to be avoided? Seems to cause network
      disconnections on stock Linksys F/W but also on opeNSLUg according
      to some messages here!?

      I started openSlug with a USB flash drive inserted. What amazed me
      is what fdisk returned (on Windows, I see only one FAT partition).


      Disk /dev/sda1: 513 MB, 513785856 bytes
      16 heads, 62 sectors/track, 1011 cylinders
      Units = cylinders of 992 * 512 = 507904 bytes

      Device Boot Start End Blocks Id System
      /dev/sda1p1 ? 1715725 3358383 814758329+ 74 Unknown
      Partition 1 has different physical/logical beginnings (non-Linux?):
      phys=(288, 110, 36) logical=(1715724, 6, 45)
      Partition 1 has different physical/logical endings:
      phys=(366, 104, 37) logical=(3358382, 5, 29)
      Partition 1 does not end on cylinder boundary.
      /dev/sda1p2 ? 1340912 1884235 269488144 65 Unknown
      Partition 2 has different physical/logical beginnings (non-Linux?):
      phys=(107, 121, 32) logical=(1340911, 7, 47)
      Partition 2 has different physical/logical endings:
      phys=(10, 121, 13) logical=(1884234, 5, 42)
      Partition 2 does not end on cylinder boundary.
      /dev/sda1p3 ? 543337 1952977 699181456 53 Unknown
      Partition 3 has different physical/logical beginnings (non-Linux?):
      phys=(345, 32, 19) logical=(543336, 1, 18)
      Partition 3 has different physical/logical endings:
      phys=(324, 77, 19) logical=(1952976, 1, 49)
      Partition 3 does not end on cylinder boundary.
      /dev/sda1p4 ? 3940644 3940710 32669+ bb Unknown
      Partition 4 has different physical/logical beginnings (non-Linux?):
      phys=(65, 1, 0) logical=(3940643, 11, 29)
      Partition 4 has different physical/logical endings:
      phys=(96, 0, 7) logical=(3940709, 9, 19)
      Partition 4 does not end on cylinder boundary.

      Partition table entries are not in disk order

      The partition info looks like total garbage?

      I'd like to (as a start) use a stick as memory drive. So do I just
      repartition it with fdisk, build the FS with mkfs, and so on?

      http://www.nslu2-linux.org/wiki/HowTo/UseAMemoryStickAsMainDrive
      writes:

      To wrap things up you'll have to make sure the slug doesn't use
      the tiny swapspace on the stick.

      Why is this a bad thing? USB sticks wear out?

      Tia,
      Pierre Lewis
    • Pierre Lewis
      Partially answering one of my own questions (I know, bad). My post came out as HTML, I guess I missed some option. Will be more careful next time. ... Or just
      Message 2 of 7 , Sep 1 3:52 AM
      • 0 Attachment
        Partially answering one of my own questions (I know, bad).
        My post came out as HTML, I guess I missed some option.
        Will be more careful next time.

        On Wed, Aug 31, 2005 at 11:35:15PM +0000, lew1193 wrote:

        > I'd like to (as a start) use a stick as memory drive. So do I just
        > repartition it with fdisk, build the FS with mkfs, and so on?

        Or just do "turnup memstick"? Anyway, I found some more info at
        http://www.nslu2-linux.org/wiki/OpenSlug/OpenSlugTurnUp .
        Still, the output of fdisk on the memstick makes me nervous.
        I'd rather not turn it into a light brick.

        > To wrap things up you'll have to make sure the slug doesn't use
        > the tiny swapspace on the stick.
        > Why is this a bad thing? USB sticks wear out?

        I guess it does. The number I had in mind was a million write
        cycles. I guess swap can consume this pretty fast. And even
        access times.

        Wrt memstick wear, do the numbers (100000 or whatever) apply
        to the device as a whole, or to each sector. In other words,
        does it matter if the write cycles are evenly distributed on
        the device as opposed to very localized (eg on a few sectors)?

        Thanks,
        Pierre
      • Jochen Rüter
        ... Maybe. But I think this doesn t really matter, because a slug without any disks attached is more or less worthless - either unslung or openslug. ... right.
        Message 3 of 7 , Sep 1 9:28 AM
        • 0 Attachment
          lew1193 schrieb:

          > I flashed OpenSlug-2.5-beta-firmware.zip with no difficulty, and had
          > Linux up and running. It was nice to feel at home and find all the
          > usual tools. I have nearly twenty years of Unix, but unfortunately,
          > not enough as sysadmin (and my copy of O'Reilly's "Essential System
          > Administration" is 1996 vintage!). Still, I think I should manage.
          >
          > Some initial questions that came to mind. I did some browsing, but
          > I'm still not fully oriented in the www.nslu2-linux.org pages.
          >
          > The openSlug image is about the same size as official LinkSys images.
          > Yet it contains neither Samba nor HTTPD. Is this because, instead, it
          > contains a whole lot of Unix tools? Ie, a more "general purpose"
          > Linux?

          Maybe. But I think this doesn't really matter, because a slug without
          any disks attached is more or less worthless - either unslung or openslug.

          >
          > If all I initially wish to do is Samba (but with better control over
          > the problems & config), which of the samba package do I want. ipkg
          > list gives me a few.
          > cifs - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
          > + kernel-module-cifs - 2.6.12.2-r6 - cifs kernel module
          > samba - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
          > swat - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
          > I presume "samba - 3.0.14a-r12" ?

          right. Swat is a web based configuration utility for samba,
          kernel-module... is self explaning i thing. what cifs is i don't know...

          >
          > Is Samba with FAT drives to be avoided? Seems to cause network
          > disconnections on stock Linksys F/W but also on opeNSLUg according
          > to some messages here!?

          Yes it is. You can't copy big files to FAT drives shared by samba
          (except if you do some samba hacking, but most people here think this
          isn't a good idea)

          > [snip fdisk...]
          >
          > The partition info looks like total garbage?

          The mistake is that you did a "fdisk -l /dev/sda1
          sda1 itself denotes already a partition, so you looked, which partitions
          are in your partition :).
          The correct command would be "fdisk -l /dev/sda, as sda denotes the drive.

          >
          > I'd like to (as a start) use a stick as memory drive. So do I just
          > repartition it with fdisk, build the FS with mkfs, and so on?

          It depends if you want to use unslung or openslug...

          >
          > http://www.nslu2-linux.org/wiki/HowTo/UseAMemoryStickAsMainDrive
          > writes:
          >
          > To wrap things up you'll have to make sure the slug doesn't use
          > the tiny swapspace on the stick.
          >
          > Why is this a bad thing? USB sticks wear out?

          Right. I think the number of writes is defined for each sector. So if
          only one sector gets written 1000000... ?? times, this one will
          (probably) get defect.

          Jochen
        • Pierre Lewis
          ... Vielen Dank für die Antworten... ... I m slowly coming to that conclusion too. Maybe it explains some of the headaches I had with stock Linksys F/W: too
          Message 4 of 7 , Sep 1 10:19 AM
          • 0 Attachment
            On Thu, Sep 01, 2005 at 06:28:07PM +0200, Jochen Rüter wrote:

            > lew1193 schrieb:

            Vielen Dank für die Antworten...

            > > The openSlug image is about the same size as official LinkSys images.
            > > Yet it contains neither Samba nor HTTPD. Is this because, instead, it
            > > contains a whole lot of Unix tools? Ie, a more "general purpose"
            > > Linux?
            >
            > Maybe. But I think this doesn't really matter, because a slug without
            > any disks attached is more or less worthless - either unslung or openslug.

            I'm slowly coming to that conclusion too. Maybe it explains some
            of the headaches I had with stock Linksys F/W: too many changes
            in disk configs. I hadn't realized that the F/W would use the
            disk for its root, I thought it was just for user data.

            > The mistake is that you did a "fdisk -l /dev/sda1

            A beginner's mistake! I've always found disk names a bit
            confusing. It looks much better with the correct command:

            Disk /dev/sda: 513 MB, 513802240 bytes
            16 heads, 32 sectors/track, 1960 cylinders
            Units = cylinders of 512 * 512 = 262144 bytes

            Device Boot Start End Blocks Id System
            /dev/sda1 * 1 1960 501744 e Win95 FAT16 (LBA)

            Now that makes perfect sense. Thanks!

            > > I'd like to (as a start) use a stick as memory drive. So do I just
            > > repartition it with fdisk, build the FS with mkfs, and so on?
            >
            > It depends if you want to use unslung or openslug...

            OpenSlug. So I can make a new (ext3) fs on /dev/sda without any
            big risk of zapping the device? Would I need a swap disk (in which
            case I guess I should avoid memsticks) for samba and thttpd?

            I think this NSLU2 is going to be a nice opportunity to get back
            into Linux (my last significant exposure is five years ago, ~
            RedHat 5 or so). I'm not sure whether it will be a memstick or a
            real disk yet. Not too many projects, but samba and thttpd for
            sure.

            One page mentioned that updating access times should also be
            turned off to conserve write cycles on memsticks. Haven't done
            any googling yet, but maybe someone has a quick URL.

            Tschüß (or maybe Adele?),
            Pierre
          • lew1193
            ... Thanks for the answers (I thought I had already posted a reply, but ... openslug. ... partitions ... drive.
            Message 5 of 7 , Sep 8 10:55 AM
            • 0 Attachment
              --- In nslu2-general@yahoogroups.com, Jochen Rüter <webseiten@j...> wrote:
              > lew1193 schrieb:

              Thanks for the answers (I thought I had already posted a reply, but
              >
              > > I flashed OpenSlug-2.5-beta-firmware.zip with no difficulty, and had
              > > Linux up and running. It was nice to feel at home and find all the
              > > usual tools. I have nearly twenty years of Unix, but unfortunately,
              > > not enough as sysadmin (and my copy of O'Reilly's "Essential System
              > > Administration" is 1996 vintage!). Still, I think I should manage.
              > >
              > > Some initial questions that came to mind. I did some browsing, but
              > > I'm still not fully oriented in the www.nslu2-linux.org pages.
              > >
              > > The openSlug image is about the same size as official LinkSys images.
              > > Yet it contains neither Samba nor HTTPD. Is this because, instead, it
              > > contains a whole lot of Unix tools? Ie, a more "general purpose"
              > > Linux?
              >
              > Maybe. But I think this doesn't really matter, because a slug without
              > any disks attached is more or less worthless - either unslung or
              openslug.
              >
              > >
              > > If all I initially wish to do is Samba (but with better control over
              > > the problems & config), which of the samba package do I want. ipkg
              > > list gives me a few.
              > > cifs - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
              > > + kernel-module-cifs - 2.6.12.2-r6 - cifs kernel module
              > > samba - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
              > > swat - 3.0.14a-r12 - Version 3.0.14a-r12 of package samba
              > > I presume "samba - 3.0.14a-r12" ?
              >
              > right. Swat is a web based configuration utility for samba,
              > kernel-module... is self explaning i thing. what cifs is i don't know...
              >
              > >
              > > Is Samba with FAT drives to be avoided? Seems to cause network
              > > disconnections on stock Linksys F/W but also on opeNSLUg according
              > > to some messages here!?
              >
              > Yes it is. You can't copy big files to FAT drives shared by samba
              > (except if you do some samba hacking, but most people here think this
              > isn't a good idea)
              >
              > > [snip fdisk...]
              > >
              > > The partition info looks like total garbage?
              >
              > The mistake is that you did a "fdisk -l /dev/sda1
              > sda1 itself denotes already a partition, so you looked, which
              partitions
              > are in your partition :).
              > The correct command would be "fdisk -l /dev/sda, as sda denotes the
              drive.
              >
              > >
              > > I'd like to (as a start) use a stick as memory drive. So do I just
              > > repartition it with fdisk, build the FS with mkfs, and so on?
              >
              > It depends if you want to use unslung or openslug...
              >
              > >
              > > http://www.nslu2-linux.org/wiki/HowTo/UseAMemoryStickAsMainDrive
              > > writes:
              > >
              > > To wrap things up you'll have to make sure the slug doesn't use
              > > the tiny swapspace on the stick.
              > >
              > > Why is this a bad thing? USB sticks wear out?
              >
              > Right. I think the number of writes is defined for each sector. So if
              > only one sector gets written 1000000... ?? times, this one will
              > (probably) get defect.
              >
              > Jochen
            • lew1193
              ... Thanks for the answers (I thought I had already posted a reply, but it is nowhere). And my apologies for the post just now (I hit the ENTER button by
              Message 6 of 7 , Sep 8 11:04 AM
              • 0 Attachment
                --- In nslu2-general@yahoogroups.com, Jochen Rüter <webseiten@j...> wrote:
                > lew1193 schrieb:

                Thanks for the answers (I thought I had already posted a reply, but
                it is nowhere). And my apologies for the post just now (I hit the
                ENTER button by mistake).

                fdisk -l /dev/sda gave me the proper data! Device ids have always
                confused me.

                > Yes it is. You can't copy big files to FAT drives shared by samba
                > (except if you do some samba hacking, but most people here think
                > this isn't a good idea)

                What (briefly) is the issue, if I may ask?

                The whole discussion on memstick write wear got me a bit worried
                wrt my usage patterns. More to explore...

                > It depends if you want to use unslung or openslug...

                I've been progressing nicely. No problem formatting the
                memstick as ext2 (avoided -j because wear) and doing turnup
                on it.

                Quite an interesting exercise overall, and a nice opportunity
                to discover new things (dropbear, busybox) that are relevant to
                embedded Linux (something which could end up being useful for
                work even).

                Couple further questions (to which I haven't yet found an easy
                answer):

                1) Is there a telnetd for this box? I've seen that some
                versions of busybox come with telnetd. But not the one on
                OpenSlug. I was surprised to find no telnetd in the
                packages.

                2) I wish to install a minimum of gcc to compile C programs.
                Which of the following do I need?

                cpp - 3.4.4-r1 - The GNU cc and gcc C compilers.
                cpp-symlinks - 3.4.4-r1 - The GNU cc and gcc C compilers.
                g++ - 3.4.4-r1 - The GNU cc and gcc C compilers.
                g++-symlinks - 3.4.4-r1 - The GNU cc and gcc C compilers.
                g77 - 3.4.4-r1 - The GNU cc and gcc C compilers.
                g77-symlinks - 3.4.4-r1 - The GNU cc and gcc C compilers.
                gcc - 3.4.4-r1 - The GNU cc and gcc C compilers.
                gcc-doc - 3.4.4-r1 - The GNU cc and gcc C compilers.
                gcc-symlinks - 3.4.4-r1 - The GNU cc and gcc C compilers.
                gcov - 3.4.4-r1 - The GNU cc and gcc C compilers.
                libg2c-dev - 3.4.4-r1 - The GNU cc and gcc C compilers.
                libg2c0 - 3.4.4-r0 - The GNU cc and gcc C compilers.
                libgcc1 - 3.4.4-r0 - The GNU cc and gcc C compilers.
                libstdc++-dev - 3.4.4-r1 - The GNU cc and gcc C compilers.
                libstdc++6 - 3.4.4-r0 - The GNU cc and gcc C compilers.

                I figure at least: cpp, gcc (what are the "symlinks"
                packages for?). But which library (if any)? Is there more
                extensive descriptions of the available packages?

                3) When compiling, will I need a swap space (a file?) or will
                this be possible in the small memory of the slug?

                4) top reports "Mem: 11136K used, 19544K free". In addition,
                df reports on a tmpfs which has 15340 1K blocks total
                (15 MBytes). The sum of all three exceeds the 32MB that
                the slug is supposed to have. What am I missing? tmpfs
                is included in the numbers reported by top (ie. FS only
                grabs memory as it needs it)?. Altho I could be worng,
                I'm not supposed to have any swap (I certainly have no
                swap partition).

                Tia,
                Pierre
              • Chacko
                I read the following in a FAQ: If using a memory stick, `touch /.ext3flash to let the system know not to hammer the flash memory and wear it out (note that
                Message 7 of 7 , Sep 8 11:13 PM
                • 0 Attachment
                  I read the following in a FAQ: If using a memory stick, `touch /.ext3flash' to let the system know not to hammer the flash memory and wear it out (note that /var/ is on ramfs so all logs are lost on reboot).

                  I have a 512MB flash, configured as the harddisk on DISK1 and unlung to it. By adding the above file, and rebooting, I do not see any difference in operation. How do I determine if /var/ is mounted on ramfs? [My linux experience is minimal].

                  Cordially, CN
                Your message has been successfully submitted and would be delivered to recipients shortly.