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 Desktops > Tricky hard drive shuffle - how do I do this??

Tricky hard drive shuffle - how do I do this??
Thread Tools
Zoom
Mac Elite
Join Date: Feb 2000
Location: RTP, NC
Status: Offline
Reply With Quote
Apr 14, 2003, 02:48 PM
 
Okay, here's the deal. I have a G4/400 Sawtooth (upgraded to G4/900) with two hard drives: the original 10GB drive with OS 9.x on it and a secondary 60GB drive with 10.2.5 on it. I'm running from the secondary drive now and don't really use the primary drive at all, except for the files that are on it.

I've got a Linux PC project going on the side and I'd like to use the 60GB drive for it and put a new 100-120GB drive in the G4.

So, I basically need to copy the OS X install from the 60GB drive to the new 100GB drive, then wipe the 60GB drive completely so I can move it and install Linux on it.

Is this possible??

I'm picturing this. I remove the 10GB drive and replace it with the new 100-120GB drive. I format it and then somehow, using a nifty tool, copy the image from the 60GB drive to the new, larger drive. Then I boot from the new drive and it looks and feels and operates just like the old 60GB drive image did. Then I run some other utility to wipe the 60GB drive. Finally I remove the old 60GB drive and put it in the PC I'm building and install Linux on it.

Somewhere in there, I'll probably copy over the files I need from the original 10GB drive and then install 10.2.5 on it and just use it as an emergency drive for the G4 (something I can boot from in case the main drive has problems). That is, the old 10GB drive will become the secondary drive in the G4 and probably won't have much of anything on it at all.

Here's one more twist. If possible, I'd actually like to either copy back or simply leave a bunch of files on the 60GB drive for use in the Linux system (MP3s). I was assuming I'd have to do it over a network connection, but if I could just leave the files there, that would be ideal. I just don't think it's possible.

Just to clarify, here's the before and after.


BEFORE

G4:
primary 10GB - OS 9
secondary 60GB - OS X

PC:
bare


AFTER

G4:
primary 120GB - OS X (everything from the 60GB drive)
secondary 10GB - OS X (new install)

PC:
60GB Linux
( Last edited by Zoom; Apr 14, 2003 at 02:56 PM. )
     
dreilly1
Mac Elite
Join Date: Sep 2000
Location: Rochester, NY, USA
Status: Offline
Reply With Quote
Apr 14, 2003, 03:18 PM
 
I assume you're familiar enough with IDE drives to know how to hook them up as a master or a slave.

How familiar are you with the command line? It sounds like all you need to do is install the big drive as a second drive on the G4, then copy all the files from the existing drive onto the new drive. The problem is that there are certain directories that are hidden from the finder, and in order to do this right, you'll need to copy from the command line.
You should issue a recursive copy command where permissions, ownership, and modification dates are preserved, and hidden files are copied as well. I don't have a Mac in front of me at work so I can't tell you exactly what those switches are.

If you do that, then the drive *should* be bootable. When you switch the drives around so the big drive is the main drive, the computer may get confused about which system to boot from. You could go into Open Firmware to change this, or you could just boot from the OS X CD after moving the drives and make sure the right startup disk is selected.

You're going to want to use a different filesystem for the PC running Linux, so you likely won't be able to leave the files on the 60GB drive. But, if you copied over everything correctly, then you could always ftp the files over after Linux is installed.

