Existing users, log in.  New users, create a free account.  Lost password?


MacFixIt Logo
 
Contact Us | About MacFixIt | Who's Online  

Page 2 of 2 < 1 2
Topic Options
#213234 - 07/10/04 05:20 PM Re: Problem with the Disk Utility [Re: Virtual1]
MicroMat Tech3 Offline
MacGuru

Registered: 10/08/99
Posts: 16666
You make a good point that Drive Setup running under Mac OS 9 should be able to format a supported device, regardless of its present state, but I assumed that Mac OS 9 was not available.

I do not know the terminal commands to write to a specific block, but I suspect that someone in the UNIX forum at http://discussions.info.apple.com might. I once saw someone post a command that would copy some data at the start of the disk, which must have involved referring to blocks by number.
_________________________
MicroMat Inc
Makers of TechTool

Top
#213235 - 07/10/04 09:35 PM Re: Problem with the Disk Utility [Re: MicroMat Tech3]
Virtual1 Offline
MacGuru

Registered: 01/20/01
Posts: 10527
Loc: Middle 'o Nowhere
After risking life, limb, and hard drive, I found the command. I just *blasted* a flash drive back to empty with terminal commands:

TiBook:~ nfisher$ sudo umount /Volumes/Lexar\ 1/
TiBook:~ nfisher$ sudo dd count=10 if=/dev/rdisk0 iseek=15 of=/dev/rdisk1
10+0 records in
10+0 records out
5120 bytes transferred in 0.066003 secs (77572 bytes/sec)

The first command may not be necessary if it's not mounting properly to begin with. Attempting to nuke a volume that is currently mounted up will only yield an error message. Find out what rdisk number the victim is by doing this command before and after plugging in the FW drive:

ls -la /dev/rdisk*

The set that appears when you plug it in, that's the set you are gunning for. If all you have hooked to your machine at the time is your boot drive, then what you plug in next SHOULD be rdisk1. In the above example I am basically copying blocks 15 through 24 from my boot disk (which contains all zeros) to blocks 0 through 9 on my flash drive. Instant partition table annihilation. The drive is for all intents and purposes, empty and fresh from the factory, and MacOS will offer to format it when you plug it back in.

Careful with this command. What it does is permanent and forever with no take-backs and no are-you-really-really-sure's. It WILL render the target device ready for initializing, in this case, rdisk1.
_________________________
- I work for the Department of Redundancy Department

Top
#213236 - 07/11/04 01:42 AM Re: Problem with the Disk Utility [Re: Eibbor]
yoxi Offline
MacWriter

Registered: 04/19/02
Posts: 168
Loc: Cambridge, UK
Just out of curiosity, your firewire drive isn't a LaCie drive, is it?

I had a similar problem with a LaCie D2 firewire 800 drive crashing Disk Utility/Diskutil every time I tried to repartition it (though it read/wrote fine), and it turned out that the drive itself was faulty somewhere in the firewire bridge hardware - one way to verify this is by running System Profiler and seeing if that app crashes when you click in the Firewire tab...
_________________________
---------->
[color:"purple"]If it's brokenless, don't suffix it...[/color]
macbook pro C2D 2.66GHz, 3Gb ram, 10.5.7, blah blah

Top
#213237 - 07/11/04 08:23 AM Re: Problem with the Disk Utility [Re: Virtual1]
MicroMat Tech3 Offline
MacGuru

Registered: 10/08/99
Posts: 16666
Impressive.

Those of you who want to see more details about the dd process (which was the one I saw at the UNIX forum at Apple Discussions) should open Terminal and type:

man dd
_________________________
MicroMat Inc
Makers of TechTool

Top
#213238 - 07/11/04 08:38 AM Re: Problem with the Disk Utility [Re: MicroMat Tech3]
Virtual1 Offline
MacGuru

Registered: 01/20/01
Posts: 10527
Loc: Middle 'o Nowhere
One last followup for the 'advanced' users... you may occasionally run into an external drive that when you plug it in, it never mounts up, and if you open Disk Utility while it's plugged in, it'll probably pinwheel. Doing a top -l1 in terminal will show process fsck_hfs running forever or until you unplug the ext HD. This happens when a disk is damaged in a way that thoroughly confuses fsck when it tries to check it over before mounting it. Disk Warrior (and I bet norton) has a hacked down variation of fsck_hfs on its bootable CD that will "give up easily" so that the CD will eventually continue to boot up and you can repair the drive. Unfortunately, if DW can't fix it, there is no ability to reformat in DW, so you are stuck with a drive that can't be salvaged.

Lacking that, you can rename the fsck_hfs to any other name, and then plug in the ext HD. This prevents the disk check from running, and contrary to expectations, does NOT prevent it from attempting to mount up. It may mount, or it may give an error (due to the corruption that's causing the grief) but then you can run disk repair utils, ditto your data off, or reformat the drive depending on your needs. (I've ran into three drives so far in service that I had to disable fsck before mounting so I could reformat them) Be sure to rename fsck_hfs back when you're done.

If the drive is tanking your machine when it tries to mount, you can probably rename the mount programs as well, to prevent that step from occurring and allow you to run Disk Utility to reformat it. (mount_hfs iirc is the one to focus on) These are all in /sbin btw, and you will need to sudo when you do the mv command:

cd /sbin
sudo mv fsck_hfs fsck_hfs2

That will rename fsck_hfs to fsck_hfs2 and prevent the disk check from occurring prior to mount up. Panther has another fsck app, fsck_dos, in case you are having this issue with a PC-formatted HD.
_________________________
- I work for the Department of Redundancy Department

Top
#213239 - 07/11/04 10:21 AM Re: Problem with the Disk Utility [Re: yoxi]
Eibbor Offline
New User

Registered: 07/08/04
Posts: 13
No it isn't a Lacie.. I know there nothing wrong with it, because i used to be able to open the Disk Utility on it.. I figuered out how to fix the problem though.

Top
#213240 - 07/12/04 07:22 AM Re: Problem with the Disk Utility [Re: Eibbor]
MicroMat Tech3 Offline
MacGuru

Registered: 10/08/99
Posts: 16666
What did you do to fix the problem?
_________________________
MicroMat Inc
Makers of TechTool

Top
#213241 - 07/12/04 08:42 AM Re: Problem with the Disk Utility [Re: MicroMat Tech3]
njxbean Offline
MacWriter

Registered: 02/05/03
Posts: 109
i would have said to simply zero the drive out on a pc. But that little unix trick is cool.

Top
Page 2 of 2 < 1 2


Moderator:  joemikeb, MacManiac 

VersionTracker: Software Updates and Downloads | iPhone Atlas: iPhone Help, News, Tutorials, and Tips