Post by Boris Post by Paul Post by Boris Post by Boris
Well, I made a Linux Live DVD using the Debian distribution, and
booted into Debian.
I selected Files, and Debian showed the Macintosh HD, but also gave a
notification that the folder contents could not be displayed.
I then went to Terminal to see if I could do anything there. I just
entered 'man ddrescue' to see if the manual had help for ddrescue
commands. Nope. I also entered 'man help' and got a whole list of
commands with syntax.
The Debian distribution that I got said it had ddrescue package.
Maybe not. Maybe I'll give it another try with Knoppix.
But if this distribution doesn't recognize the Macintosh HD folders, I
wonder if ddrescue will see them.
I set up a real hard drive with a Mac image on it.
And I was shocked when the file manager in Linux (Ubuntu 18.04)
understood the multiple partitions on the Mac disk and actually
mounted the partition I selected. This is the release I used.
DISTRIB_DESCRIPTION="Ubuntu Bionic Beaver (development branch)"
In the /etc/mtab file, this is the entry for the mounted file system.
(Mounted by clicking the partition, in the name of science.)
Using the "remount" command, you might be able to change the "-o rw"
to "-o ro" and make the partition read only while working on it. It
doesn't hurt my setup, because my disk is a copy of an existing .img of
# This is not a command. This is a line in mtab, recording the mount OP.
# The parameters suggest a full-featured manual command line operation instead.
/dev/sda18 /media/ubuntu/MacBak hfsplus
rw,nosuid,nodev,relatime,umask=22,uid=999,gid=999,nls=utf8 0 0
If done manually, this is approximately what you'd do. The first actual
HFS+ partition on the Mac disk is 9, and this one is about half
way out. The Mac disk might be able to handle 20 partitions or so.
At a guess.
# make a mount point in slash
sudo mkdir /media/ubuntu/MacBak
# mount it
sudo mount -t hfsplus -o ro,nls=utf8 /dev/sda18 /media/ubuntu/MacBak
Now, you got an "I/O error" at your top level, whereas
I got "Permission Denied", and you can see from the goofy
ownership displayed on the screen, why that happened.
In this thread, you can see the conclusion was, that
some flavor of ddrescue run is called for.
A brief mention of the versions of ddrescue is made here.
# compare the versions here, to the version of gddrescue
# offered in your package manager.
# Version 1.23 was released Feb 2018.
My copy of Ubuntu offers version 1.22 .
After it's installed, the Properties further down
shows the manual page is "ddrescue".
You can use the "smartmontools" package to get smartctl.
sudo smartctl -a /dev/sda
That will dump info like this. This is actually a good
disk, so the reallocated is still "0". This has nothing to
do with estimating how many "I/O errors" are present,
because just one I/O error in a file allocation table,
is going to cause havoc.
After you've made two safety copies of the disk, you can
experiment with tools like "Disk First Aid" from a Mac
installer CD, and try and repair it. But only work on a
copy, not on the original ("sick") disk.
By now I have three versions of Linux Live DVDs I've tried them all. But,
I still have not imaged the corrupt Mac HD. I'm don't trust myself enough
yet to be sure I won't completely corrupt the Mac HD, if it's not already
fully corrupt, let alone one of my own HDs.
1) Debianlive 9.4.0 cinnamon
My first look at Linux; ok, I sort of see what Linux is all about, and why
my son wanted to install on a 32GB Lenovo laptop, Win10 was too bulky and
slow HOwever, I couldn't mount the Mac HD with Debian. Maybe it could be
done, but I couldn't see a way to do it. I used the termial and 'help' to
get some commands, but I had no idea what they were. The terminal also
told me that 'ddrescue' was not a recognized command, but I thought since
I couldn't mount the Mac HD, it didn't matter. Later, after I tried
Knoppix, I think that maybe ddrescue had to be loaded as a package from an
I did lose at a game of chess, though.
2) Knoppix 8.1-2017-09-05
Knoppix seemed to come with a little bit more onboard, and the GUI looked
sudo apt-get update
sudo apt-get install gddrescue (not 'ddrescue'; different version?)
sudo apt-get install hwinfo (hardware information, which did show the Mac
gparted did find my WinOS, my thumbdrive (Store N Go), etc, but not the
Still couldn't mount the Mac HD.
Lost another game of chess.
3) Ubuntu-18.04-desktop-amd64 (Bionic Beaver <g>)
UbuntuBB had the most applications of the three, and it took the longest
to load up; about five times as long as the first two. The GUI was the
In Terminal mode, I found that hwinfo was not included in UbuntuBB, but
'hwinfo --short' returned: Command 'hwinfo' not found, but can be
installed with: 'sudo apt install hwinfo' (That was a little different
command line than with Knoppix.)
Command 'gddrescue' not found, did you mean
Command 'ddrescue' from deb gddrescue
Try: sudo apt install <deb name> (No 'get', like in Knoppix)
Knoppix uses gddrescue, and UbuntuBB wants to use ddrescue? I'll have to
figure this one out. I didn't install any more packages (I think they are
called packages, like apps are to Windows, or Skills are to Alexa?)
I don't remeber the tool, I think it ws Drives, that was able to mount all
of the connected drives like my WinOS, thumb drive, CD/DVD, etc. The Mac
Partition Type: EFI System
Contents: FAT (32-bit version--Not Mounted)
Partition Type: Apple HFS/HFS+
Contents: HFS+ Mounted at: /media/ubuntu/MacintoshHD (I don't understand
that path; doesn't seem to point to the physical Mac HD, more to learn)
Contents: Unallocated Space
The screenshoots for Debian and Knoppix were done with a digital camera.
I found a screenshoot app in Ubuntu, and saved to my thumbdrive.
Internet connection was fine in all three distros, but I couldn't get
wifi/router to work in order to send to wifi printers. I'll figure it
At this point, I'm calling it a day. More fun tomorrow. I have and old
XP machine and lots of hard drives. I may try a dual boot set up.
Thanks for all the help, Paul.
My priority would be to get some ddrescue going first.
If I was doing it, I'd save the mount attempts for a
second thing to try.
Your disk setup is more modern than mine. Yours looks like
a UEFI setup of some sort. Mine has way more Apple specific
small partitions on it. The OS drive has around eight tiny
partitions (at least one has drivers), and the partition
number nine is where the disk starts. Your disk on the other
hand, has the major partition as the second one.
The command line package manager is Aptitude, which might
have been a Debian thing. Older OSes use apt-get for installation.
Newer OSes changed the name to just apt. Synaptic is the
GUI overlay on top of the set of apt commands. Synaptic is
not installed by default on Ubuntu now. You have to go
to the Software (orange file folder) application and turn
on Universe and Multiverse. Drop to a terminal and type
"synaptic" and follow the instructions. And as long as it
installs, you can follow up with "sudo synaptic" and search
for packages. You can type "ddrescue" into the Search box
in synaptic and find the package names.
Once a package is installed, in Synaptic you can go back
to that line in the display and do Properties, and the
freshly installed package will be shown as a file list.
It's there you'd see "/usr/bin/ddrescue" and know the
name was ddrescue. Similarly, if you scroll down, you
can see the name of the manual page. So you can do
I was surprised to find Ubuntu mounting my Mac disk that I
set up yesterday. It wasn't that long ago, that only
gparted had a foggy notion of Mac disks. I wouldn't
use gparted to change things on the Mac disk, without
a lot more testing, as I found some pretty serious
problems with it (partition table *destroyed*). Luckily,
I was working with a copy. Even the setup I used yesterday
is a copy I can turf when done.
Mount point: /media/ubuntu/MacintoshHD
The physical device is a simple "counting scheme". The
drives are lettered from a to z, as if this was Disk
Management where the disks are numbered 0..9 say.
So "sdf" is the sixth hard drive detected so far.
The digit that comes after it, is the partition number.
Your first partition is EDI, the second is the HFSPlus partition.
/dev/sdf # Starts at offset 0. A good reference point
# when ddrescue copying.
/dev/sdf1 # Points to the very first sector of the
# first partition.
/dev/sdf2 # Points to the very first sector of the
# second partition.
When you mount a partition, it "goes on top" of a
mount point. before mounting, if you
it would be empty. If there was an actual file in the folder
at this point in time, it "cannot be seen" while the mount
is present. So if we do this...
sudo mount -t hfsplus /dev/sdf2 /media/ubuntu/MacintoshHD
the contents of the Machintosh HD will be showing in Terminal,
not any file(s) in that folder before it was used as a mount
Even Windows has the notion of mount points, as the namespace
needs a root, and things progress downwards from the root. So
while Windows doesn't expose the details of mounting in quite
the same way, some of the concepts are similar. This is why
the vhdmount utility from Microsoft for mounting .vhd files,
it required that C: be an NTFS partition. and that hints
that this was a byproduct of needing the mount a bitmap
style thing. Several commercial softwares found a way to
do that, without constraints.
I would stick with Ubuntu Bionic Beaver for the moment,
as you'll get some pretty recent versions of packages.
The only thing I don't like, is mounting RW by default,
and then needing to use, say, "sudo remount -o ro" to
make it read only.
But your first priorities right now, are ddrescue to
make a copy, and perhaps "SmartMonTools" and smartctl,
to find out how healthy the SMART table is on the
sick drive. The only kinds of disks that don't
have SMART, might be SCSI and SAS, whereas a lot
if IDE or SATA should have SMART. When you use a USB
tether, that may block SMART passthru. A direct connection
to a desktop disk cable, will enable SMART.