NSLU2-Linux
view · edit · print · history

Unslung.FailedFormatFix History

Hide minor edits - Show changes to markup

August 04, 2008, at 12:25 AM by Rolf -- Alternative to the USB stick fomratting isue
Changed lines 255-257 from:

2007-11-20 I encountered this problem with my new Maxtor onetouch III 500 GB drive. Inspired by this forum post, I tried to delete the file system, that had been created. This did the trick, and I could then format the drive using the Web interface.

to:

2007-11-20 I encountered this problem with my new Maxtor onetouch III 500 GB drive. Inspired by this forum post, I tried to delete the file system, that had been created. This did the trick, and I could then format the drive using the Web interface.

2008-08-04 I encountered the same problem but instead of following all those suggestions I just downloaded the Partition Manager (30 day trial) and formatted the USB device on a windows machine with the ext3 format. After that I connected the USB drive to the slug again and formatted it again through the web interface of the Slug. After that the Slug was recognizing and formatting the USB stick correctly. That was nice and easy and took only 10 minutes.

April 19, 2008, at 02:34 PM by bluebear --
Changed line 13 from:
to:
April 19, 2008, at 02:33 PM by bluebear -- added link to another solution
Added lines 10-13:

2008.04.18 - comment by bluebear: For another possible solution of this problem also see: CannotFormat?

November 20, 2007, at 09:37 PM by bouvin --
Changed line 251 from:

2007-11-20 I encountered this problem with my new Maxtor onetouch III 500 GB drive. Inspired by This forum post, I tried to delete the file system, that had been created. This did the trick.

to:

2007-11-20 I encountered this problem with my new Maxtor onetouch III 500 GB drive. Inspired by this forum post, I tried to delete the file system, that had been created. This did the trick, and I could then format the drive using the Web interface.

November 20, 2007, at 09:37 PM by bouvin --
Changed line 251 from:

2007-11-20 I encountered this problem with my new Maxtor OneTouch? III 500 GB drive. Inspired by This forum post, I tried to delete the file system, that had been created. This did the trick.

to:

2007-11-20 I encountered this problem with my new Maxtor onetouch III 500 GB drive. Inspired by This forum post, I tried to delete the file system, that had been created. This did the trick.

November 20, 2007, at 09:36 PM by bouvin -- deleting the file system may also work
Changed lines 249-251 from:

2007-09-29 Problem also seen with Lexar Jumpdrive 2.0 Pro 256 MB.

to:

2007-09-29 Problem also seen with Lexar Jumpdrive 2.0 Pro 256 MB.

2007-11-20 I encountered this problem with my new Maxtor OneTouch? III 500 GB drive. Inspired by This forum post, I tried to delete the file system, that had been created. This did the trick.

September 30, 2007, at 07:01 PM by Stan Sieler -- Added note about another flash drive encountering problem
Changed lines 246-247 from:

after an attempt to recover a forgotten password on a successfully unslung slug, involving playing with passwd file before adequate reading of the wiki, i ended up with a memory stick (1 gig Jet 10) now not recognised, wouldn't format ( the web page indicated 'formatted', no fs indicated, but the log showed 'format failed'). I reflashed (after learning i can't use the web utility once unslung!) The web utility then successfully reformatted to ext3, and i then successfully unslung. Theory: after flashing with unslung originally, i loaded 'ftp-topfield' (no external disk). This fits, but only just. I then decided i wanted to load more packages, and added a flash drive and finished unslinging. Perhaps there was now insufficient space to allow format to run without the unslung external disk. anyway, thanks for the wiki! - update. didnt work after all. the newly formatted disk would hang the slug as soon as it was plugged in. i've now followed the complete script, and am apparently unslinging successfully...

to:

After an attempt to recover a forgotten password on a successfully unslung slug, involving playing with passwd file before adequate reading of the wiki, I ended up with a memory stick (1 gig Jet 10) now not recognised, wouldn't format ( the web page indicated 'formatted', no fs indicated, but the log showed 'format failed'). I reflashed (after learning i can't use the web utility once unslung!) The web utility then successfully reformatted to ext3, and i then successfully unslung. Theory: after flashing with unslung originally, I loaded 'ftp-topfield' (no external disk). This fits, but only just. I then decided I wanted to load more packages, and added a flash drive and finished unslinging. Perhaps there was now insufficient space to allow format to run without the unslung external disk. anyway, thanks for the wiki! - update. didnt work after all. The newly formatted disk would hang the slug as soon as it was plugged in. I've now followed the complete script, and am apparently unslinging successfully...

2007-09-29 Problem also seen with Lexar Jumpdrive 2.0 Pro 256 MB.

August 23, 2007, at 12:40 PM by russemailnu --
Changed lines 246-247 from:

after an attempt to recover a forgotten password on a successfully unslung slug, involving playing with passwd file before adequate reading of the wiki, i ended up with a memory stick (1 gig Jet 10) now not recognised, wouldn't format ( the web page indicated 'formatted', no fs indicated, but the log showed 'format failed'). I reflashed (after learning i can't use the web utility once unslung!) The web utility then successfully reformatted to ext3, and i then successfully unslung. Theory: after flashing with unslung originally, i loaded 'ftp-topfield' (no external disk). This fits, but only just. I then decided i wanted to load more packages, and added a flash drive and finished unslinging. Perhaps there was now insufficient space to allow format to run without the unslung external disk. anyway, thanks for the wiki!

to:

after an attempt to recover a forgotten password on a successfully unslung slug, involving playing with passwd file before adequate reading of the wiki, i ended up with a memory stick (1 gig Jet 10) now not recognised, wouldn't format ( the web page indicated 'formatted', no fs indicated, but the log showed 'format failed'). I reflashed (after learning i can't use the web utility once unslung!) The web utility then successfully reformatted to ext3, and i then successfully unslung. Theory: after flashing with unslung originally, i loaded 'ftp-topfield' (no external disk). This fits, but only just. I then decided i wanted to load more packages, and added a flash drive and finished unslinging. Perhaps there was now insufficient space to allow format to run without the unslung external disk. anyway, thanks for the wiki! - update. didnt work after all. the newly formatted disk would hang the slug as soon as it was plugged in. i've now followed the complete script, and am apparently unslinging successfully...

August 21, 2007, at 12:50 PM by russemailnu -- experience with failed format.
Changed lines 106-107 from:
to:

NOTE: you can't use the web utility to reflash!

Added line 246:

after an attempt to recover a forgotten password on a successfully unslung slug, involving playing with passwd file before adequate reading of the wiki, i ended up with a memory stick (1 gig Jet 10) now not recognised, wouldn't format ( the web page indicated 'formatted', no fs indicated, but the log showed 'format failed'). I reflashed (after learning i can't use the web utility once unslung!) The web utility then successfully reformatted to ext3, and i then successfully unslung. Theory: after flashing with unslung originally, i loaded 'ftp-topfield' (no external disk). This fits, but only just. I then decided i wanted to load more packages, and added a flash drive and finished unslinging. Perhaps there was now insufficient space to allow format to run without the unslung external disk. anyway, thanks for the wiki!

July 15, 2007, at 03:12 AM by mwester -- Highlighting
Added lines 22-23:

(:table border=0 width=90% bgcolor=#ddddff:) (:cell:)

Changed lines 25-26 from:
to:

(:tableend:)

July 15, 2007, at 02:52 AM by mwester -- Add note on U3 devices
Added lines 22-23:

While this document describes an example involving the use of a specific flash device, it is almost certain that this failure, and the workaround herein, affects many other types of devices. Give this procedure a try, and if it works (or even if it doesn't) please add your notes to the end of this article to share your findings. Perhaps with enough feedback we'll be able to better understand the precise nature of this problem, and how to better work around it.

June 12, 2007, at 12:04 AM by mwester -- Added technical notes
Added lines 206-237:

Technical Notes:

This workaround probably has some folks scratching their head wondering how the workaround is any different from the original. The documentation clearly states that if mke2fs is invoked via mkfs.ext3 (which is a symbolic link to mke2fs), it is equivalent to invoking mke2fs -j -- which is exactly what the shell script workaround is doing.

That's correct -- but that's not what "fixes" this issue. In fact, the magical item that makes it work is the redirection (!) of STDOUT. Lacking the redirection to /tmp/mkfs.log, the script fails in exactly the same manner as the original symbolic link.

An interesting hint to the nature of the problem can be obtained by piping the output from e2mkfs to tee instead of redirecting it to the log file:

 /usr/bin/e2mkfs -j $@ | tee /tmp/mkfs.log

Doing this will also solve the problem (it seems that e2mkfs doesn't care where it's STDOUT is directed, just somewhere other than where it's directed by the Linksys code (utility.cgi) that is invoking it). However, the log file will contain two copies of the log information -- each character will be doubled up. This implies that the tee command (which is supposed to send a copy of its STDIN to its STDOUT and another copy to the named file) is having some troubles with its STDOUT, and ends up sending both streams of data to the named file.

It raises some interesting questions about the nature of a number of the failures observed with the Linksys code, and if they all may have in common the same strange settings as it relates to STDOUT. How to investigate this further, and how to ultimately resolve this, is yet to be figured out. Bright people with bright ideas are welcomed to experiment, and add their observations to this article, in the section below!


June 11, 2007, at 11:50 PM by mwester -- final formatting pass
Deleted line 184:
 # 
June 11, 2007, at 11:49 PM by mwester -- Added the final mount data
Added lines 98-101:

You must have an NSLU2 that has not been unslung already; if you have previously unslung the device (successfully executing the unsling command on that NSLU2, regardless of which disk or flash device you used), you must reflash the firmware to start afresh.

Changed line 154 from:
to:
 #
Added lines 187-200:
 # mount
 /dev/mtdblock4 on / type jffs2 (rw)
 /proc on /proc type proc (rw)
 usbdevfs on /proc/bus/usb type usbdevfs (rw)
 /dev/mtdblock4 on /dev.state type jffs2 (rw)
 ramfs on /dev type ramfs (rw)
 /dev/mtdblock4 on /var.state type jffs2 (rw)
 ramfs on /var type ramfs (rw)
 none on /tmp type ramfs (rw)
 /dev/sda1 on /share/flash/data type ext3 (rw)
 /dev/sda2 on /share/flash/conf type ext3 (rw,sync)
 #
June 11, 2007, at 11:34 PM by mwester -- Final (I hope) formatting for today
Changed lines 57-67 from:

sda: Write Protect is off

 /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3

Adding Swap: 127964k swap-space (priority -1) kjournald starting. Commit interval 5 seconds EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3-fs: corrupt root inode, run e2fsck kjournald starting. Commit interval 5 seconds EXT3-fs: corrupt root inode, run e2fsck

to:
 sda: Write Protect is off
  /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3
 Adding Swap: 127964k swap-space (priority -1)
 kjournald starting.  Commit interval 5 seconds
 EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
 EXT3-fs: mounted filesystem with ordered data mode.
 kjournald starting.  Commit interval 5 seconds
 EXT3-fs: corrupt root inode, run e2fsck
 kjournald starting.  Commit interval 5 seconds
 EXT3-fs: corrupt root inode, run e2fsck
 # 
Changed lines 85-86 from:
  Vendor: SanDisk?   Model: Cruzer Mini       Rev: 0.2
to:
   Vendor: SanDisk?   Model: Cruzer Mini       Rev: 0.2
 #
Changed lines 98-100 from:

'''Warning! You must enter the commands below exactly as you see them, character for character. Every character is significant, and altering even one of them may cause this procedure to fail, requiring that you reflash the NSLU2

to:

'''Warning! You must enter the commands below exactly as you see them, character for character. Every character is significant, and altering even one of them may cause this procedure to fail, requiring that you reflash the NSLU2 \

Changed line 111 from:

lrwxrwxrwx 1 root root 6 Dec 31 1969 /usr/bin/mkfs.ext3 -> mke2fs

to:
 lrwxrwxrwx    1 root     root            6 Dec 31  1969 /usr/bin/mkfs.ext3 -> mke2fs
Changed line 119 from:

-rwxr-xr-x 1 root root 47 Jun 11 08:20 /usr/bin/mkfs.ext3

to:
 -rwxr-xr-x    1 root     root           47 Jun 11 08:20 /usr/bin/mkfs.ext3
Changed lines 123-125 from:
  1. !/bin/sh

/usr/bin/mke2fs -j $@ >/tmp/mkfs.log

to:
 #!/bin/sh
 /usr/bin/mke2fs -j $@ >/tmp/mkfs.log
 #
Changed lines 142-145 from:

mke2fs 1.34 (25-Jul-2003) Could not stat /dev/fooey --- No such file or directory

The device apparently does not exist; did you specify it correctly?

to:
 mke2fs 1.34 (25-Jul-2003)
 Could not stat /dev/fooey --- No such file or directory

 The device apparently does not exist; did you specify it correctly?
Changed line 149 from:

-rw-r--r-- 1 root root 0 Jun 11 08:27 /tmp/mkfs.log

to:
 -rw-r--r--    1 root     root            0 Jun 11 08:27 /tmp/mkfs.log
Changed lines 171-181 from:

kjournald starting. Commit interval 5 seconds EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal EXT3-fs: mounted filesystem with ordered data mode. kjournald starting. Commit interval 5 seconds EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal EXT3-fs: mounted filesystem with ordered data mode. EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal

to:
 kjournald starting.  Commit interval 5 seconds
 EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal 
 EXT3-fs: mounted filesystem with ordered data mode.
 kjournald starting.  Commit interval 5 seconds
 EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
 EXT3-fs: mounted filesystem with ordered data mode.
 kjournald starting.  Commit interval 5 seconds
 EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
 EXT3-fs: mounted filesystem with ordered data mode.
 EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
 # 
June 11, 2007, at 11:32 PM by mwester -- Still more formatting
Added line 83:
 # dmesg | grep Vendor
Deleted line 84:
  1. dmesg | grep Vendor
Added lines 108-109:
 # cd /usr/bin
 # ls -l /usr/bin/mkfs.ext3
Deleted lines 110-111:
  1. cd /usr/bin
  2. ls -l /usr/bin/mkfs.ext3
Deleted lines 111-120:
  1. mv /usr/bin/mkfs.ext3 /usr/bin/mkfs.ext3.orig
  2. echo '#!/bin/sh' >/usr/bin/mkfs.ext3
  3. echo '/usr/bin/mke2fs -j $@ >/tmp/mkfs.log' >>/usr/bin/mkfs.ext3
  4. chmod +x /usr/bin/mkfs.ext3
  5. ls -l /usr/bin/mkfs.ext3

-rwxr-xr-x 1 root root 47 Jun 11 08:20 /usr/bin/mkfs.ext3

  1. cat /usr/bin/mkfs.ext3
  2. !/bin/sh

/usr/bin/mke2fs -j $@ >/tmp/mkfs.log

Added lines 113-126:
 # mv /usr/bin/mkfs.ext3 /usr/bin/mkfs.ext3.orig
 # echo '#!/bin/sh' >/usr/bin/mkfs.ext3
 # echo '/usr/bin/mke2fs -j $@ >/tmp/mkfs.log' >>/usr/bin/mkfs.ext3
 # chmod +x /usr/bin/mkfs.ext3
 # ls -l /usr/bin/mkfs.ext3
-rwxr-xr-x    1 root     root           47 Jun 11 08:20 /usr/bin/mkfs.ext3
 # cat /usr/bin/mkfs.ext3
#!/bin/sh
/usr/bin/mke2fs -j $@ >/tmp/mkfs.log
#
Added line 140:
 # /usr/bin/mkfs.ext3 -m 1 /dev/fooey
Deleted line 141:
  1. /usr/bin/mkfs.ext3 -m 1 /dev/fooey
Deleted lines 145-147:
  1. ls -l /tmp/mkfs.log

-rw-r--r-- 1 root root 0 Jun 11 08:27 /tmp/mkfs.log

Added lines 147-151:
 # ls -l /tmp/mkfs.log
-rw-r--r--    1 root     root            0 Jun 11 08:27 /tmp/mkfs.log
#
Added line 169:
 # dmesg | tail
Deleted line 170:
  1. dmesg | tail
June 11, 2007, at 11:28 PM by mwester -- More formatting
Added line 55:
 # dmesg | tail
Deleted line 56:
  1. @]dmesg | tail[@
June 11, 2007, at 11:27 PM by mwester -- Formatting
Changed line 56 from:
  1. dmesg | tail
to:
  1. @]dmesg | tail[@
Changed line 84 from:
  1. dmesg | grep Vendor
to:
  1. dmesg | grep Vendor
June 11, 2007, at 11:20 PM by mwester -- Formatting
Added line 3:
Changed line 22 from:

Failure Symptoms

to:

Failure Symptoms

Changed lines 39-40 from:

Preliminary Diagnosis

to:

Preliminary Diagnosis

Changed lines 46-47 from:

Confirming the Problem

to:

Confirming the Problem

Changed line 53 from:

(:table border=0 width=80% bgcolor=#ddeedd:)

to:

(:table border=0 width=90% bgcolor=#ddeedd:)

Changed lines 75-76 from:

Identifying the Hardware

to:

Identifying the Hardware

Changed line 81 from:

(:table border=0 width=80% bgcolor=#ddeedd:)

to:

(:table border=0 width=90% bgcolor=#ddeedd:)

Changed lines 90-91 from:

Workaround

to:

Workaround

Changed line 98 from:

Warning! You must enter the commands below exactly''' as you see them,

to:

'''Warning! You must enter the commands below exactly as you see them,

Changed line 106 from:

(:table border=0 width=80% bgcolor=#ddeedd:)

to:

(:table border=0 width=90% bgcolor=#ddeedd:)

Changed line 134 from:

(:table border=0 width=80% bgcolor=#ddeedd:)

to:

(:table border=0 width=90% bgcolor=#ddeedd:)

Changed line 148 from:

Verifying that the Workaround Works

to:

Verifying that the Workaround Works

Changed line 161 from:

(:table border=0 width=80% bgcolor=#ddeedd:)

to:

(:table border=0 width=90% bgcolor=#ddeedd:)

June 11, 2007, at 11:17 PM by mwester -- formatting
Changed lines 5-7 from:

[-This article is preliminary. If you have additional information, or wish to comment, please do so by adding to the end of this article. The author will update the body to reflect changes, incorporate feedback, provide clarification, etc. -]

to:

This article is preliminary. If you have additional information, or wish to comment, please do so by adding to the end of this article. The author will update the body to reflect changes, incorporate feedback, provide clarification, etc.

June 11, 2007, at 11:15 PM by mwester --
Changed line 3 from:

(:table border=0 width=40% bgcolor=#ffdddd:)

to:

(:table border=0 width=90% bgcolor=#ffdddd:)

Changed lines 5-6 from:

[-This article is preliminary. If you have additional information, or wish to comment, please do so by adding to the end of this article. The author will

to:

[-This article is preliminary. If you have additional information, or wish to comment, please do so by adding to the end of this article. The author will

Changed lines 31-32 from:

"Formatted (FAT16?/32)".

to:

"Formatted (FAT16/32)".

Changed lines 35-37 from:

the state returns to "Formatted (FAT16?/32)" -- clearly not what was expected (it should read "Formatted (EXT3)" if it was successfully formatted).

to:

the state returns to "Formatted (FAT16/32)" -- clearly not what was expected (it should read "Formatted (EXT3)" if it was successfully formatted).

Changed line 47 from:

The problem, in this specific instance, is that the first filesystem on the device

to:

The problem, in this specific instance, is that the first file system on the device

Changed line 52 from:

(:table border=0 width=40% bgcolor=#ddeedd:)

to:

(:table border=0 width=80% bgcolor=#ddeedd:)

Changed line 80 from:

(:table border=0 width=40% bgcolor=#ddeedd:)

to:

(:table border=0 width=80% bgcolor=#ddeedd:)

Changed line 97 from:

''Warning! You must enter the commands below exactly as you see them,

to:

Warning! You must enter the commands below exactly''' as you see them,

Changed lines 100-101 from:

and start over. Use extreme care.''

to:

and start over. Use extreme care.'''

Changed line 105 from:

(:table border=0 width=40% bgcolor=#ddeedd:)

to:

(:table border=0 width=80% bgcolor=#ddeedd:)

Deleted line 107:
Changed lines 131-133 from:

do not proceed. It will fail.

(:table border=0 width=40% bgcolor=#ddeedd:)

to:

do not proceed. It will fail.

(:table border=0 width=80% bgcolor=#ddeedd:)

Changed line 160 from:

(:table border=0 width=40% bgcolor=#ddeedd:)

to:

(:table border=0 width=80% bgcolor=#ddeedd:)

June 11, 2007, at 11:11 PM by mwester -- Initial
Added lines 1-184:

This article pertains to:

  • Unslung 6.8-beta only

(:table border=0 width=40% bgcolor=#ffdddd:) (:cell:) [-This article is preliminary. If you have additional information, or wish to comment, please do so by adding to the end of this article. The author will update the body to reflect changes, incorporate feedback, provide clarification, etc. -] (:tableend:)


A fairly common failure mode is the inability to format a device from the Linksys Web GUI.

Normally this would not be a big problem, as on most Linux-based systems one would simply go ahead and perform the operation manually. However, it is not currently possible to do so with Unslung 6.8-beta (and earlier), for several reasons.

This article (currently) describes one failure mode, and a work-around for that failure. The precise nature of the failure is unknown, so we currently have no good way to know how many formatting failure scenarios this workaround may fix. This article describes a known reproducible failure mode, and a workaround.

Failure Symptoms

The reproducible cases for this failure include the use of a specific hardware device (The 1.0GByte Sandisk Mini Cruzer flash device).

Starting from booting up a just-flashed NSLU2 with a fresh copy of the Unslung 6.8-beta firmware, the user follows the standard procedure to enable telnet, and telnet into the device. Having read the appropriate documentation, the user then plugs the storage device into the selected USB port (either one, the failure is the same, although the logs and examples below will all assume USB Port 2). The flash device is correctly identified by the firmware, and the Linksys Web GUI Disk Management screen displays the status as "Formatted (FAT16?/32)".

The user then begins the formatting procedure from the Web GUI in the normal fashion. The GUI changes to reflect the state of the disk to be "Formatting". After a time, the state returns to "Formatted (FAT16?/32)" -- clearly not what was expected (it should read "Formatted (EXT3)" if it was successfully formatted).

Preliminary Diagnosis

At this point, repeated attempts to format the device will fail. Placing the USB device in a Windows system will show that it is partitioned into three partitions, of the correct sized (the second and third partitions are each 128MBytes in size, and the first partition makes up the balance of the device).

Confirming the Problem

The problem, in this specific instance, is that the first filesystem on the device is corrupted during the creation process. This can be easily verified as follows. Immediately after the failed format attempt, execute the following command in the telnet session:

(:table border=0 width=40% bgcolor=#ddeedd:) (:cell:)

# dmesg | tail
sda: Write Protect is off
 /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3
Adding Swap: 127964k swap-space (priority -1)
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: corrupt root inode, run e2fsck
kjournald starting.  Commit interval 5 seconds
EXT3-fs: corrupt root inode, run e2fsck
# 

(:tableend:)

Note the presence of the text indicating that the filesystem was corrupted. (Advanced users can also use the "e2fsck -f /dev/sda1" utility to perform a file-system integrity check on the suspect device; the utility will find a number of corruption problems.)

Identifying the Hardware

Use the command below to identify the hardware in use. The example below identifies one flash device known to fail in this manner (field reports indicate that the revision 0.1 devices have also been known to fail).

(:table border=0 width=40% bgcolor=#ddeedd:) (:cell:)

# dmesg | grep Vendor
  Vendor: SanDisk   Model: Cruzer Mini       Rev: 0.2
#

(:tableend:)

Workaround

The failure occurs in the actual utility that writes the empty filesystem onto the newly-partitioned device, in the middle of the Linksys Web GUI process. We cannot alter the Linksys code, but we can replace the utility in question with a simple shell script that fixes the problem and calls the original utility, all transparent to the Linksys Web GUI code.

''Warning! You must enter the commands below exactly as you see them, character for character. Every character is significant, and altering even one of them may cause this procedure to fail, requiring that you reflash the NSLU2 and start over. Use extreme care.''

The procedure below moves the original Linksys utility aside (renaming it with a ".orig" suffix), then writes a short shell script to replace it.

(:table border=0 width=40% bgcolor=#ddeedd:) (:cell:)

#
# cd /usr/bin
# ls -l /usr/bin/mkfs.ext3
lrwxrwxrwx    1 root     root            6 Dec 31  1969 /usr/bin/mkfs.ext3 -> mke2fs
# mv /usr/bin/mkfs.ext3 /usr/bin/mkfs.ext3.orig
# echo '#!/bin/sh' >/usr/bin/mkfs.ext3
# echo '/usr/bin/mke2fs -j $@ >/tmp/mkfs.log' >>/usr/bin/mkfs.ext3
# chmod +x /usr/bin/mkfs.ext3
# ls -l /usr/bin/mkfs.ext3
-rwxr-xr-x    1 root     root           47 Jun 11 08:20 /usr/bin/mkfs.ext3
# cat /usr/bin/mkfs.ext3
#!/bin/sh
/usr/bin/mke2fs -j $@ >/tmp/mkfs.log
#

(:tableend:)

Test your work by running the utility with a bogus device name. You should observe the same error message shown in the example, and you should see the existence of the empty (size of zero) log file. If you don't, go back to the previous step, and try again. If this is the second time or more that you've not managed to get the identical results as below, a good way to verify your work is to have someone else read the text to you as you type it, and verify that you are typing it correctly. If you cannot get the same results as below, do not proceed. It will fail.

(:table border=0 width=40% bgcolor=#ddeedd:) (:cell:)

# /usr/bin/mkfs.ext3 -m 1 /dev/fooey
mke2fs 1.34 (25-Jul-2003)
Could not stat /dev/fooey --- No such file or directory

The device apparently does not exist; did you specify it correctly?
# ls -l /tmp/mkfs.log
-rw-r--r--    1 root     root            0 Jun 11 08:27 /tmp/mkfs.log
#

(:tableend:)

Verifying that the Workaround Works

No reboots are necessary. If you followed the process above to confirm the problem, then created the script, and tested it as described above, you can simply proceed. If you rebooted, no problem -- just make sure that you have enabled telnet, are telnet'd in, and have the device plugged in.

Go to the appropriate Linksys Web GUI page, and format the device. This time the format should succeed.

Confirm this using the "dmesg" command, as illustrated below, and ensure that the final messages appear as they do in the example here. Then use the "mount" command to verify that /dev/sda1 and /dev/sda2 are mounted, as illustrated below.

(:table border=0 width=40% bgcolor=#ddeedd:) (:cell:)

# dmesg | tail
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
# 

(:tableend:)

If all is well, proceed with the "unsling" command as documented in the README file.


Comments/Feedback Below:

view · edit · print · history · Last edited by Rolf.
Based on work by bluebear, bouvin, Stan Sieler, russemailnu, and mwester.
Originally by mwester.
Page last modified on August 04, 2008, at 12:25 AM