NSLU2-Linux
view · edit · print · history

FAQ.RepairingDiskErrors History

Hide minor edits - Show changes to markup

February 10, 2009, at 02:26 PM by Bill C Riemers -- added fedora to the list of live CD\'s
Changed line 29 from:
  • A Knoppix CD that doesn't need installing. You can download and burn Knoppix from http://www.knoppix.net.
to:
  • A Fedora live CD. You can download and burn Fedora from http://fedoraproject.org/get-fedora/. Note: You can also use the Live CD to build a live USB flash drive.
Added lines 31-32:

CD to create a live USB drive, if your BIOS supports USB boot devices.

  • A Knoppix CD that doesn't need installing. You can download and burn Knoppix from http://www.knoppix.net/.
February 10, 2009, at 03:48 AM by colin gebhart -- disambiguate and fix outdated info
Changed lines 25-51 from:

WARNING: be sure to reboot your slug after doing this (to avoid that you accidently fill up the flash filesystem)

Alternative: you could also remove the hard drive from the slug and connect it to a Linux box and run fsck from there as well. This is probably more convenient for users that run the stock Linksys firmware rather than Unslung or other telnet enabled firmwares. Your PC should have USB2 - otherwise you would have to remove the drive from the enclosure. If you don't have a Linux box somewhere, you can boot your normal PC or Laptop with one of the several Live CD distros, for instance:

  • a Knoppix CD that doesn't need installing. You can download and burn Knoppix from http://www.knoppix.net.
  • a Ubuntu CD (can be ordered free from https://shipit.ubuntu.com/) or downloaded. Attach hard disk via USB to a modern PC.
    • Boot PC from Ubuntu CD.
    • Open Terminal window.
    • Type 'sudo umount /dev/sda1/'
    • then 'sudo fsck /dev/sda1'.
    • Works like charm.

Alternative using Ubuntu for Flash Drives:If you use a USB Flash drive as your primary device, then the above method needs slight modification. I used Ubuntu 6.06, but any recent version should work.

  1. Boot PC from Ubuntu CD without USB key inserted.
  2. Insert USB Flash Drive into the PC, you should see two new icons appear on the desktop when both partitions have been mounted.
  3. Select System -> Disks from the top toolbar.
  4. From the Disks window, find the hard drive that relates to your USB Flash Drive. Take a note of the device name i.e. sda, sdb etc. In my case it was sdb.
  5. Open a Terminal Window from the Applications -> Accessories menu.
  6. Type 'sudo umount /dev/sdb1/' Verify that one of the Flash Drive icons has disappeared from the desktop. If your Flash Drive is listed as sda or sdc, change the command accordingly, i.e sda1, sdc1
  7. Now type 'sudo umount /dev/sdb2/' and verify that the other Flash Drive icon has disappeared. The flash drive is no longer mounted so fsck can be run.
  8. Type 'sudo fsck /dev/sdb1' Type 'y' to agree to fix any errors.
  9. Repeat for the other partition 'sudo fsck /dev/sdb2' In my case errors were found and fixed on both partitions.
  10. Shutdown the PC using the icon at the top right hand corner of the Ubuntu desktop. Remove the flash drive, and return to your Slug.

This worked first time for me. I initially tried with Damn Small Linux and had problems.

to:

WARNING: be sure to reboot your slug after doing this (to avoid that you accidentally fill up the flash filesystem)

Alternative: you could also remove the USB hard drive / flash drive from the slug and connect it to a Linux box and run fsck from there as well. fsck and e2fsck is the same thing, so use either (one command points to the other). This is probably more convenient for users that run the stock Linksys firmware rather than Unslung or other telnet enabled firmwares. Your PC should have USB2 - otherwise you would have to remove the drive from the enclosure. If you don't have a Linux box somewhere, you can boot your normal PC or Laptop with one of the several Live CD distros, for instance:

  • A Knoppix CD that doesn't need installing. You can download and burn Knoppix from http://www.knoppix.net.
  • An Ubuntu CD (can be ordered free from https://shipit.ubuntu.com/) or downloaded. Attach hard disk via USB to a modern PC.
  • Damn Small Linux didn't work for one author, but most Linux distros should work.
  1. Boot PC from delivered or downloaded and burned CD, without USB drive connected.
  2. Insert USB drive. You should see two new icons appear on the desktop when both partitions have been mounted.
  3. Figure out the mount point name of the drive. If this is the unslung drive, you should see 2. To do this in Ubuntu select Places menu, choose the name of your drive, and in the file browser that comes up, if you don't see the mount name (like /media/disk1) then click on the paper and pen icon and you will get the location bar with the entire mount name.
  4. Open a terminal window from the Applications -> Accessories menu.
  5. fsck will not work with the mount name. From the terminal window type 'df' <enter>. You should then see the mount name with the device name next to it (like /dev/sda1).
  6. Now type 'sudo umount /dev/sda1/' (change the /dev/ location as necessary), and verify that the drive icon disappears from the desktop or places menu. Running fsck on a mounted drive can ruin the data on it.
  7. Type 'sudo fsck /dev/sda1 -f -y' (change the /dev/ location as necessary). The 2 options mean force the check even if the drive looks fine initially, and answer yes to all repair requests. Wait for it to complete. On a large drive it could take a while.
  8. Repeat for the other partitions as necessary (e.g. 'sudo umount /dev/sda2' and 'sudo fsck /dev/sda2 -f -y')
  9. After all partitions have been fsck'ed, unplug the USB drive and try it on the nslu2 again. You can turn the computer off at any point after fsck is complete, since the USB drive was already ejected (AKA unmounted) before we started the fsck.
Changed lines 45-46 from:

I yesterday had a hd crash (I suspect the cause was a mobile ohone that was called just while a write operation was carried out). I run the above procedure and lots of errores run through the screen... I had to run it several fsck.ext3 several times until no errors were found. But even after that the NSLU2 refused to mount the drive. From the syslogs I see that at some point fsck decided to erase the ext3 journal, so now my fs is just ext2, and the slug does not like. I will try to modify the fstab file and mount it manually. Anyway, my info is gone anyway, I attached the drive to a PC and it's empty (lucky it was in test and I only had some programs but no data there)... but beware of mobile phones near hard drives!

to:

I yesterday had a hd crash (I suspect the cause was a mobile phone that was called just while a write operation was carried out). I run the above procedure and lots of errors run through the screen... I had to run it several fsck.ext3 several times until no errors were found. But even after that the NSLU2 refused to mount the drive. From the syslogs I see that at some point fsck decided to erase the ext3 journal, so now my fs is just ext2, and the slug does not like. I will try to modify the fstab file and mount it manually. Anyway, my info is gone anyway, I attached the drive to a PC and it's empty (lucky it was in test and I only had some programs but no data there)... but beware of mobile phones near hard drives!

Changed lines 57-58 from:

after crash, I take my harddrive and stick it into a ubuntu machine. It has lots of errors on fsck. First time, after fsck, i ended up with all my data in the lost+found folder. The second time after some fixes, it worked. This morning, I fsck-ed it again after the crash and again, lots of error (bad allocation i think, and "file has filetype set", and after running with -y for 10 minutes, (and listing almost every single file on that harddrive) I still got some system data, but the directory where the torrrents were is now a file, not a directory, /var/log/messages is missing, and who knows what others strange things happened.

to:

after crash, I take my harddrive and stick it into a Ubuntu machine. It has lots of errors on fsck. First time, after fsck, i ended up with all my data in the lost+found folder. The second time after some fixes, it worked. This morning, I fsck-ed it again after the crash and again, lots of error (bad allocation i think, and "file has filetype set", and after running with -y for 10 minutes, (and listing almost every single file on that harddrive) I still got some system data, but the directory where the torrents were is now a file, not a directory, /var/log/messages is missing, and who knows what others strange things happened.

Changed line 66 from:

but under linux 2.6, after a variable number of hours, it trashes the

to:

but under Linux 2.6, after a variable number of hours, it trashes the

September 15, 2008, at 07:42 PM by RobHam -- note added regarding the mounting delay caused by the \'quotacheck\' function.
Changed line 8 from:
  • Connect the disk. After a short while the partitions should be mounted automatically.
to:
  • Connect the disk. After a short while the partitions should be mounted automatically (note that mounting can take quite some time - perhaps 30 minutes - with disks that contain many files, due to the firmware 'quotacheck' function).
July 23, 2008, at 07:20 PM by Andreas -- typo
Changed lines 12-13 from:

(if you get an error that no device is mounted use "mount" to find out the name of the device; look for devices that is mounted under /share/hdd/data and /share/hdd/conf).

to:

(if you get an error that no device is mounted use "mount" to find out the name of the device; look for devices that are mounted as /share/hdd/data and /share/hdd/conf).

July 23, 2008, at 07:20 PM by Andreas -- Added use of mount to find name of mounted device.
Changed lines 12-13 from:
to:

(if you get an error that no device is mounted use "mount" to find out the name of the device; look for devices that is mounted under /share/hdd/data and /share/hdd/conf).

September 10, 2007, at 01:40 AM by egorkobylkincom -- last change added credentials to the wrong line
Changed lines 6-7 from:
  • Enable telnet (http://IP-address-of-your-slug/Management/telnet.cgi)
  • Log in with telnet (user root, password uNSLUng as your own password resides only on the external disk. For me root/uNSLUng did not work, only the user admin, password admin worked.
to:
  • Enable telnet (http://IP-address-of-your-slug/Management/telnet.cgi user admin, password admin)
  • Log in with telnet (user root, password uNSLUng as your own password resides only on the external disk.
September 10, 2007, at 01:38 AM by egorkobylkincom -- listed credentials did not work, may be obsoleted version
Changed line 7 from:
  • Log in with telnet (user root, password uNSLUng as your own password resides only on the external disk)
to:
  • Log in with telnet (user root, password uNSLUng as your own password resides only on the external disk. For me root/uNSLUng did not work, only the user admin, password admin worked.
July 20, 2007, at 07:23 PM by fcarolo -- removed false wikilinks
Changed line 51 from:

WARNING (infoball): Being sort of adventurous I run a HD case (Argosy HD360U?) and disk size (Seagate 400GB) that does not seem to be completely compatible with the slug. Linksys firmware 2.3R29 refuses to finish formatting, 2.3R63 I don't know if it's any better in the formatting area but it won't finish scandisk. 5.5-beta works. Sort of. At least it finishes formatting the disk. The above procedure results in "Bus error" (basically when it's done it seems), which then is the immediate response to all subsequent commands and the slug has to be reset by yanking the power cord. I do not yet know if there are any odd side effects as it seems to work well afterwards, but be warned. I have also experienced other strange occurrences with this (brand new) disk when used by the slug so the warning about making sure your hardware works with the stock firmware is very valid. I made a conscious decision to not care in this case. We'll see if it's fixable ;-)

to:

WARNING (infoball): Being sort of adventurous I run a HD case (Argosy HD360U) and disk size (Seagate 400GB) that does not seem to be completely compatible with the slug. Linksys firmware 2.3R29 refuses to finish formatting, 2.3R63 I don't know if it's any better in the formatting area but it won't finish scandisk. 5.5-beta works. Sort of. At least it finishes formatting the disk. The above procedure results in "Bus error" (basically when it's done it seems), which then is the immediate response to all subsequent commands and the slug has to be reset by yanking the power cord. I do not yet know if there are any odd side effects as it seems to work well afterwards, but be warned. I have also experienced other strange occurrences with this (brand new) disk when used by the slug so the warning about making sure your hardware works with the stock firmware is very valid. I made a conscious decision to not care in this case. We'll see if it's fixable ;-)

July 17, 2007, at 02:32 PM by seniorsimon -- minor update to the Flash Drives Section
Changed line 42 from:
  1. Open a Terminal Window from the System -> Applications menu.
to:
  1. Open a Terminal Window from the Applications -> Accessories menu.
July 17, 2007, at 12:33 PM by seniorsimon -- Formatting
July 17, 2007, at 12:33 PM by seniorsimon -- Formatting
Changed lines 30-34 from:

Boot PC from Ubuntu CD. Open Terminal window. Type 'sudo umount /dev/sda1/' then 'sudo fsck /dev/sda1'. Works like charm.

to:
  • Boot PC from Ubuntu CD.
  • Open Terminal window.
  • Type 'sudo umount /dev/sda1/'
  • then 'sudo fsck /dev/sda1'.
  • Works like charm.
Changed lines 38-48 from:

1) Boot PC from Ubuntu CD without USB key inserted. 2) Insert USB Flash Drive into the PC, you should see two new icons appear on the desktop when both partitions have been mounted. 3) Select System -> Disks from the top toolbar. 4) From the Disks window, find the hard drive that relates to your USB Flash Drive. Take a note of the device name i.e. sda, sdb etc. In my case it was sdb. 5) Open a Terminal Window from the System -> Applications menu. 6) Type 'sudo umount /dev/sdb1/' Verify that one of the Flash Drive icons has disappeared from the desktop. If your Flash Drive is listed as sda or sdc, change the command accordingly, i.e sda1, sdc1 7) Now type 'sudo umount /dev/sdb2/' and verify that the other Flash Drive icon has disappeared. The flash drive is no longer mounted so fsck can be run. 8) Type 'sudo fsck /dev/sdb1' Type 'y' to agree to fix any errors. 9) Repeat for the other partition 'sudo fsck /dev/sdb2' In my case errors were found and fixed on both partitions. 10) Shutdown the PC using the icon at the top right hand corner of the Ubuntu desktop. Remove the flash drive, and return to your Slug.