One sugesstion I have is to go and buy a firewire drive enclosure, if you have the spare $100 lying around. This way, you can have all three drives mounted on the Mac at once without too much hardware swapping, and you can put the 10 GB drive back in the enclosure and have a handy Firewire drive. For that matter, you could get a firewire card for the PC and be able to move files back and forth very quickly. (But the firewire drive will have an HFS filesystem, and you'll have to include Firewire and HFS support into your Linux kernel, both of which still have some flaws in Linux).
     
Zoom  (op)
Mac Elite
Join Date: Feb 2000
Location: RTP, NC
Status: Offline
Reply With Quote
Apr 14, 2003, 03:56 PM
 
So, one of the things I was worried about is that OS X or maybe even some applications will have files that somehow are tied to a device name or something. Is everything really that portable? I'm very familiar with command line Unix, but "cp -r" seems way too easy. Is that all there is to it?? Surely aliases (softlinks) wouldn't survive that operation. There must be more to it than this. I would think there's a tool for this. I've heard that one exists for the PC.

So, the process would be:

- powe down, replace the 10GB primary with the new 120GB drive
- boot from the 60GB drive as usual, copy over files (somehow) to 120GB drive
- reboot to the new 120GB drive, make sure it works okay, wipe the 60GB drive
- power down and replace the 60GB with the 10GB drive

The FW enclosure idea sounds nice, but I wouldn't spend $100 just for that. I may, however, get myself an iPod when the new ones are announced, which will have that same capability.

Yet another option would be to buy an EIDE PCI card and have all these drives running together, but I don't think I need that. The final configuration will still be two drives and I won't need the extra EIDE controller.

Here's another question, now that you brought up the master/slave thing. Does the OS care about these settings, or is it strictly an EIDE thing? Let's assume there's some benefit to booting from the master drive - can I simply switch the master/slave settings on my two current drives (10GB, 60GB) so that my secondary drive becomes the primary?
     
Axo1ot1
Professional Poster
Join Date: Apr 2002
Location: New York City
Status: Offline
Reply With Quote
Apr 14, 2003, 05:14 PM
 
There are a couple shareware apps that will make bootable backups of entire disks. I don't think just dragging and dropping all your files over to the new disk will work.
     
dreilly1
Mac Elite
Join Date: Sep 2000
Location: Rochester, NY, USA
Status: Offline
Reply With Quote
Apr 14, 2003, 05:51 PM
 
Originally posted by Zoom:
So, one of the things I was worried about is that OS X or maybe even some applications will have files that somehow are tied to a device name or something. Is everything really that portable? I'm very familiar with command line Unix, but "cp -r" seems way too easy. Is that all there is to it?? Surely aliases (softlinks) wouldn't survive that operation. There must be more to it than this. I would think there's a tool for this. I've heard that one exists for the PC.
Well, the key things are making sure aliases are copied correctly, making sure protections are preserved, and hidden files are copied. I copy entire boot drives all the time on Linux, and it works (as long as the boot sector on the PC is configured correctly for the new drive, of course.)

I took a look at the cp man page on my iBook, and -R will copy all files recursively, and copy links correctly. And -p will preserve permissions.

You want to run this command as root, so the final command will be something like:

sudo cp -pR <olddrive>/* <newdrive>

and put in your password....

except that I'm not sure where OS X will mount the second drive in the Unix hierarchy. It might be under /Volumes , but then when you copy you'll have to make sure you don't accidently copy the whole Volumes directory to your new drive. You may need to copy each top-level folder separately, making sure to copy the hidden (ls -a) directories off the top level as well.

I've never actually tried this on a Mac, though, so you might be better off looking for an app to do this....

So, the process would be:

- powe down, replace the 10GB primary with the new 120GB drive
- boot from the 60GB drive as usual, copy over files (somehow) to 120GB drive
- reboot to the new 120GB drive, make sure it works okay, wipe the 60GB drive
- power down and replace the 60GB with the 10GB drive
That sounds right, but I'd boot off of the OS X CD first. (see below)

Here's another question, now that you brought up the master/slave thing. Does the OS care about these settings, or is it strictly an EIDE thing? Let's assume there's some benefit to booting from the master drive - can I simply switch the master/slave settings on my two current drives (10GB, 60GB) so that my secondary drive becomes the primary?
I think you can do that. I haven't tried it, though, because my sole desktop Mac is a Rev. A B&W G3 that can only handle one hard drive

The OS should be able to process the fact that the master/slave configuration of the drives have changed. The only problem might be that Open Firmware (The Mac equivalent of the bootloader on the PC) might get confused because it is expecting the boot information in one place on the drive, and the new drive may have it somewhere different. I would imagine that booting off of the OS X CD after changing drives and choosing the drive you want to boot from in the Startup Disk control panel would work.
     
dreilly1
Mac Elite
Join Date: Sep 2000
Location: Rochester, NY, USA
Status: Offline
Reply With Quote
Apr 14, 2003, 06:01 PM
 
One last thing:

the 'df' command will show all mounted volumes, and where they are mounted.

This is important not just to find where the second drive is mounted, but to find out which directories are actually special directories which you don't need to copy.

On my iBook, it looks like /dev , /Network/Servers , and /automount, in addition to the /Volumes we discussed earlier are "mounted" are special directories, and are not really on the drive... (/dev, for instance, is created on the fly in newer versions of Linux, and I suppose it's the same in OS X)

I would think that you should make these directories, but not copy anything under them. I guess I am getting into some new territory for me, like I said before I've done it on Linux, but not on OS X. Does anyone have some confirmation that I'm on the right track?
     
Zoom  (op)
Mac Elite
Join Date: Feb 2000
Location: RTP, NC
Status: Offline
Reply With Quote
Apr 15, 2003, 11:28 AM
 
No offense, but I think I need something a little more for-sure than that before I try doing this. I really can't believe there's not a utility for doing this. I'll have to Google it and see what I can find, but if anyone has knowledge of such a tool, I'd greatly appreciate hearing it.
     
dreilly1
Mac Elite
Join Date: Sep 2000
Location: Rochester, NY, USA
Status: Offline
Reply With Quote
Apr 15, 2003, 02:30 PM
 
No offense taken. I realized as I was writing that I didn't really know enough about OS X (and its BSD heritage) to make an intelligent recommendation, but in keeping with the spirit of the Internet, I posted anyway. I'm glad that you didn't screw yourself with my dodgy advice.

All I know is that it is theoretically possible to copy the files on an entire drive from one drive to the other, and have the new drive be bootable. using 'cp -pR' will preserve all your permissions and links. Like I said, I do it all the time in Linux, only that command is (IIRC) 'cp -dpR'. (I remember that command because those are my initials.

It also means that even if there isn't a utility to do this out there, someone must have at least written a script to do this.

Good luck!
     
Gene Jockey
Mac Elite
Join Date: Mar 2001
Location: Houston, TX
Status: Offline
Reply With Quote
Apr 15, 2003, 03:55 PM
 
You need to clone the 60 gig drive to the new 120 gig drive, yes? You need...

Carbon Copy Cloner.

Go get it: CCC

Have fun. There is also "clone" functionality in Disk Copy 6.4 that runs under the 9.X, but I haven't tried to clone an X volume with it before. Good luck!

--Josh

P.S. I know other posters meant well, but using cp in OS X is a bad idea in this case, as it does not preserve resource forks. So moving text files is OK, but cp -R some app and you get a broken app. To preserve all forks and metadata, you need to use ditto (which is what CCC uses, I think, just with a much friendlier wrapper.)
     
Zoom  (op)
Mac Elite
Join Date: Feb 2000
Location: RTP, NC
Status: Offline
Reply With Quote
Apr 15, 2003, 04:04 PM
 
Originally posted by Gene Jockey:
You need to clone the 60 gig drive to the new 120 gig drive, yes? You need...

Carbon Copy Cloner.

Go get it: CCC

Have fun. There is also "clone" functionality in Disk Copy 6.4 that runs under the 9.X, but I haven't tried to clone an X volume with it before. Good luck!

--Josh

P.S. I know other posters meant well, but using cp in OS X is a bad idea in this case, as it does not preserve resource forks. So moving text files is OK, but cp -R some app and you get a broken app. To preserve all forks and metadata, you need to use ditto (which is what CCC uses, I think, just with a much friendlier wrapper.)
That sounds exactly like what I need - thank you!

I had just opened up a new thread in the OS X forum, too. I'll post this solution there.
     
the weatherman
Junior Member
Join Date: Mar 2002
Location: asia
Status: Offline
Reply With Quote
Apr 15, 2003, 05:52 PM
 
Originally posted by Zoom:
That sounds exactly like what I need - thank you!

I had just opened up a new thread in the OS X forum, too. I'll post this solution there.
If you have ASR 2.2.3 or later (Apple Software Restore), it can do the same job. Tried it and it works. You just need to boot in OS9 or an OS9 cd. Its just a simple drag the volume that you wish to clone/restore to the app and it will present you with a dialog box asking for the hd you want to restore to (it even has options, but i think those are mainly for OS9).

Hope that helps
     
dreilly1
Mac Elite
Join Date: Sep 2000
Location: Rochester, NY, USA
Status: Offline
Reply With Quote
Apr 15, 2003, 07:41 PM
 
The guy who wrote CCC really seems to have his act together. This page sums up everything I was trying to say in this thread much more succinctly. Heck, just that page is worth a $5 donation IMHO...
     
bradoesch
Professional Poster
Join Date: Jun 2000
Status: Offline
Reply With Quote
Apr 16, 2003, 07:20 PM
 
Originally posted by Gene Jockey:
P.S. I know other posters meant well, but using cp in OS X is a bad idea in this case, as it does not preserve resource forks. So moving text files is OK, but cp -R some app and you get a broken app. To preserve all forks and metadata, you need to use ditto (which is what CCC uses, I think, just with a much friendlier wrapper.)

For anyone that wants to use ditto and preserve the resource fork, there's just one more snag, and that's adding -rsrcFork. So,

Code:
ditto -rsrcFork


Brad
     
Zoom  (op)
Mac Elite
Join Date: Feb 2000
Location: RTP, NC
Status: Offline
Reply With Quote
Apr 16, 2003, 08:06 PM
 
Wow. I don't believe how easy this was to do. I did just what I said, and it Just Worked (tm).

(Recall that I've been running from a 60GB secondary drive as you read this.)

- Unwrapped the 120GB Maxtor drive ($90!), set the jumper to "master".
- Powered down the G4, replaced the 10GB drive with the 120GB drive.
- Fired up the G4.
- Ran Disk Utility to format the new drive.
- Ran Carbon Copy Cloner.
- Set the startup disk to be the new 120GB drive.
- Rebooted.

That's it. It worked flawlessly. I'm now running on the 120GB as if I was on the old drive. Everything is here. I can't tell the difference.

Sweet!!!

Now, let's hope the Pioneer DVD-R drive upgrade goes as easily..
     
DeathMan
Mac Elite
Join Date: Aug 2001
Location: Capitol City
Status: Offline
Reply With Quote
Apr 17, 2003, 03:32 PM
 
Originally posted by bradoesch:
For anyone that wants to use ditto and preserve the resource fork, there's just one more snag, and that's adding -rsrcFork. So,

Code:
ditto -rsrcFork


Brad
Yeah, I screwed up a whole ton of fonts because I (actually it wasn't me, it was tar) didn't consider the use ditto and the -rsrcFork flag.
     
Zoom  (op)
Mac Elite
Join Date: Feb 2000
Location: RTP, NC
Status: Offline
Reply With Quote
Apr 19, 2003, 06:55 PM
 
SUCCESS!!

No problems! I upgraded the hard drive, no sweat. Then I upgraded the CD-RW in the LaCie case - no problem. And finally, I upgraded the internal DVD-ROM to a Pioneer 105 - and it worked! Folks, life is good.

For what it's worth, this guide was helpful. It's really not that complicated, but the stupid Apple Zip/CD bracket adds a little twist to an otherwise normal drive swap.
     
Zoom  (op)
Mac Elite
Join Date: Feb 2000
Location: RTP, NC
Status: Offline
Reply With Quote
Apr 20, 2003, 09:12 AM
 
Damn. Spoke too soon. I've got some serious problems now. I've started a new thread to deal with them.
     
   
 
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 07:30 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.,