docs:mac:fsck

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docs:mac:fsck [2007/01/23 08:39] – created billhdocs:mac:fsck [2008/08/03 00:25] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== fsck (Mac)====== ====== fsck (Mac)======
 |(hold) command-s|start up in single user mode| |(hold) command-s|start up in single user mode|
 +|df  |display disk free space, along with disk names (most useful when you are not in single user mode, so you can see the full drive list) |
 |/sbin/fsck -fy  |run a filesystem consistency check and interactive repair, assuming yes to all questions (the -f means check a disk even if it is clean)| |/sbin/fsck -fy  |run a filesystem consistency check and interactive repair, assuming yes to all questions (the -f means check a disk even if it is clean)|
 |/sbin/fsck -fn  |run a filesystem consistency check and interactive repair, assuming no to all questions, and do not open the disk for writing| |/sbin/fsck -fn  |run a filesystem consistency check and interactive repair, assuming no to all questions, and do not open the disk for writing|
Line 6: Line 7:
 |exit            |startup without rebooting| |exit            |startup without rebooting|
 |diskutil verifyVolume /|Verify the disk structure of a volume.  Ownership of the affected disk is required.| |diskutil verifyVolume /|Verify the disk structure of a volume.  Ownership of the affected disk is required.|
 +
 +===== BAD SUPERBLOCK / MAGIC NUMBER WRONG =====
 +If you are trying to run fsck on a disk other than the main boot disk, you may see this error:
 +<code>
 +BAD SUPER BLOCK: MAGIC NUMBER WRONG
 +</code>
 +
 +...so run this instead:
 +<code>
 +/sbin/fsck_hfs -fy /dev/rdisk0s3
 +</code>
 +
 +Other Operating System references talk about using newfs -N /dev/diskname to get a list of super-block backups, any of which can be used with the -b flag of fsck to make things work.  This is not the case with Mac / HFS, so use fsck_hfs instead.
 +
 +
 +===== External Links =====
 +  * [[http://docs.info.apple.com/article.html?artnum=106214|Resolve startup issues and perform disk maintenance with Disk Utility and fsck]]
 +  * [[http://www.osxfaq.com/Tutorials/fsck/index.ws|How To Run fsck To Examine A Non-boot Volume In Mac OS X]]
  
  • docs/mac/fsck.1169566756.txt.gz
  • Last modified: 2008/08/03 00:25
  • (external edit)