to:
  1. Boot PC from Ubuntu CD without USB key inserted.
  2. Insert USB Flash Drive into the PC, you should see two new icons appear on the desktop when both partitions have been mounted.
  3. Select System -> Disks from the top toolbar.
  4. From the Disks window, find the hard drive that relates to your USB Flash Drive. Take a note of the device name i.e. sda, sdb etc. In my case it was sdb.
  5. Open a Terminal Window from the System -> Applications menu.
  6. Type 'sudo umount /dev/sdb1/' Verify that one of the Flash Drive icons has disappeared from the desktop. If your Flash Drive is listed as sda or sdc, change the command accordingly, i.e sda1, sdc1
  7. Now type 'sudo umount /dev/sdb2/' and verify that the other Flash Drive icon has disappeared. The flash drive is no longer mounted so fsck can be run.
  8. Type 'sudo fsck /dev/sdb1' Type 'y' to agree to fix any errors.
  9. Repeat for the other partition 'sudo fsck /dev/sdb2' In my case errors were found and fixed on both partitions.
  10. Shutdown the PC using the icon at the top right hand corner of the Ubuntu desktop. Remove the flash drive, and return to your Slug.
July 17, 2007, at 12:30 PM by seniorsimon -- Formatting and more detail on how to use Ubuntu
Changed lines 29-31 from:
  • a Ubuntu CD (can be ordered free from https://shipit.ubuntu.com/) or downloaded. Attach hard disk via USB to a modern PC. Boot PC from Ubuntu CD. Open Terminal window. Type 'sudo umount /dev/sda1/' then 'sudo fsck /dev/sda1'. Works like charm.
to:
  • a Ubuntu CD (can be ordered free from https://shipit.ubuntu.com/) or downloaded. Attach hard disk via USB to a modern PC.

Boot PC from Ubuntu CD. Open Terminal window. Type 'sudo umount /dev/sda1/' then 'sudo fsck /dev/sda1'. Works like charm.

Alternative using Ubuntu for Flash Drives:If you use a USB Flash drive as your primary device, then the above method needs slight modification. I used Ubuntu 6.06, but any recent version should work. 1) Boot PC from Ubuntu CD without USB key inserted. 2) Insert USB Flash Drive into the PC, you should see two new icons appear on the desktop when both partitions have been mounted. 3) Select System -> Disks from the top toolbar. 4) From the Disks window, find the hard drive that relates to your USB Flash Drive. Take a note of the device name i.e. sda, sdb etc. In my case it was sdb. 5) Open a Terminal Window from the System -> Applications menu. 6) Type 'sudo umount /dev/sdb1/' Verify that one of the Flash Drive icons has disappeared from the desktop. If your Flash Drive is listed as sda or sdc, change the command accordingly, i.e sda1, sdc1 7) Now type 'sudo umount /dev/sdb2/' and verify that the other Flash Drive icon has disappeared. The flash drive is no longer mounted so fsck can be run. 8) Type 'sudo fsck /dev/sdb1' Type 'y' to agree to fix any errors. 9) Repeat for the other partition 'sudo fsck /dev/sdb2' In my case errors were found and fixed on both partitions. 10) Shutdown the PC using the icon at the top right hand corner of the Ubuntu desktop. Remove the flash drive, and return to your Slug.

