Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ihatemy2011macbookpro

macrumors newbie
Original poster
Mar 7, 2023
19
0
is there a way to back up the whole hard drive of a g3? i have a dying 20gb drive with os 9 and os x on it along with a lot of files that i need to keep safe such as records and music i dont want to lose. the drive is dying and makes a lot of noise that it shouldnt. how can i copy everything off this drive (including os9 and osX operating systems) and get it onto another drive?
 

Amethyst1

macrumors G3
Oct 28, 2015
9,827
12,245
how can i copy everything off this drive (including os9 and osX operating systems) and get it onto another drive?
If you have access to Linux, ddrescue can create images of damaged drives where normal dd (which also exists on OS X/macOS) may fail. A disk image is an exact block-by-clock copy that preserves everything. This would require removing the drive from the iMac and hooking it up to the Linux box.

Another way, if that’s still possible with the dying drive, is to do it on the iMac G3 itself, copying the drive’s contents block-by-block onto an external drive using Carbon Copy Cloner or SuperDuper!.
 
  • Like
Reactions: TheShortTimer

ihatemy2011macbookpro

macrumors newbie
Original poster
Mar 7, 2023
19
0
the drive still works mostly but i’m just getting worried about it dying. how would i go about using carbon copy cloner or super duper? i have usb external drives so that’s no problem
 

cellularmitosis

macrumors regular
Mar 6, 2010
152
246
Another option if you have a firewire cable and a second mac would be using target disk mode. You can then use dd or any other block copying software on the second mac.

Another option would be to boot the mac using a linux "live cd", and use dd to copy a disk image to either a USB drive, or dump it across the network using socat.

I frequently used to use the socat approach to image linux boxes using a knoppix cd back in the day.

The gist of it was:

Code:
# on the second machine (192.168.1.27), receiving the image:
socat tcp4-listen:9999 - | pv > hostname.sda.dd.lz

# on the machine being imaged, running knoppix:
dd if=/dev/sda bs=64k | pv | lzop | socat - tcp4:192.168.1.27:9999

"lzop" is a realtime compression algorithm, which can speed up the transfer if your disk is faster than your network (and reduce the size of the image). You could instead use "gzip" (or "gzip -1").

"pv" shows the transfer rate. On the sending machine, pv is run before compression, and on the receiving end it is run after compression, so you can compare the two transfer rates and see how much the compression is helping.

socat, lzop, and pv are available via leopard.sh.
 

mectojic

macrumors 65816
Dec 27, 2020
1,333
2,528
Sydney, Australia
You just need SuperDuper or CCC, like you say. Of the two, Super Duper is the easiest to use. I've found that it is most reliable when just backing up to USB. Just perform the standard function, which erases the USB and backs up all files.

If your iMac is a tray-loader, then you can't boot from this USB. But at least you'll have a backup. If it is a Slot-loader, then you can boot from USB, but you'll need to bless the OS 9 system folder first. Let me know if you need more assistance.
 

cellularmitosis

macrumors regular
Mar 6, 2010
152
246
Ok, I just did a trial of this, using the Finnix Live CD finnix-111-ppc.iso (155MB) https://ftp.osuosl.org/pub/finnix/111/finnix-ppc-111.iso

EDIT: I made a remastered version of finnix which includes pv, socat, and lzop: https://forums.macrumors.com/threads/remastered-finnix-live-cd-with-pv-socat-lzop.2384155/

IMG_3210.jpeg


