FS Repair a Corrupted Filesystem: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Linux == | == Linux == | ||
=== Repairing a Corrupted Superblock === | |||
# Locate the superblock backups of the filesystem. | # Locate the superblock backups of the filesystem. | ||
## <tt>'''# dump2fs /dev/<device> | grep -i superblock'''</tt> | ## <tt>'''# dump2fs /dev/<device> | grep -i superblock'''</tt> | ||
Line 5: | Line 6: | ||
## <tt>'''# fsck -b <superblock backup location> /dev/<device>'''</tt> | ## <tt>'''# fsck -b <superblock backup location> /dev/<device>'''</tt> | ||
# Attempt to mount the filesystem. | # Attempt to mount the filesystem. | ||
< | === Mounting a FS with a Corrupted Superblock === | ||
# Locate the superblock backups of the filesystem. | |||
## <tt>'''# dump2fs /dev/<device> | grep -i superblock'''</tt> | |||
# The filesystem can also be mounted by passing the location of the backup superblock to the <tt>'''mount'''</tt> command. | # The filesystem can also be mounted by passing the location of the backup superblock to the <tt>'''mount'''</tt> command. | ||
## <tt>'''# mount sb=<superblock backup location> /dev/<device> <mount location>'''</tt> | ## <tt>'''# mount sb=<superblock backup location> /dev/<device> <mount location>'''</tt> | ||
== Further Reading == | == Further Reading == | ||
# [http://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/ Recover Corrupted Partition From | # [http://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/ Recover Corrupted Partition From a Bad Superblock] | ||
[[Category:Linux]] | [[Category:Linux]] |
Revision as of 13:36, 1 August 2014
Linux
Repairing a Corrupted Superblock
- Locate the superblock backups of the filesystem.
- # dump2fs /dev/<device> | grep -i superblock
- Choose a superblock backup location, and check the filesystem using fsck.
- # fsck -b <superblock backup location> /dev/<device>
- Attempt to mount the filesystem.
Mounting a FS with a Corrupted Superblock
- Locate the superblock backups of the filesystem.
- # dump2fs /dev/<device> | grep -i superblock
- The filesystem can also be mounted by passing the location of the backup superblock to the mount command.
- # mount sb=<superblock backup location> /dev/<device> <mount location>