This worked first time for me. I initially tried with Damn Small Linux and had problems.

January 02, 2007, at 04:20 PM by adixor -- bad usb/ide controller
Added lines 69-70:

UPDATE 3: it crashed after more than 7 days, but it crashed nevertheless. So don't use this controller.

December 30, 2006, at 02:55 PM by adixor --
Added lines 62-68:

UPDATE 2: kernel 2.4 seems to be working ok with this adapter, so I will stick with it:

  1. uptime
 17:21:24 up 3 days, 18:20,  2 users,  load average: 1.48, 1.73, 1.67

3-5 torrents all this time (transmissioncli), amuled, many ftp transfers and local copy from dir to dir (big files for testing purposes)

December 28, 2006, at 04:58 AM by adixor --
Deleted line 61:

<br>

December 28, 2006, at 04:58 AM by adixor --
Changed lines 48-64 from:

--

to:

UPDATE:

I found the cause, which is the @#%!@## USB-> ATA Adapter (some El Cheapo from china). Here it is:

http://www.qbik.ch/usb/devices/showdev.php?id=3751

So it seems my usb -> ide adapter works just fine under Windows XP, but under linux 2.6, after a variable number of hours, it trashes the harddrive, file system, anything.

I am now testing it with unslung (2.4 kernel - works all right so far - 20 hours) and then I will test another adapter (another vendor) with 2.6 and I will try to post here the results. <br> --