Finnix doesn't have socat, but it does have nc (netcat), which will also work, but doesn't automatically terminate the connection when the file transfer is complete (you'll have to wait until the transfer rate drops to zero and then use CTRL+c to kill it).

IMG_3211.jpeg


It also doesn't have lzop, which means we'll probably be limited to about 11MB/s by 100mbit ethernet.

On the receiving machine (an M1 Mac Mini), I run:

Code:
socat tcp4-listen:9999 - | pv | gzip -1 > /tmp/ibookg3.sda.dd.gz

Screen Shot 2023-03-08 at 6.37.21 PM.png


Note: this receiving machine is a modern Mac, so I installed socat with `brew install socat` and pv with `brew install pv`.

On the sending machine (the Mac being backed up, an iBook G3 in this case), boot Finnix, then use mac-fdisk to print the partition of the disk, just to be sure you have the right device name:

IMG_3216.jpg


Then to send the backup, run:

Code:
dd if=/dev/sda bs=64k | nc 192.168.1.98 9999


IMG_3214.jpeg


A note on compression:

I used gzip to compress the disk image to save storage space, because a raw disk image of a 40GB disk will take up 40GB, even if you've only have 30GB of files on that disk.

However, note that when you delete a file, the filesystem doesn't actually overwrite the file with zero's, it just marks that area as free space. So in our "30GB of files" scenario, it is entirely possible that the 10GB of free space might be full of junk which doesn't compress very well (e.g. binary files, mp3's, videos, etc).

