Thursday, August 6, 2009

Linux and USB Hard Drive “fsck died with exit status 8”

I decided to setup an old AMD 1.7 GHz system I had as a BackupPC server to back up a few machines I have and experienced an issue with a USB 2.0 Hard Drive. I thought I’d share my situation in case someone else runs into a similar situation.

My BackupPC server has 2 internal IDE hard drives and an external USB 2.0 750 GB SATA hard drive, which is used to store the backups. After I had completed the installation of Ubuntu 9.04 Server edition and rebooted I received the following error during the file system checks.

Failed to open the device 'UUID=2b1da3c5-d190-47c9-8f39-760100368e2c' : No Such file or directory
fsck died with exit status 8
    ...fail!
* File system check failed.
A log is being saved in /var/log/fsck/checkfs if that location is writable.
Please repair the file system manually.
*  A maintenance shell will now be started.
CONTROL-D will terminate this shell and resume system boot.

After researching the error and trying various suggestions I realized that all I needed to do was exclude the external USB hard drive from having it’s file system checked during startup. I solved the issue by editing /etc/fstab and setting the entry for the USB hard drive’s PASS column to a 0, which essentially tells fsck to not check the file system.

Before:

# /var was on /dev/sdc1 during installation
UUID=2b1da3c5-d190-47c9-8f39-760100368e2c /var            reiserfs relatime       0       2

After:

# /var was on /dev/sdc1 during installation
UUID=2b1da3c5-d190-47c9-8f39-760100368e2c /var            reiserfs relatime       0       0

After this little modification to /etc/fstab, I rebooted and once the system came up, I manually mounted the device for my USB 2.0 hard drive as such and all was good.

sudo mount /dev/sdc1

By the way BackupPC setup and configuration can be a little challenging, so I recommend aside from the official documentation the following link, which I’ve found to still be relevant for both Debian and Ubuntu.

http://www.howtoforge.com/linux_backuppc