PDA

View Full Version : How to mount an external drive in single user mode?




pdpfilms
Sep 10, 2006, 04:27 PM
Hey partners.

Got a problem here- my hard drive on my G5 has become unmountable... Almost. I can't get to it through booting to it, the install disc, the DiskWarrior disc, or target disk mode. I can, however, get to it through single user mode. What I need to do is get some files off of it before I send it in for replacement.

I spoke to applecare for about two hours just now. I can't help but fell like they're not that smart.... I mean, I've never used single user mode before and its like i was teaching it to him. And when i talked to his superior, he just kept saying "this doesn't make any sense... yeah, just doesn't make any sense." and wouldn't provide much help. They basically told me they don't know how to use unix or single user mode, and left me to figure it out myself. But that's besides the point.

I can locate the files i need to move. Specifically, my Aperture library located in Macintosh HD/users/myname/Photography/Aperture/Aperture Library.aplibrary. I have an external drive connected with plenty of space, but don't know how to mount it. All I need to do is mount the drive, then give the command to move the files to the external.

Let's see what you Unix groupies've got.



MrFrankly
Sep 10, 2006, 05:26 PM
mount /dev/disk1s1 /Volumes/BackupDrive


where /dev/disk1s1 is the actual system device (the external drive) and /Volumes/BackupDrive is the name under which you can access it. The latter one can be anything, the /dev has to be correct though.

The actual device might be something else then disk1s1, depending on the external drive, and you might have to create the directory BackupDrive, or use something else that's available in /Volumes.

So:
ls /dev to get a list of devices, your external drive should be there. I think it should be something like disk1s1, or something that looks like it.

ls /Volumes there should be a directory there on which you can mount the drive. Else make one with

mkdir /Volumes/BackupDrive

pdpfilms
Sep 10, 2006, 05:34 PM
Mr. Frankly,
Thanks! However, i'm even more of a Unix noob than you assumed. I'm a bit lost here, and need a bit more of a step-by-step.

So I entered ls /volumes and got 13 different "disk1sX" entries. How do I know which one is the external? It seems that every one I try to select tells me "unknown special file or file system".

Any ideas?

EDIT: ok, they all tell me that except for disk0s3, which is the main problem drive.

MrFrankly
Sep 10, 2006, 05:39 PM
Mr. Frankly,
Thanks! However, i'm even more of a Unix noob than you assumed. I'm a bit lost here, and need a bit more of a step-by-step.

So I entered ls /volumes and got 13 different "disk1sX" entries. How do I know which one is the external? It seems that every one I try to select tells me "unknown special file or file system".

Any ideas?

Do you know the filesystem of the external drive? If it's HFS/HFS+ you could try and do


mount -t hfs /dev/disk1s1 /Volumes/BackupDrive


Just try it for every of those disk1sx entries. From here I can't really tell which one you need.

pdpfilms
Sep 10, 2006, 05:44 PM
I'm almost positive its HFS. When i enter the supplied code, it replies with this to all of the disk1sX options:

usage:
mount [dfruvw] [-o options] [-t ufs | external_type] special node
mount [adfruvw] [-t ufs | external_type]
mount [dfruvw] special | node


any ideas what that means?

EDIT: also, this was without "/volumes/backupdrive" because when i include that, I get the message: stat /Volumes/backupdrive: no such file or directory.

MrFrankly
Sep 10, 2006, 06:00 PM
EDIT: also, this was without "/volumes/backupdrive" because when i include that, I get the message: stat /Volumes/backupdrive: no such file or directory.

You first have to create that directory. As I said in my first post (which is a very badly written explanation I must admit). So first do


mkdir /Volumes/BackupDrive


Make sure you work with case-sensitivity in mind. It shouldn't be necessary, but better be safe than sorry.

now try again:


mount -t hfs /dev/diskXsX /Volumes/BackupDrive


where the X can be any number. (Any number of the disks available in /dev ('ls /dev/disk*'))

pdpfilms
Sep 10, 2006, 06:04 PM
Unfortunately, when I attmept to create that directory, it tells me it's read only. I feel like this command is attempting to create a new directory on the problem hard drive, which is read only at this point. Is there any way to simply mount the external without attempting to create a new directory? If not, is there any way to create a new directory on the external itself?