To get the smallest disk image, you can zero-out the free space before booting into Finnix. Then the 10GB of free space will compress to basically zero, even when using `gzip -1` (gzip's fastest setting).

On the Mac being backed up, before booting into Finnix (i.e. while still booted into Tiger / Leopard), open a terminal and run:

Code:
dd if=/dev/zero of=/tmp/zeros bs=64k ; rm -f /tmp/zeros

If you are curious about the progress, in another terminal you can run:

Code:
while true ; do du -sh /tmp/zeros ; sleep 1 ; done

(Note: this is where lzop would really shine -- transferring that 10GB of zeros would be waaaay faster if compressed by lzop on the sending side)

Also note that if the receiving machine is fast enough, you don't need to bother with gzip's `-1` flag. For example, my receiving machine is an M1 Mac Mini, which is fast enough that gzip's default setting exceeds the limits of 100mbit ethernet, so compression isn't the bottleneck (and I could just use `gzip` rather than `gzip -1`):

Screen Shot 2023-03-08 at 7.05.10 PM.png


and just for comparison, here's how much faster lzop is!!!:

Screen Shot 2023-03-08 at 7.06.26 PM.png


(It is likely that even a G3 Mac could sustain more than 11MB/s of lzop compression, meaning that you could use it on the sending side and speed up the transfer)

EDIT: indeed, even a 400MHz G3 can sustain 22MB/s of lzop compression:
Screen Shot 2023-03-08 at 7.26.37 PM.png


UPDATE: Ok, the transfer finished, and the behavior is that `nc` is still running (doing nothing), but `socat` exits successfully:

IMG_3217.jpg


Screen Shot 2023-03-08 at 7.28.09 PM.png


So when socat exits on the receiving Mac, just hit CTRL+c on the sending Mac to kill nc and then reboot.
 
Last edited:

cellularmitosis

macrumors regular
Mar 6, 2010
152
246
And to restore from that image:

On the sending Mac (my M1 Mac Mini, which has the backup image):

Code:
cat /tmp/ibookg3.sda.dd.gz | gunzip | pv | socat - tcp4-listen:9999

Screen Shot 2023-03-08 at 7.40.09 PM.png


And on the receiving Mac (my iBook G3):

Code:
nc 192.168.1.98 9999 > /dev/sda

IMG_3218.jpg
 

ihatemy2011macbookpro

macrumors newbie
Original poster
Mar 7, 2023
19
0
Another option if you have a firewire cable and a second mac would be using target disk mode. You can then use dd or any other block copying software on the second mac.

Another option would be to boot the mac using a linux "live cd", and use dd to copy a disk image to either a USB drive, or dump it across the network using socat.

I frequently used to use the socat approach to image linux boxes using a knoppix cd back in the day.

The gist of it was:

Code:
# on the second machine (192.168.1.27), receiving the image:
socat tcp4-listen:9999 - | pv > hostname.sda.dd.lz

# on the machine being imaged, running knoppix:
dd if=/dev/sda bs=64k | pv | lzop | socat - tcp4:192.168.1.27:9999

"lzop" is a realtime compression algorithm, which can speed up the transfer if your disk is faster than your network (and reduce the size of the image). You could instead use "gzip" (or "gzip -1").

"pv" shows the transfer rate. On the sending machine, pv is run before compression, and on the receiving end it is run after compression, so you can compare the two transfer rates and see how much the compression is helping.

socat, lzop, and pv are available via leopard.sh.
thank you so much for all the help. unfortunately the only other working mac i have (2008 mbp) doesn’t have a firewire port. would it still work if it was a firewire to usb or something? firewire into g3 and usb into mbp?
 

cellularmitosis

macrumors regular
Mar 6, 2010
152
246
thank you so much for all the help. unfortunately the only other working mac i have (2008 mbp) doesn’t have a firewire port. would it still work if it was a firewire to usb or something? firewire into g3 and usb into mbp?
Hmm, I don't know of a way to go firewire -> USB.

On the 2008 mbp, do you have a compiler available? Open up a terminal and run `which gcc`.
 

ihatemy2011macbookpro

macrumors newbie
Original poster
Mar 7, 2023
19
0
You just need SuperDuper or CCC, like you say. Of the two, Super Duper is the easiest to use. I've found that it is most reliable when just backing up to USB. Just perform the standard function, which erases the USB and backs up all files.

If your iMac is a tray-loader, then you can't boot from this USB. But at least you'll have a backup. If it is a Slot-loader, then you can boot from USB, but you'll need to bless the OS 9 system folder first. Let me know if you need more assistance.
yes mines a slot loader. how would i bless the os9 sys folder? how would i do that before booting too? would it be done in osx?
 
Last edited:

cellularmitosis

macrumors regular
Mar 6, 2010
152
246
i’m away from that computer for a few days so i cant check the mbp
Gotcha.

The 2008 mbp might be too old to run homebrew, but if you have gcc, installing socat and pv "from scratch" is easier than you might think:

Code:
cd /tmp \
&& curl http://leopard.sh/dist/socat-1.7.4.4.tar.gz | gunzip | tar x \
&& cd socat-1.7.4.4 \
&& ./configure \
&& sudo make install

Code:
cd /tmp \
&& curl http://leopard.sh/dist/pv-1.6.20.tar.gz | gunzip | tar x \
&& cd pv-1.6.20 \
&& ./configure \
&& sudo make install
 
Last edited:

cellularmitosis

macrumors regular
Mar 6, 2010
152
246
As it turns out, the Kubuntu 6.06.1 live CD comes with gcc, so I was able to quickly build a statically-linked copy of pv and socat for use with finnix.

While booted in Finnix:

Code:
cd /usr/local/bin
wget http://leopard.sh/linux/pv
wget http://leopard.sh/linux/socat
chmod +x pv socat

I'll probably tidy all of this up into a "wiki" post about using linux & socat to image / restore a mac over the network.

EDIT: I made a remastered copy of finnix which includes these additional binaries: https://forums.macrumors.com/threads/remastered-finnix-live-cd-with-pv-socat-lzop.2384155/
 
Last edited:

mectojic

macrumors 65816
Dec 27, 2020
1,333
2,528
Sydney, Australia
yes mines a slot loader. how would i bless the os9 sys folder? how would i do that before booting too? would it be done in osx?
Bless the Os9 folder is easy. Boot into Os9 on your iMac. Plug in your USB drive you cloned the OS9 install onto. Open the System Folder of that USB drive. It is now blessed. Done.
Since you have a slot loader, life is easier! You can even boot off the USB drive to check that it works. Or use Firewire 400, that's pretty fast.

Since you have a 2008 Mbp, you can get a firewire 400-800 cable if you need to do further work, but not necessary for this backup.
 

ihatemy2011macbookpro

macrumors newbie
Original poster
Mar 7, 2023
19
0
Bless the Os9 folder is easy. Boot into Os9 on your iMac. Plug in your USB drive you cloned the OS9 install onto. Open the System Folder of that USB drive. It is now blessed. Done.
Since you have a slot loader, life is easier! You can even boot off the USB drive to check that it works. Or use Firewire 400, that's pretty fast.

Since you have a 2008 Mbp, you can get a firewire 400-800 cable if you need to do further work, but not necessary for this backup.
thank you bro. how do i boot from usb?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.