December 22, 2006, at 09:30 AM by adi --
Changed lines 35-48 from:

I yesterday had a hd crash (I suspect the cause was a mobile ohone that was called just while a write operation was carried out). I run the above procedure and lots of errores run through the screen... I had to run it several fsck.ext3 several times until no errors were found. But even after that the NSLU2 refused to mount the drive. From the syslogs I see that at some point fsck decided to erase the ext3 journal, so now my fs is just ext2, and the slug does not like. I will try to modify the fstab file and mount it manually. Anyway, my info is gone anyway, I attached the drive to a PC and it's empty (lucky it was in test and I only had some programs but no data there)... but beware of mobile phones near hard drives!

to:

I yesterday had a hd crash (I suspect the cause was a mobile ohone that was called just while a write operation was carried out). I run the above procedure and lots of errores run through the screen... I had to run it several fsck.ext3 several times until no errors were found. But even after that the NSLU2 refused to mount the drive. From the syslogs I see that at some point fsck decided to erase the ext3 journal, so now my fs is just ext2, and the slug does not like. I will try to modify the fstab file and mount it manually. Anyway, my info is gone anyway, I attached the drive to a PC and it's empty (lucky it was in test and I only had some programs but no data there)... but beware of mobile phones near hard drives!

-- i had a problem with a hd crash too (in fact 3 times, I'm desperate) 1. I tried both Debian debootstrapped (slugos/le) and twice debian installer rc1. 2. only things running: proftpd (no traffic aside from me uploading some stuff once), sshd, screen, rtorrent (the first 2 times), transmission (a lightweight bittorrent client - the third time). 3. It all goes smooth (very smooth) for somewhere between 12-16-24 or maybe a little more hours, then it crashes (no ssh or ftp access, ping responding). 4. during this time, RAM has about 4 MB free and swap (128 MB swap partition) is used between 6-16MB (downloading only a 7 GB torrent). 5. NO errors in the dmesg, messages log, any other log that i know of 6. no program crash, everything is fine until it crashes

after crash, I take my harddrive and stick it into a ubuntu machine. It has lots of errors on fsck. First time, after fsck, i ended up with all my data in the lost+found folder. The second time after some fixes, it worked. This morning, I fsck-ed it again after the crash and again, lots of error (bad allocation i think, and "file has filetype set", and after running with -y for 10 minutes, (and listing almost every single file on that harddrive) I still got some system data, but the directory where the torrrents were is now a file, not a directory, /var/log/messages is missing, and who knows what others strange things happened. --

April 19, 2006, at 12:38 PM by manutremo --
Changed lines 33-35 from:
Update: Not having enough time to investigate I got a smaller disk (Hitachi 250GB) and an identical HD case. I also flashed the slug with the 2.3R63 firmware and lo: it worked! Formatting, scandisk and all. I have recently flashed with Unslung 5.5-beta again and after a while I tried the fsck again, which worked, no more "Bus error". Several errors were discovered, and I let them be corrected. I ran fsck several times and seemingly the same, or at least as many, errors were discovered and "fixed". Finally I just connected the disk to a Linux box and did the same thing and it worked right away, no errors left to fix on the second fsck run. As a first impression things also seem more stable (just two "network name not available" messages while transferring several large files to and from the slug in the hours since I connected it again). Therefore I'd like to suggest that the fsck primarily be done on a PC and not from the slug as the fsck.ext3 binary seems unreliable, and also that anyone experiencing samba trouble try this as well!
to:
Update: Not having enough time to investigate I got a smaller disk (Hitachi 250GB) and an identical HD case. I also flashed the slug with the 2.3R63 firmware and lo: it worked! Formatting, scandisk and all. I have recently flashed with Unslung 5.5-beta again and after a while I tried the fsck again, which worked, no more "Bus error". Several errors were discovered, and I let them be corrected. I ran fsck several times and seemingly the same, or at least as many, errors were discovered and "fixed". Finally I just connected the disk to a Linux box and did the same thing and it worked right away, no errors left to fix on the second fsck run. As a first impression things also seem more stable (just two "network name not available" messages while transferring several large files to and from the slug in the hours since I connected it again). Therefore I'd like to suggest that the fsck primarily be done on a PC and not from the slug as the fsck.ext3 binary seems unreliable, and also that anyone experiencing samba trouble try this as well!

I yesterday had a hd crash (I suspect the cause was a mobile ohone that was called just while a write operation was carried out). I run the above procedure and lots of errores run through the screen... I had to run it several fsck.ext3 several times until no errors were found. But even after that the NSLU2 refused to mount the drive. From the syslogs I see that at some point fsck decided to erase the ext3 journal, so now my fs is just ext2, and the slug does not like. I will try to modify the fstab file and mount it manually. Anyway, my info is gone anyway, I attached the drive to a PC and it's empty (lucky it was in test and I only had some programs but no data there)... but beware of mobile phones near hard drives!

December 05, 2005, at 06:58 AM by infoball -- Update on personal experience and merged the two \\\"alternatives\\\" as it was really just one.
Changed line 8 from:
  • Connect the disk.
to:
  • Connect the disk. After a short while the partitions should be mounted automatically.
Changed lines 26-30 from:

Alternative: you could also remove the hard drive from the slug and connect it to a Linux box and run fsck from there as well. This is probably more convenient for users that run the stock Linksys firmware rather than Unslung or other telnet enabled firmwares. Your PC should have USB2 - otherwise you would have to remove the drive from the enclosure. If you don't have a Linux box somewhere, you can boot your normal PC or Laptop with a Knoppix CD that doesn't need installing. You get download and burn Knoppix from http://www.knoppix.net.

Alternative2: For Linux Newbies like me, the easiest step was to get a Ubuntu CD (can be ordered free from https://shipit.ubuntu.com/) or downloaded. Attach hard disk via USB to a modern PC. Boot PC from Ubuntu CD. Open Terminal window. Type 'sudo umount /dev/sda1/' then 'sudo fsck /dev/sda1'. Works like charm.

WARNING (infoball): Being sort of adventurous I run a HD case (Argosy) and disk size (Seagate 400GB) that does not seem to be completely compatible with the slug. Linksys firmware 2.3R29 refuses to finish formatting, 2.3R63 I don't know if it's any better in the formatting area but it won't finish scandisk. 5.5-beta works. Sort of. At least it finishes formatting the disk. The above procedure results in "Bus error" (basically when it's done it seems), which then is the immediate response to all subsequent commands and the slug has to be reset by yanking the power cord. I do not yet know if there are any odd side effects as it seems to work well afterwards, but be warned. I have also experienced other strange occurrences with this (brand new) disk when used by the slug so the warning about making sure your hardware works with the stock firmware is very valid. I made a conscious decision to not care in this case. We'll see if it's fixable ;-)

to:

Alternative: you could also remove the hard drive from the slug and connect it to a Linux box and run fsck from there as well. This is probably more convenient for users that run the stock Linksys firmware rather than Unslung or other telnet enabled firmwares. Your PC should have USB2 - otherwise you would have to remove the drive from the enclosure. If you don't have a Linux box somewhere, you can boot your normal PC or Laptop with one of the several Live CD distros, for instance:

  • a Knoppix CD that doesn't need installing. You can download and burn Knoppix from http://www.knoppix.net.
  • a Ubuntu CD (can be ordered free from https://shipit.ubuntu.com/) or downloaded. Attach hard disk via USB to a modern PC. Boot PC from Ubuntu CD. Open Terminal window. Type 'sudo umount /dev/sda1/' then 'sudo fsck /dev/sda1'. Works like charm.

WARNING (infoball): Being sort of adventurous I run a HD case (Argosy HD360U?) and disk size (Seagate 400GB) that does not seem to be completely compatible with the slug. Linksys firmware 2.3R29 refuses to finish formatting, 2.3R63 I don't know if it's any better in the formatting area but it won't finish scandisk. 5.5-beta works. Sort of. At least it finishes formatting the disk. The above procedure results in "Bus error" (basically when it's done it seems), which then is the immediate response to all subsequent commands and the slug has to be reset by yanking the power cord. I do not yet know if there are any odd side effects as it seems to work well afterwards, but be warned. I have also experienced other strange occurrences with this (brand new) disk when used by the slug so the warning about making sure your hardware works with the stock firmware is very valid. I made a conscious decision to not care in this case. We'll see if it's fixable ;-)

