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

Re: [nslu2-general] Re: Failure to boot with unslung HD

Expand Messages
  • Gerald L. Clark
    ... /proc/hd_conn does not exist until the drive is present. ... You are using an external hub? ... If your drive is not ready after nslu2 registers it as
    Message 1 of 25 , Jul 2, 2005
    • 0 Attachment
      eagledream_first wrote:
      > --- In nslu2-general@yahoogroups.com, "Gerald L. Clark"
      > <gerald_clark@m...> wrote:
      >
      >>eagledream_first wrote:
      >>
      >>>
      >>>I had the same problem after installing Unslung 5.5 r29.
      >>>My solution is to edit the /linuxrc file.
      >>>
      >>>==================================================
      >>>=====================
      >>>.........
      >>># Perform prepatory tasks, and determine whether the desired
      >
      > rootfs is
      >
      >>>viable.
      >>>
      >>>/bin/mount -t proc proc /proc
      >>>
      >>>if [ $prefroot = "sda1" -o $prefroot = "sda2" -o $prefroot =
      >
      > "sdb1" -o
      >
      >>>$prefroot = "sdb2" ] ; then
      >>> /bin/echo "Sleeping while waiting for disk..."
      >>># cnt=10
      >>> cnt=80
      >>> while [ $cnt -gt 0 ] ; do
      >>> echo -ne "\r$cnt "
      >>># sleep 1
      >>> sleep 10
      >>> [ $prefroot = "sda1" ] && [ -f /proc/hd_conn ] && cnt=0
      >>> [ $prefroot = "sda2" ] && [ -f /proc/hd_conn ] && cnt=0
      >>> [ $prefroot = "sdb1" ] && [ -f /proc/hd2_conn ] && cnt=0
      >>> [ $prefroot = "sdb2" ] && [ -f /proc/hd2_conn ] && cnt=0
      >>> cnt=`expr $cnt - 1`
      >>> done
      >>>......
      >
      >
      > Gerald L. Clark wrote:
      >
      >
      >>There is no need to change both values.
      >>You are now checking every 10 seconds to see if the drive is ready
      >
      > for a
      >
      >>maximum of 800 seconds. Your drive would have to be seriously
      >
      > broken to
      >
      >>take that long to be recognized.
      >>
      >>cnt is the maximum number of tries before giving up.
      >>We wait 1 second before checking again.
      >>Any sleep bigger than 1 is wasted time.
      >>Simply increase cnt.
      >>My hard drive is ready in 1 to 2 seconds. My flash drive takes less
      >
      > than
      >
      >>5 seconds. 80 seconds is a lot of time.
      >>Some flash drives may need more than a minute if they are not 2.0
      >>compliant, but a hard drive should not.
      >
      >
      > I don't agree with you Gerald.
      > At the moment the file /proc/hd_conn exists the harddrive obviously is
      > not present in all cases and cnt is forced to 0 at that moment.
      /proc/hd_conn does not exist until the drive is present.
      > So the loop breaks and the slug doesn't boot from the harddrive.
      >
      > One and another is more or less depending of the hardware of the
      > external usb hub/interface and harddrive combination.
      You are using an external hub?

      >
      > I tried different values upto cnt=300 and sleep=1 and the slug still
      > didn't boot from the harddrive.
      >
      > I changed the values to cnt=3 and sleep=10 and now the slug is stabil
      > booting from the harddrive.
      > (cnt=3 and sleep=5 didn't do the job also.)
      >
      If your drive is not ready after nslu2 registers it as connected, then
      the proper place to put a final 10 second delay would be after the 'done'.

      The current location of your sleep 10 allows a 0 to 10 second delay
      between registration and mount attempt.

      Leave cnt high, and the internal sleep set to 1.
      Put a sleep 10 immediately after the 'done' line.
    • eagledream_first
      ... less ... obviously is ... still ... stabil ... then ... done . ... Not quite, it s how you look at it. My solution waits 10 seconds and then checks for
      Message 2 of 25 , Jul 3, 2005
      • 0 Attachment
        --- In nslu2-general@yahoogroups.com, "Gerald L. Clark"
        <gerald_clark@m...> wrote:
        > eagledream_first wrote:
        > > --- In nslu2-general@yahoogroups.com, "Gerald L. Clark"
        > > <gerald_clark@m...> wrote:
        > >
        > >>eagledream_first wrote:
        > >>
        > >>>
        > >>>I had the same problem after installing Unslung 5.5 r29.
        > >>>My solution is to edit the /linuxrc file.
        > >>>
        > >>>==================================================
        > >>>=====================
        > >>>.........
        > >>># Perform prepatory tasks, and determine whether the desired
        > >
        > > rootfs is
        > >
        > >>>viable.
        > >>>
        > >>>/bin/mount -t proc proc /proc
        > >>>
        > >>>if [ $prefroot = "sda1" -o $prefroot = "sda2" -o $prefroot =
        > >
        > > "sdb1" -o
        > >
        > >>>$prefroot = "sdb2" ] ; then
        > >>> /bin/echo "Sleeping while waiting for disk..."
        > >>># cnt=10
        > >>> cnt=80
        > >>> while [ $cnt -gt 0 ] ; do
        > >>> echo -ne "\r$cnt "
        > >>># sleep 1
        > >>> sleep 10
        > >>> [ $prefroot = "sda1" ] && [ -f /proc/hd_conn ] && cnt=0
        > >>> [ $prefroot = "sda2" ] && [ -f /proc/hd_conn ] && cnt=0
        > >>> [ $prefroot = "sdb1" ] && [ -f /proc/hd2_conn ] && cnt=0
        > >>> [ $prefroot = "sdb2" ] && [ -f /proc/hd2_conn ] && cnt=0
        > >>> cnt=`expr $cnt - 1`
        > >>> done
        > >>>......
        > >
        > >
        > > Gerald L. Clark wrote:
        > >
        > >
        > >>There is no need to change both values.
        > >>You are now checking every 10 seconds to see if the drive is ready
        > >
        > > for a
        > >
        > >>maximum of 800 seconds. Your drive would have to be seriously
        > >
        > > broken to
        > >
        > >>take that long to be recognized.
        > >>
        > >>cnt is the maximum number of tries before giving up.
        > >>We wait 1 second before checking again.
        > >>Any sleep bigger than 1 is wasted time.
        > >>Simply increase cnt.
        > >>My hard drive is ready in 1 to 2 seconds. My flash drive takes
        less
        > >
        > > than
        > >
        > >>5 seconds. 80 seconds is a lot of time.
        > >>Some flash drives may need more than a minute if they are not 2.0
        > >>compliant, but a hard drive should not.
        > >
        > >
        > > I don't agree with you Gerald.
        > > At the moment the file /proc/hd_conn exists the harddrive
        obviously is
        > > not present in all cases and cnt is forced to 0 at that moment.
        > /proc/hd_conn does not exist until the drive is present.
        > > So the loop breaks and the slug doesn't boot from the harddrive.
        > >
        > > One and another is more or less depending of the hardware of the
        > > external usb hub/interface and harddrive combination.
        > You are using an external hub?
        >
        > >
        > > I tried different values upto cnt=300 and sleep=1 and the slug
        still
        > > didn't boot from the harddrive.
        > >
        > > I changed the values to cnt=3 and sleep=10 and now the slug is
        stabil
        > > booting from the harddrive.
        > > (cnt=3 and sleep=5 didn't do the job also.)
        > >
        > If your drive is not ready after nslu2 registers it as connected,
        then
        > the proper place to put a final 10 second delay would be after the
        'done'.
        >
        > The current location of your sleep 10 allows a 0 to 10 second delay
        > between registration and mount attempt.

        Not quite, it's how you look at it.
        My solution waits 10 seconds and then checks for the registration and
        immediately after that mounts the drive.
        However the result is the same.

        >
        > Leave cnt high, and the internal sleep set to 1.
        > Put a sleep 10 immediately after the 'done' line.

        I checked it and it does the same, it works.
        It registers, waits for ten seconds and then mounts the drive.

        Again the result of the code is the same.

        And yes I'm using a 3.5" aluminium harddisk case with a built in
        internal hub giving me two extra usb 2.0 ports. The slug recognizes it
        and gives no problems.
        There is also a on/off switchable 6 in 1 cardreader in the harddisk
        case.
        I'm using a 160Gb Maxtor harddisk in the case.
        This all works great!
      • Gerald L. Clark
        ... No, the result is not the same. Registration may occur immediately before the check. You then have no wait before the mount. ... This is not supported. You
        Message 3 of 25 , Jul 3, 2005
        • 0 Attachment
          eagledream_first wrote:
          >>between registration and mount attempt.
          >
          >
          > Not quite, it's how you look at it.
          > My solution waits 10 seconds and then checks for the registration and
          > immediately after that mounts the drive.
          > However the result is the same.
          No, the result is not the same.
          Registration may occur immediately before the check.
          You then have no wait before the mount.
          >
          >
          >>Leave cnt high, and the internal sleep set to 1.
          >>Put a sleep 10 immediately after the 'done' line.
          >
          >
          > I checked it and it does the same, it works.
          > It registers, waits for ten seconds and then mounts the drive.
          >
          > Again the result of the code is the same.
          >
          > And yes I'm using a 3.5" aluminium harddisk case with a built in
          > internal hub giving me two extra usb 2.0 ports. The slug recognizes it
          > and gives no problems.
          > There is also a on/off switchable 6 in 1 cardreader in the harddisk
          > case.
          This is not supported. You may not have more than one active USB storage
          device per NSLU2 port.
          This is why you need the wait after the registration.
          > I'm using a 160Gb Maxtor harddisk in the case.
          > This all works great!
          >
          >
          --
          nslu-linux - glc
        • emm_is
          Has this problem been resolved? unslung firmware 5.5 NLSU recognises, formats and shares drive (2.5 in USB2 enclosure) Install unslung onto drive reboot NSLU
          Message 4 of 25 , Jul 13, 2005
          • 0 Attachment
            Has this problem been resolved?

            unslung firmware 5.5

            NLSU recognises, formats and shares drive (2.5" in USB2 enclosure)
            Install unslung onto drive
            reboot
            NSLU hangs with ethernet and disk 1 lights on.

            (I have no problem getting a working system with my 1Gb USB2 flash
            drive.)

            I note eagledream_first (msg 1627) and Gerald L. Clark (msg 1634) have
            discussed editing the linuxrc file to increase delay between finding
            and mounting the drive, however despite trying variants of this I have
            had no success.
          • emm_is
            ... I reformatted the drive to NTFS Reflashed the NSLU2 Telnetted into the NSLU2 Reformatted the drive on the NSLU2 (web interface) /sbin/unsling unslung
            Message 5 of 25 , Jul 13, 2005
            • 0 Attachment
              > Has this problem been resolved?

              I reformatted the drive to NTFS
              Reflashed the NSLU2
              Telnetted into the NSLU2
              Reformatted the drive on the NSLU2 (web interface)
              /sbin/unsling
              unslung happyness

              If any of the steps were missed out, swapped -> unslung unhappyness

              Hope this helps.
            Your message has been successfully submitted and would be delivered to recipients shortly.