How do you run fsck on 2nd hd?

keyizm

Registered
when i reboot my machine and hold down "Apple+S" to get the machine to boot into single user mode, how do i get the fsck from there to run on my 2nd hard drive as well as my 1st hard drive? it seems that fsck only runs on the primary drive and not the 2nd and i can't figure out how to get it to run and check the 2nd drive. any ideas or suggestions would be great!!!
 
Ok...here ya go:

in the Terminal (or at the console after you've done command-s):

mount - type this to find out what device the drive you want to do fsck is (i.e. /dev/disk0s9, or something like that)

sudo -s newfs -N /dev/rdiskXsX

(Note the r there - it's important!)

This command is to make a new file system, but with the -N option, it just displays the file system at the given device. At the end of the output it will have a line that says super-block backups (for fsck -b #) - you use one of these for fsck.

Then you would type fsck -b block # /dev/diskXsX and fsck should check the other hard drive fine for it.

Note: if you don't feel like trying out newfs, one of the super-block backups is usually on block 32 on any drive - so you could try fsck -b 32 /dev/diskXsX and it will most likely work.

2nd Note: This won't work if the drive is mounted read/write, it needs to be mounted read-only.
 
not to take all the fun out of typing and learning unix commands, but you can accomplish the same thing by launching disk utility and verifying and repairing the disks.
 
thanks BOTH OF YOU!! i'm no unix nut so i'll stick with the 2nd method. i just feel silly for not thinking of that one myself :(
 
Quit takin the fun outta everything Ed! :p

Really though, I hadn't thought of that. Sometimes I get too technical :D
 
Back
Top