NSLU2-Linux
view · edit · print · history

HowTo.RecoverFromCorruptBootDrive History

Hide minor edits - Show changes to markup

June 24, 2009, at 11:11 PM by Sumit --
Changed lines 9-10 from:

The way I fixed the issue was to shut down the NSLU2 (using "shutdown -h now"), disconnecting the disk and connecting it to a Windows XP computer running VMWare? image of Debian Linux, running "fsck -fcyv /dev/sdb2" (where /dev/sdb2 was the device address for the new disk - you must umount the disk if it gets mounted automatically before you can run fsck). It took almost 30 minutes but the recovery completed and, upon reconnecting the disk to the NSLU2 and pressing the power button, I had a functioning NSLU2 within minutes.

to:

The way I fixed the issue was to shut down the NSLU2 (using "shutdown -h now"), disconnecting the disk and connecting it to a Windows XP computer running a VMware? image of Debian Linux, running "fsck -fcyv /dev/sdb2" (where /dev/sdb2 was the device address for the new disk - you must umount the disk if it gets mounted automatically before you can run fsck). It took almost 30 minutes but the recovery completed and, upon reconnecting the disk to the NSLU2 and pressing the power button, I had a functioning NSLU2 within minutes.

June 24, 2009, at 11:07 PM by Sumit -- How To: Recover from a Corrupt Boot Drive
Added lines 1-12:

My NSLU2's root partition ("/") got corrupted due to a power failure. Symptoms were:

  • Ready/Status LED would keep alternating between Yellow and Green.
  • Any attempts to create a file would show the error that the filesystem was read-only.
  • Unmounting and remounting with read-write permissions did not have any effect.
  • When trying to view a file through vi, I got messages to the effect of "E303: Unable to open swap file for "filename", recovery impossible"

I tried first to run "shutdown -Fr now", but that did not help. This command is supposed to invoke fsck upon reboot.

The way I fixed the issue was to shut down the NSLU2 (using "shutdown -h now"), disconnecting the disk and connecting it to a Windows XP computer running VMWare? image of Debian Linux, running "fsck -fcyv /dev/sdb2" (where /dev/sdb2 was the device address for the new disk - you must umount the disk if it gets mounted automatically before you can run fsck). It took almost 30 minutes but the recovery completed and, upon reconnecting the disk to the NSLU2 and pressing the power button, I had a functioning NSLU2 within minutes.

Writing this here for my future reference as well as others. Please refer to manpage for fsck for each of the flags and use these instructions at your own risk.

view · edit · print · history · Last edited by Sumit.
Originally by Sumit.
Page last modified on June 24, 2009, at 11:11 PM