Update: Not having enough time to investigate I got a smaller disk (Hitachi 250GB) and an identical HD case. I also flashed the slug with the 2.3R63 firmware and lo: it worked! Formatting, scandisk and all. I have recently flashed with Unslung 5.5-beta again and after a while I tried the fsck again, which worked, no more "Bus error". Several errors were discovered, and I let them be corrected. I ran fsck several times and seemingly the same, or at least as many, errors were discovered and "fixed". Finally I just connected the disk to a Linux box and did the same thing and it worked right away, no errors left to fix on the second fsck run. As a first impression things also seem more stable (just two "network name not available" messages while transferring several large files to and from the slug in the hours since I connected it again). Therefore I'd like to suggest that the fsck primarily be done on a PC and not from the slug as the fsck.ext3 binary seems unreliable, and also that anyone experiencing samba trouble try this as well!
November 27, 2005, at 06:38 PM by TimBishop -- Added steps using ubuntu live cd
Added lines 28-29:

Alternative2: For Linux Newbies like me, the easiest step was to get a Ubuntu CD (can be ordered free from https://shipit.ubuntu.com/) or downloaded. Attach hard disk via USB to a modern PC. Boot PC from Ubuntu CD. Open Terminal window. Type 'sudo umount /dev/sda1/' then 'sudo fsck /dev/sda1'. Works like charm.

September 04, 2005, at 01:54 PM by kaste -- more advice on using a PC for fsck
Changed lines 26-27 from:

Alternative: I believe you could also remove the hard drive from its enclosure and connect it to a Linux box and run fsck from there as well. Just a little bit inconvenient though.

to:

Alternative: you could also remove the hard drive from the slug and connect it to a Linux box and run fsck from there as well. This is probably more convenient for users that run the stock Linksys firmware rather than Unslung or other telnet enabled firmwares. Your PC should have USB2 - otherwise you would have to remove the drive from the enclosure. If you don't have a Linux box somewhere, you can boot your normal PC or Laptop with a Knoppix CD that doesn't need installing. You get download and burn Knoppix from http://www.knoppix.net.

August 30, 2005, at 10:33 AM by tman --
Changed lines 6-7 from:
  • Enable Telnet (http://slug.ip.address/Management/telnet.cgi)
  • Log in with Telnet (user root, password uNSLUng as your own password resides only on the external disk)
to:
  • Enable telnet (http://IP-address-of-your-slug/Management/telnet.cgi)
  • Log in with telnet (user root, password uNSLUng as your own password resides only on the external disk)
Changed line 28 from:

WARNING (infoball): Being sort of adventurous I run a HD case (Argosy) and disk size (Seagate 400GB) that does not seem to be completely compatible with the slug. Linksys firmware 2.3R29 refuses to finish formatting, 2.3R63 I don't know if it's any better in the formatting area but it won't finish scandisk. 5.5-beta works. Sort of. At least it finishes formatting the disk. The above procedure results in "Bus error" (basically when it's done it seems), which then is the immediate response to all subsequent commands and the slug has to be reset by yanking the power cord. I do not yet know if there are any odd side effects as it seems to work well afterwards, but be warned. I have also experienced other strange occurrences with this (brand new) disk when used by the slug so the warning about making sure your hardware works with the stock firmware is very valid. I made a conscious decision to not care in this case. We'll see if it's fixable ;-)

to:

WARNING (infoball): Being sort of adventurous I run a HD case (Argosy) and disk size (Seagate 400GB) that does not seem to be completely compatible with the slug. Linksys firmware 2.3R29 refuses to finish formatting, 2.3R63 I don't know if it's any better in the formatting area but it won't finish scandisk. 5.5-beta works. Sort of. At least it finishes formatting the disk. The above procedure results in "Bus error" (basically when it's done it seems), which then is the immediate response to all subsequent commands and the slug has to be reset by yanking the power cord. I do not yet know if there are any odd side effects as it seems to work well afterwards, but be warned. I have also experienced other strange occurrences with this (brand new) disk when used by the slug so the warning about making sure your hardware works with the stock firmware is very valid. I made a conscious decision to not care in this case. We'll see if it's fixable ;-)

