Archive for August, 2013

Accessing a time machine / os x / hfs+ volume in linux

August 12th, 2013 -- Posted in Tech | 3 Comments »

In moving my data from my dying os x 10.6.8 (snow leoppard) macbook pro to my 100% linux workstation I ran into a few problems. My laptop is extremely unstable so I initially did not think transferring the data over the network would be a bad idea. Why would I anyway, I had time machine backup volumes with all the data I needed on them.

But in trying to access those from my workstation I ran into a few problems. The filesystem os x uses by default, hfs+ (journaled) is only partly supported by linux. With hfs-utils installed I was able to mount the volume, though read only. Not a problem, I thought, as I only need to copy the data over, not alter it. Boy was I wrong. I was logged in as root and I changed working directories to my home directory in the most recent backup. When I started to copy things over, I got a “permission denied” denied error. Wait, I was root right? No mistake there. No matter what I tried, I could not get access to the files inside my home directory.

After some googling I tried mounting with some masks:

mount -t hfsplus -o umask=0,uid=0,gid=0 /dev/sdb2 /mnt

But it appears those masks are only applied when an ‘unknown’ id is listed at the permissions, and it didn’t work very well because I still had a lot of unknown and undefined id’s in the permissions.

So I tried to create a user with the right uid and gid. No success. By the way, there was a different gid on every file in my home directory even though in os x it was all “nihlaeth:staff”.

I decided I needed the disk writeable to try some chowning. Back in os x I tried chowning recursively. “permission dienied”, even with sudo / root. Then I tried disabling journaling so I would be able to write to it in linux. This should be possible by using disk utility, selecting the volume and then alt-clicking “File” -> disable journaling. Needless to say, os x refused.

At this point I started transferring data from my account to another disk the regular way. But there was one other thing I could try: disk permissions in finder. Go to finder, right click the volume and pick “Get info”. At the bottom yon see some permission settings, and a little lock under it. Unlock, click the cogwheel and click “apply permissions recursively”. Roughly 5 hours later “Locum” was done doing that but the files were still unaccessible.

Other files on the disk outside of the time machine folders were accessible however. I have no idea what kind of funky shit time machine pulls on these files, but I’m not amused. Backups have to be accessible to be of any kind of use. What if your ‘awesome’ os x machine fails and all you have to access your very important and needed files is linux or windows? Well, then you’re screwed. If you have the choice, I advice you to use rsync instead of time machine.

P.S. If you want to be able to write to a non-journaling hfs+ volume, you have to set ‘force rw’ under -o. Writing to a journaled hfs+ filesystem is not possible with linux at this time.

Errno.h: no such file or directory

August 8th, 2013 -- Posted in Tech | No Comments »

I’m trying to get my samsung ML 1670 printer working on a cups server running on slackware 14. The pdd files provided by samsung simply don’t work and unfortunately slackware does not provide an alternative. As a last resort I decided to try and compile splix, which claims to support my printer. There’s a slackbuild available.

I’m not making it easy on myself as usual, my slackware is very minimal. I use my own tailored tagfiles. As a result it’s always tricky to find all the missing packages at compile time. At one point I ran into the daunting errno.h: no such file or directory error. I could tell right away this was not a matter of running “slackpkg install errno”, it sounded way too essential for that.

I was right. All I could find on this particular error was that I needed to install both the kernel source and headers. Needless to say, a kernel update and a lot of reboots later, it still didn’t work. But running “slackpkg file-search errno.h” revealed some interesting information:

[ installed ] – kernel-headers-3.2.45-x86-3

[ installed ] – kernel-source-3.2.45-noarch-3

[uninstalled] – dev86-0.16.17-x86_64-2

[ uninstalled ] – glibc-2.15-x86_64-7

[uninstalled] – libnl3-3.2.11-x86_64-1

[uninstalled] – tetex-3.0-x86_64-8

Installing glibc did the trick. Hope that saves you a long search.

Also, what was I thinking, not installing glibc…