Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Hardware - Troubleshooting and Discussion > Mac Notebooks > Mounting a USB drive on a damaged powerbook question

Mounting a USB drive on a damaged powerbook question
Thread Tools
mwiik
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 30, 2007, 01:08 PM
 
Please excuse my cluelessness

My 3 years and 2 weeks old Powerbook G4 (15", 125 mhz) just had a drive failure. I have no backup. I called Apple Support and they said to send it in, but I'd like to see if I can recover at least some of my files first. It does boot in single-user mode, but if trying to boot normally it turns itself off after a couple seconds with the grey screen/Apple logo/spinning cursor.

While on the Apple support call we tried running Disk Utility from the Tiger install DVD, but the HD (both names) were in red and the verify/repair options not selectable. There was also a message (in red) re S.M.A.R.T. failure.

In single-user mode, running fsck shows:

localhost:/ root# fsck
** /dev/rdisk09
** Root file system
Invalid Volume Header
** Checking HFS Plus volume.
** Checking Extents Overflow file.
Invalid sibling link
(3,127)
** Volume check failed.

I noticed when I did a find command from my /users dir it would find the files ok but also gave these error messages:

hfs_swap_BTNode: offsets 28 and 29 out of order (0x1302, 0x1248)
node=0590 fileID=4 volume=Macintosh HD device=root_device

It prints the above multiple times (7, to be exact) and finding something else shows the exact same messages the same number of times.

When I do an ls -l on my /users dir it appears the owner and group are both almost always set to '501' instead of my user name. I had defined another user, this shows up as '502'.

I presume the 3,127 are major/minor device numbers, so I did:

ls -l /dev | grep 127

and it only showed 5,127 ptywf and 4,127 ttywf

I have a borrowed iBook and a WD Passport USB external drive. On the iBook I formatted the WD drive to HFS Extended (but no journaling).

I need to know how to mount the WD drive on my powerbook so I can do rsync or something. I may sound like I know unix but that was many years ago and I was never a sysadmin.

mount by itself shows:

root_device on / (local, read-only, journaled)
devfs on /dev (local)
fdesc on /dev (union)

Via http://forums.macosxhints.com/archive/index.php/t-22516 , I am not sure the USB disk is being recognized. I don't see any difference when doing ls -l /dev/disk* with the USB drive plugged in or not.

I rebooted with the USB drive already plugged in and again noticed no difference in /dev/disks*

I tried /sbin/mount -uw / but again nothing new shows up in /dev/disks*. mount does show <volfs> on /.vol now but df shows <volfs> with only 1024 blocks and capacity at 100%

I'm perfectly willing to get a Firewire drive if that would help. Any clues would be appreciated. Thanks!
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Mar 30, 2007, 01:44 PM
 
First, if your drive is damaged, you should really not be booting from it. You're risking additional damage/corruption.

The 501/502 issue is a red herring. In single user mode, user ids and names aren't properly associated (they're stored, I believe, in a netinfo database that isn't read until later in the boot process).

If you have a Firewire cable, and a recent OS X (10.4 or newer should be sufficient) on your iBook, you can use it as a boot drive for the PowerBook via FireWire Target Disk mode. Boot the iBook holding down the 'T' key. When the screen displays the FireWire icon, hook it up to your PowerBook, and boot that, holding down the option key. Then choose the FW disk to boot from. Once booted, you can attach your USB drive, and copy off your data. After you've copied what you can, and surveyed the contents, you can decide if you want to spend money on data recovery utilities, and or services.
     
Timetheus
Forum Regular
Join Date: Jan 2006
Location: Frogstar World B
Status: Offline
Reply With Quote
Mar 30, 2007, 01:48 PM
 
Have tou using the iBook to boot the Powerbook in Target Disk Mode?

Plug the Pbook into the IBook using a standard 6-pin to 6-pin FW cable. W/ the iBook on, powerup the Pbook while holding "T."

This boots the PB HD as a External FW disk, which you should then be able to access from the iBook's Desktop to copy files (which could then be copied from the iBook to the External HD for a future restore.)

*edit - either MFbernstein's or My method should work (they're slighly different approaches).
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 01:51 PM
 
