Repair broken disk on NSLU2
One of the USB disk drives on my Linksys NSLU2 suddenly stopped mounting and showed Unformatted on the Status screen. I have a Mac where I can plug in the USB drive, but MAX OSX Tiger does not support the existing ext3 file system driver, I cannot access the disk there. I did find out that the conf partition was broken, the data partition seemed OK.
I did not want to reformat the disk without first having a chance to save the data on it. The following steps show how to hack yourself into the NSLU2 from a Mac computer and re-enable access to the disk:
- First enable telnet access:
- Boot the NSLU2 with a working hard disk connected t0 USB 1 and the broken disk to USB 2.
- On the Administration->Backup web page, click on the “Download” button in the “Config Backup” section
- Save the file as
config.bin.tar. - On a command prompt enter the command
tar xf config.bin.tar. - Edit the file
config/hdd/passwdand delete the password for root (the second field in the line starting with root). - Enter the command
tar cf config2.bin.tar config. - On the Administration->Backup web page, click on the “Upload” button in the “Config Backup” section and select the file
config2.bin.tarfor upload. - The NSLU2 will reboot.
- Goto the /Management/telnet.cgi page on the NSLU2 and enable telnet.
- Telnet to the NSLU2 and login as root.
- Enter the command
mount /dev/sdb1 /share/flash/data.
Nowls /share/flash/datashould show you the content of the disk. You may needfsck.ext3 /dev/sdb1to repair problems. - Add the following lines to
/etc/samba/smb.conf:
[ADMIN 2]
valid users=@"administrators"
comment=
path=/share/flash/data/
read only=yes
write list=@"administrators"
[DISK 2]
valid users=@"administrators",@"everyone",@"linux"
comment=For everyone
path=/share/flash/data/public/
browseable = yes
read only=yes
write list=@"administrators",@"everyone",@"linux"
This makes the disk available for sharing via Samba. - Enter the command
/etc/rc.d/rc.samba restart.
This restarts the Samba daemon to force it to read the updated configuration file. - Now you can access the disk again on another computer via Windows file sharing.
July 7th, 2006 at 03:07
Hello,
I have an NSLU2 with a Maxtor Storage Device. The NSLU2 is no longer deteciting my Maxtor storage device. Is this the same thing that happen to you? Will your published fix work for me?