August 30, 2005, at 08:26 AM by infoball -- Added more detailed step-by-step instructions and explanations. Plus a warning note. And some formatting changes.
Added lines 3-4:

The scandisk function of the Linksys web interface will not work when the disk is unslung as it is then in use and cannot be unmounted. The following steps can be used instead.

Added lines 6-7:
  • Enable Telnet (http://slug.ip.address/Management/telnet.cgi)
  • Log in with Telnet (user root, password uNSLUng as your own password resides only on the external disk)
Changed lines 11-13 from:
  • The web interface still would not allow me to scan. The log said:
to:
umount /dev/sda2

The web interface may still not allow you to scan. The log may say:

Changed lines 15-16 from:
  • However if you telnet to the device you can issue the command
to:
  • Instead you can now, in the Telnet session, issue the commands
Changed lines 18-19 from:
  • This will check the disk for you (assuming your drive is on /dev/sda1).
to:
/sbin/fsck.ext3 -f /dev/sda2

This will check the disk for you, the -f flag forces a check even if the file system appears sane at first glance.

Changed lines 24-28 from:

WARNING: be sure to reboot your slug after doing this (to avoid that you accidently fill up the flash filesystem)

to:

WARNING: be sure to reboot your slug after doing this (to avoid that you accidently fill up the flash filesystem)

Alternative: I believe you could also remove the hard drive from its enclosure and connect it to a Linux box and run fsck from there as well. Just a little bit inconvenient though.

WARNING (infoball): Being sort of adventurous I run a HD case (Argosy) and disk size (Seagate 400GB) that does not seem to be completely compatible with the slug. Linksys firmware 2.3R29 refuses to finish formatting, 2.3R63 I don't know if it's any better in the formatting area but it won't finish scandisk. 5.5-beta works. Sort of. At least it finishes formatting the disk. The above procedure results in "Bus error" (basically when it's done it seems), which then is the immediate response to all subsequent commands and the slug has to be reset by yanking the power cord. I do not yet know if there are any odd side effects as it seems to work well afterwards, but be warned. I have also experienced other strange occurrences with this (brand new) disk when used by the slug so the warning about making sure your hardware works with the stock firmware is very valid. I made a conscious decision to not care in this case. We'll see if it's fixable ;-)