Blink twice if you have no idea what i'm talking about.

MrFrankly
Sep 10, 2006, 06:11 PM
Unfortunately, when I attmept to create that directory, it tells me it's read only. I feel like this command is attempting to create a new directory on the problem hard drive, which is read only at this point. Is there any way to simply mount the external without attempting to create a new directory? If not, is there any way to create a new directory on the external itself?

Blink twice if you have no idea what i'm talking about.

Aah it's read-only, I think i missed that. Then it's difficult to make a new directory indeed. You can use any directory as a mount point. Just pick any empty directory you have access to. (It doesn't even have to be empty I think, but it would be better)


mount -t hfs /dev/diskXsX </AnyDirectory>


It's not pretty, but that's not very important at this point I assume.

pdpfilms
Sep 10, 2006, 06:15 PM
Heh. about that... How do i know what directories are available to me? It seems the only directories/volumes/files i can find are on the problem drive.

balamw
Sep 10, 2006, 06:20 PM
Do you have an external drive you can boot from? Another Mac you could use to try and access the drive in Target Mode?

B

pdpfilms
Sep 10, 2006, 06:24 PM
Do you have an external drive you can boot from? Another Mac you could use to try and access the drive in Target Mode?

B
Yes, and yes.

Unfortunately, the drive is so botched, it kernel panics any computer that accesses it via target disk mode, and kernel panics any other boot drive as long as it's connected. The only way I can access the files within is in single user mode.

I wish it was that easy.

balamw
Sep 10, 2006, 06:28 PM
The only way I can access the files within is in single user mode.

I wish it was that easy.
Ick. Can you boot off the external in single user mode and not have it kernel panic?

B

pdpfilms
Sep 10, 2006, 06:35 PM
Ick. Can you boot off the external in single user mode and not have it kernel panic?

B
Here are my options:

Internal, super effed-up drive.
Second internal drive, OSX installed.
External drive, OSX not installed.
Powerbook, OSX installed.

Here's what doesn't work, and why:
-Booting from the problem drive- Not sure, problem drive causes kernel panic on startup.
-Booting from the second internal drive, with the first connected- problem drive causes kernel panic on startup.
-Booting up in target disk mode, problem drive connected to Powerbook- Powerbook kernel panics.
-Booting from install disc with problem drive connected- kernel panic on gray apple screen w/ spinning wheel
-Booting from Disk Warrior w/ problem drive connected- kernel panic on gray apple screen w/ spinning wheel.

Here's what does seem to work:
-Single user mode with either internal drive connected.
-Booting from second, working internal drive, problem drive not connected.
-Booting from install disc, problem drive not connected.
-Booting from Disk Warrior w/o problem drive connected.

So I can get into single user mode on the second, working internal drive. Is that something that can help us?

balamw
Sep 10, 2006, 06:42 PM
So I can get into single user mode on the second, working internal drive. Is that something that can help us?
My thought was that if you could boot from a non FUBAR drive, even in single user mode, you might not be restricted to read-only mode and could create a mount point on the working drive.

If you have an external enclosure, you could take this a step further and remove the FUBAR drive and boot the system "normally", then only hook it up when you want to try and get the files off it. You might be able to avoid the kernel panic if you mount it read only from a working system.

B

Mitthrawnuruodo
Sep 10, 2006, 06:44 PM
Why can't you boot from the OS X/system restore disk(s)?

pdpfilms
Sep 10, 2006, 06:49 PM
My thought was that if you could boot from a non FUBAR drive, even in single user mode, you might not be restricted to read-only mode and could create a mount point on the working drive.

If you have an external enclosure, you could take this a step further and remove the FUBAR drive and boot the system "normally", then only hook it up when you want to try and get the files off it. You might be able to avoid the kernel panic if you mount it read only from a working system.

B
Sounds like the first option might work. Wanna help guide me through it?:o

Why can't you boot from the OS X/system restore disk(s)?

Oh, forgot about that. Check above list of working/non working solutions.

Mitthrawnuruodo
Sep 10, 2006, 06:56 PM
Oh, forgot about that. Check above list of working/non working solutions.I saw you mentioned not being able to get it to work, but not why... or what you have tried...

Did you try any of these during startup:
- Option-Command-Shift-Delete
- Option
- C

balamw
Sep 10, 2006, 06:59 PM
Sounds like the first option might work. Wanna help guide me through it?:o
What MrFrankly suggested should work if your fs isn't read only...

B

pdpfilms
Sep 10, 2006, 07:10 PM
I saw you mentioned not being able to get it to work, but not why... or what you have tried...

Did you try any of these during startup:
- Option-Command-Shift-Delete
- Option
- C
Holding C brings up the gray apple screen, where a kernel panic ensues. And actually, I let is set for a while, and the kernel passed (??) and now it's booted from the install disc. Can't do anything though, neither the installer or Disk utility see the drive.

Holding option-command-shift-delete gets me to the gray apple screen, where insteat of the normal dark gray shade dropping down and telling me to restart, i simply get a black box over the apple logo. Stuck there.

Holding option brings me to the blue screen and i have two options to boot from: the installer disc, or the problem hard drive, which shows it has OSX installed. Clickin on either brings me to the gray screen and I get the black box again. (I assume this box is just a graphics glitch, and it's really the kernel panic warning).

pdpfilms
Sep 10, 2006, 07:28 PM
What MrFrankly suggested should work if your fs isn't read only...

B
As I said, I'm pretty clueless when it comes to commands. I'm not sure where I'd locate a directory from which I would make a "mount point"... heck, i don't even know what a mount point is...or an "fs" for that matter. Any guidance that can be sent my way would be GREATLY appreciated.

In fact, thank you all so much for bringing me this far. This is why I love macrumors.

EDIT: OK, I just got into the Disk Warrior disc. This is the farthest i've gotten so far. It recognized the problem drive as an "Unknown Drive" and labelled it as "ready to be rebuilt". So I clicked rebuild and am watching attentively. Right now it's stuck on step 5, locating directory data. My guess is it's gonna have a lot of trouble finding it, if at all.
EDIT 2: I guess it found it... moving on to step 6, "constructing optimized replacement directory"...{fingers turning white from all the crossing}

balamw
Sep 10, 2006, 07:40 PM
As I said, I'm pretty clueless when it comes to commands. I'm not sure where I'd locate a directory from which I would make a "mount point"... heck, i don't even know what a mount point is...or an "fs" for that matter. Any guidance that can be sent my way would be GREATLY appreciated.

In fact, thank you all so much for bringing me this far. This is why I love macrumors.
fs = file system (a.k.a your disc).

a unix "mount point" is just a (usually empty) folder/directory on an already mounted disc to which the drive to be mounted will be connected.

Thus, the mount command usually takes the form of

mount [options] -t fstype device mount point

which means please connect device to the system, and connect it's filesystem to the folder mount point , or and by the way I know it's formatted in fstype (hfs/fat/iso9660/...).

It doesn't matter where the folder you use as a mount point is, so you could just create it in the root and know for sure where it is.

i.e

mkdir /mounthere
mount -o rdonly -t hfs /dev/diskXsX /mounthere
ls -l /mounthere

Use rdonly to make sure you don't modify the FUBAR drive in the process.

B

pdpfilms
Sep 10, 2006, 08:32 PM
WOW.

I am pretty amazed. Disk Warrior managed to salvage the bugger. I still get a temporary kernel panic when it first reads the drive, but I am now able to move files around within OSX. Thank GOD. Once i get all the important stuff off, this piece is going straight to apple.

Phew.


Thank you all for the help.

Sayer
Sep 10, 2006, 09:06 PM
Suggestion for the future:

Find a local Mac "Expert" and the next time something happens call THEM to come over in person to do their voo-doo on the computer.

Places to find a Mac expert:

* Local user group; for Macs, for Aperature or whatever.

* Ask local people who use Macs in similar companies what they do/who they use when the computer gets really bad.

* Find a local-ish AASP (Apple Authorized Service Provider) and unplug the computer and hand it off to them (or get a tech to come over).

There have to be people in your area who can deal with this badly of a messed up modern Mac. Yes you may have to pay, but would you operate on yourself or go to a trained, professional doctor instead?