Believe me, I appreciate the help, but this isn't working.

I tried Timetheus's approach first, but the powerbook's drive icon never showed up on the iBook. System Prefs/Networking showed a new Firewire device, though the only thing to do here was set an IP address, which I didn't think would help any.

Using mfbernstein's method, I got the powerbook to boot from the iBook drive, though I still can't access the powerbook's disk. In Disk Utility the powerbook's disk is still in red, with the verify/repair options not selectable, and it says it is not mounted and that S.M.A.R.T. is 'failing'. Further, the USB drive was not detected when plugged into the powerbook (though it works fine plugged into the iBook). The powerbook has 2 USB connections, I'm using the leftside one for the USB drive. (The light on the USB drive is on leading me to believe the leftside USB port on the powerbook is powered).

Can I somehow mount the powerbook drive, even read-only?
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Apr 2, 2007, 02:21 PM
 
Sorry the earlier suggestion didn't work.

How about this: I just checked and my iBook will mount Firewire drives, even in single-user mode (won't do this with USB drives, which may be why your WD Passport didn't do the trick). So you can boot your iBook into Firewire target disk mode, connect it to the PowerBook and boot the PowerBook in single-user mode. The iBook's drive should appear as /dev/disk1.

The main partition of the iBook should by /dev/disk1s10.
To mount it, do: 'mount_hfs /dev/disk1s10 /Volumes'

From here, assuming your data is in fact still at least marginally accessible, you can copy it over. Something along the lines of:
cp -Rp /Users /Volumes/users-from-powerbook

Let me know if that works out for you.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 03:11 PM
 
This is close, but I can't mount /dev/disk1s10. Doing an ls -l on /dev/disk* on the powerbook, with the iBook in FW target mode, does show me /dev/disk1 thru disk1s9, which is in addition to the /dev/disk0 thru /dev/disk0s9 which shows up on the powerbook w/o using the iBook as FW target. So the powerbook does get the FW drive, though possibly I should use a different /dev/disk for the mount command?
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Apr 2, 2007, 03:29 PM
 
Yes, by all means try the partitions, starting from the last one (disk1s7) . Probably the presence (or absence) of OS 9 disk drivers explains the difference between your system and mine.

edit: Of course, it'll only mount if it is in fact an HFS partition. Still, a good idea to check that it's the iBook's main partition that you mounted, so you have enough space to copy your data over to it. Also, if you hook up the WD external drive to the iBook while doing this, that drive may also show up in /dev . I'm not sure, but it would be interesting to know.
( Last edited by mfbernstein; Apr 2, 2007 at 03:38 PM. )
     
OreoCookie
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Apr 2, 2007, 04:05 PM
 
OK, first of all, don't boot from the damaged drive. Don't do anything to it.
(1) Get a new harddrive. NOW.
(2) Invest into Data Rescue II, it's a tool similar to DiskWarrior, but different: it only reads from damaged volumes and restores on other volumes. This way, you never makes matters worse (at least not the underlying data structure, it doesn't help with hardware problems). Even if the harddrive doesn't show up in the Finder, it will show up in Data Rescue as long as the physical connection works (just check in the System Profiler).
(3) Salvage all the data you can from that drive with DataRescue onto another harddrive. Don't clone onto your new drive! (Never clone broken installs of operating systems.)
(4) Replace the faulty harddrive.
(5) Make a fresh install of OS X. Copy all necessary data onto your new drive.
(6) Invest into a backup solution.

Even if you are sceptical about the costs of this solution, ask yourself the simple question: how much is your data worth to you?
I don't suffer from insanity, I enjoy every minute of it.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 04:56 PM
 
OreoCookie, I appreciate the point, and it's now quite clear to me why I should have bought an external drive earlier. I will check out Data Rescue II.

mfbernstein: This appears to be working now! Woohoo!!! My initial attempt at resuing my Pictures dir didn't work, it did create the Pictures folder on the FW target iBook, but no subdirs. Rebooting the iBook normally, I noted that I had no perms whatsoever on the Pictures folder, and I don't have the admin password for the iBook.

The thing to mount was /dev/disk1s9, confirmed as the 'BSD name' for the Mac HD on the iBook. And yes, the OS9 drivers are installed on the iBook.