August 22, 2005, at 03:52 PM by tman --
Deleted lines 15-25:

This is a test method to run Scandisk from the Web interface * Boot the Slug without a disk * Enable Telnet http://192.168.1.77/Management/telnet.cgi * Telnet using admin/admin * Connect the disk. When the drive is recognized, press ""Start/Stop Disk 1"" in the Web interface * The drive activity light will illuminate while Scandisk proceeds. * When finished, Disk 1 Status will display Scandisk completed. * Disk Log will report that scandisk failed, contradicting the Web interface. * Scandisk appears to work, whereas the Disk Log appears to be in error * More on this later...

August 22, 2005, at 03:52 PM by tman --
Added lines 1-26:

How to check your disk for errors (and repair them)

  • Boot the slug without disk.
  • Connect the disk.
  • Through telnet unmount all drives.
umount /dev/sda1
  • The web interface still would not allow me to scan. The log said:
"Warning: Out of disk space, scandisk cannot proceed."
  • However if you telnet to the device you can issue the command
/sbin/fsck.ext3 -f /dev/sda1
  • This will check the disk for you (assuming your drive is on /dev/sda1).

If you want to you can add the -y flag to the command. This will answer all questions with yes automatically (which is generally the best choice anyway).

WARNING: be sure to reboot your slug after doing this (to avoid that you accidently fill up the flash filesystem)

This is a test method to run Scandisk from the Web interface * Boot the Slug without a disk * Enable Telnet http://192.168.1.77/Management/telnet.cgi * Telnet using admin/admin * Connect the disk. When the drive is recognized, press ""Start/Stop Disk 1"" in the Web interface * The drive activity light will illuminate while Scandisk proceeds. * When finished, Disk 1 Status will display Scandisk completed. * Disk Log will report that scandisk failed, contradicting the Web interface. * Scandisk appears to work, whereas the Disk Log appears to be in error * More on this later...

view · edit · print · history · Last edited by Bill C Riemers.
Based on work by colin gebhart, RobHam, Andreas, egorkobylkincom, fcarolo, seniorsimon, adixor, adi, manutremo, infoball, TimBishop, kaste, and tman.
Originally by tman.
Page last modified on February 10, 2009, at 02:26 PM