As a test, I was able to copy over a single dir's worth of photos, so, it does seem possible to get my files off the powerbook, though it may well be a long and tedious process. Hopefully I can discover shortcuts along the way. Nearly all my work is external so aside from a bunch of docs, my photos, and my purchased iTunes, there's likely tons of stuff I'm not overly concerned about losing.

I have an appointment with the 'Genius Bar' tomorrow morning at my local Apple store, maybe they can do something (although I dunno what their rep is).

But anyways, Thanks again!!!
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Apr 2, 2007, 05:14 PM
 
For the permissions problem: you can boot the iBook in single-user mode and do 'chmod -R 777 /myrescuedfiles' (or wherever you've put them). Just DON'T touch any system files by accident (ie /Library, /System, /private, etc.)

I disagree about Data Rescue. First, booting into single-user mode causes almost no write activity to the disk. Second, with data recovery tools, it's a crapshoot. Sometimes they work, sometimes they don't. Data Rescue has never recovered a useful file for me, despite many long scans of a damaged drive. Keep the external drive. Backup early and often. Don't expect software miracles to make up for hardware failures.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 05:15 PM
 
Urgh, spoke too soon. I presumed the cp commands were working since they completed without error messages, but now, after rebooting the iBook normally, I don't see the files on the iBook.

I didn't copy the .DS_Store files over, though not sure what impact that would have: I figured the files would be there but can't see them in Finder or terminal.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 05:22 PM
 
Yeah, for this test, I chmod 777 my backup dir and made a bunch of subdirs, all also chmod 777, and copied over JPG's one dirs' worth at a time, specifying a different target dir in each case. The iBook is booted in FW target mode. Not sure if booting the iBook in single-user-mode would help. It's like the bits in my jpegs got dropped on the floor or something.

The powerbook in single-user mode makes it clear it's got a read-only filesystem. I'm wondering if that applies to the FW drive too? It's weird that the cp commands gave no error yet the files aren't there.
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Apr 2, 2007, 05:23 PM
 
.DS_Store files aren't necessary (don't matter at all). You're certain about where you saved the files on the iBook? Used cp -R (needed to recursively copy)?
     
OreoCookie
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Apr 2, 2007, 05:47 PM
 
DataRescue has saved my butt once (it recreated the filesystem on my backup drive). Plus, almost no activity is different from none. It's not a guarantee that it can recover the data, but it's a guarantee that matters won't be any worse. Don't try to solve permission problems (or any others) on your damaged drive. Once you have copied the drive, you try fixing permissions, etc. on a working drive.

I'm not saying it'll work, in particular in case of hardware failure. But it's a good shot.
I don't suffer from insanity, I enjoy every minute of it.
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Apr 2, 2007, 06:02 PM
 
No, the external drive is being mounted read-write. You can double check by running the mount command with no options. It should include: /dev/disk1s7 (local,...).

If you have the space on the iBook, I'd recommend trying to copy everything at once. Don't try and guess which files are important or not, just grab your whole /Users directory.

OreoCookie: I'm not following. The permissions issue is on the destination drive. The damaged drive is being mounted read-only, so that the files can be copied off onto another drive. It may well not work, but it's not causing any more wear-and-tear than a drive scan, such as that provided by Data Rescue is going to do. The whole point of single user mode is to deal with these types of situations.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 06:04 PM
 
For this test I was only copying a single dir's worth of contents at a time.

There was an issue with the mount command though. When doing 'mount_hfs /dev/disk1s9 /Volumes' it came back with the error:

launchd: chown ("/var/launchd/0"): Read-only file system.

This showed up twice in quick secession, then appeared to just hang there, so I killed it with ctrl-c. At this point /Volumes sure looked like the iBook HD, and I was able to cd around. On my initial attempt at a cp -R of my Pictures dir, it for sure did create such a folder on the iBook, though w/o any files or subdirs.

I then shutdown the powerbook and rebooted the iBook normally. That was when I created a bunch of individual directories on the iBook, chmod'd them all to 777, and attempted to cp one dir's worth of photos over at a time. Again, this seemed to work from the powerbook side (no error messages, and delays appropriate to what I was copying (e.g. cp *.MOV took longer)). This was when I wrote the success message above.

I then shutdown both machines and rebooted the iBook normally, and, no pics, no files whatsoever.

Since the initial cp -R attempt did produce a directory on the iBook (albeit with no owner or perms, and a big minus sign on the folder icon), it does seem capable of writing to the iBook HD, or at least creating a dir there.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 06:25 PM
 
mfbernstein: I would copy my whole users dir over to the iBook but there's not enough space. If I can get it working my plan was to copy some stuff over, reboot and move it to the USB disk, and repeat.

If the folks at the 'Genius Bar' can get it copying something to an external FW drive, then I'll buy such a drive and copy over my whole /users dir at once.
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Apr 2, 2007, 06:27 PM
 
The launchd message is normal: /var/launchd/0 is on the PB HD and so read-only. The hang is not normal: you should be able to just hit return after the message and get a shell prompt.

It's possible that the PB's directory tree is valid, but the underlying data isn't properly readable. Though I'm quite puzzled that it should take time copying, yet not place any visible data anywhere. Very weird. Also, when you say the first cp -R didn't create subdirectories, was it supposed to?

In any case, after copying some data, do an ls -l to make sure the files are showing up in there destinations (and not just the directories). Also do a 'df' before and after to ensure that data is being written (and to the correct drive).

Well, if this doesn't work, there is OreoCookie's method. It appears the DR has a demo available, so you can at least see how useful it'll be before paying.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 06:40 PM
 
Thanks, mfbernstein. I didn't try hitting return, so maybe it wasn't hanging.

Yes, the first cp -R was of my entire Pictures dir and should have created a couple dozen subdirs and copied files over, but only did the initial Pictures dir.

I would download the DR demo today if I could get the powerbook's drive recognized as a FW target for the iBook. Perhaps I could try mounting the powerbook-as-FW-target via the terminal instead of expecting the iBook to recognize it on its own? I'll get the demo on the iBook and see what it says.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 07:09 PM
 
I got files transferred! Really, this time!

I booted the iBook normally, then booted the powerbook in FW target mode. While it didn't give me a desktop icon, it did show up as a new set of partitions in /dev/disk*. via terminal I did:

mkdir myFolder; mount_hfs -o rdonly /dev/disk1s9 myFolder

Still, no desktop icon, but via terminal was able to transfer a directory's worth of files over. The files have the iBook's owner, but I figure I can fix that when I restore.

Now, if I can copy directly to the USB drive (which has plenty of space), I should be good to go!
     
EricTheRed
Dedicated MacNNer
Join Date: Jan 2007
Location: Minnesota
Status: Offline
Reply With Quote
Apr 2, 2007, 07:23 PM
 
Invalid sibling link problems on your Mac, eh?

On start-up press and hold command-S

In a few seconds the terminal will become available. type in df this will show what disks you have and you should be able to figure out the name of the disk that is goofed up. It'll likely be /dev/disk0s2.

Once the disk name has been identified, type in fsck_hfs -r /dev/disk0s2 including the spaces. This will fix your messed up directory problems. It may take a little time for it to complete the task. when it is completed, type in reboot to restart your Mac.
     
mwiik  (op)
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Apr 2, 2007, 08:24 PM
 
Doing a cp -R of my home dir worked for a while, then crapped out, locking up both laptops. Couldn't kill the copy job (though I just tried ctrl-c) and the finder with the USB drive locked up too. I will try with my key dirs and likely forget the rest.
     
mfbernstein
Senior User
Join Date: Mar 2007
Location: San Jose
Status: Offline
Reply With Quote
Apr 2, 2007, 10:58 PM
 
Hopefully you were able to get what you needed off. As you can see, none of this is a very exact science.

Also, for what it's worth, Data Rescue does supposedly work on unmounted drives. Again, it never worked for me, but YMMV, and with a free demo available, it may be worth a shot.

Going forward, the SMART failure is pretty much a guarantee that no amount of fscking will return the drive to good status: once you've got your data off, better zero it and junk it. The 'sibling link' issue is a symptom, not a cause.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:43 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,