USB1.0 is s...l...o...w

Man, 12 Mbit/s is slow. I’ve got a USB 1.0 “full-speed” hub, and tried to copy across 60GB of files. In about 18 hours, that was only about 3GB copied… So I bought a USB 2.0 hub, and that is much faster.

Preparing a Disk for OpenSlug

I got a new 250GB USB drive today, and plugged in a hub into my NSLU2, and connected this up. These are the commands I needed to execute to get it all set up (it was an NTFS formatted disk initially).

First of all, use dmesg to ensure the disk has been recognised and mounted. I had to change from my USB2.0 hub to a USB1.0 hub. I’ll get a new 2.0 hub in the next few days to try that out. Apparently some of them don’t work.

From dmesg, the hub has been recognised:

usb 2-1.1: new full speed USB device using ohci_hcd and address 3 usb 2-1.1: not running at top speed; connect to a high speed hub

The new disk has been mounted as an NTFS (dirty) disk:

NTFS volume version 3.1. NTFS-fs error (device sdc1): load_system_files(): $LogFile is not clean. Mounting read-only. Mount in Windows.

Things to note: * the device name in this case is /dev/sdc1. This is the third USB device in my chain. * /dev/sda(1,2,3) are the root, swap and user partitions on the boot disk, * /dev/sdb1 is the first 250GB drive I bought.

nslu2:~ root$ umount /media/sdc1/
nslu2:~ root$ fdisk /dev/sdc1/

Then you will need to delete the partition (d), and create a new one (n). (p): Primary partition, #1, accept default start and end blocks.

Then use (w) to write the partition out to disk.

nslu2:~ root$ reboot

Wait for the machine to reboot fully.

nslu2:~ root$ umount /media/sdc1/ 
nslu2:~ root$ mkfs.ext3 /dev/sdc1 mke2fs 1.38 (30-Jun-2005) ...

It takes a while to process. Worthwhile rebooting after this just to be sure.

All done.

Waiting for an Application to launch

I use an AppleScript to implement “Open Terminal Here” functionality on my Macs, and just now I noticed on the Intel machine it had stopped working properly if Terminal wasn’t already running. For some reason, on PPC it still sends the message through, but on x86 it doesn’t. So, I had to use the following code to get it to work if Terminal wasn’t already running, which can be generalised to any application: repeat while "Terminal" is not in name of processes     delay 0.5 end repeat The whole script, which can be saved as an application bundle, set to not show in dock, and then placed in the Toolbar:

    -- when the toolbar script icon is clicked
    --
    on run
    	tell application "Finder"
    		activate
    		try
    			set this_folder to (the target of the front window) as alias
    			--display dialog POSIX path of this_folder
    		on error
    			set this_folder to startup disk as alias
    		end try
    		my process_item(this_folder)
    	end tell
    end run
    
    
    
    -- This handler processes folders dropped onto the toolbar script icon
    --
    on open these_items
    	repeat with i from 1 to the count of these_items
    		set this_item to item i of these_items
    		my process_item(this_item)
    	end repeat
    end open
    
    
    -- this subroutine processes does the actual work
    --
    on process_item(this_item)
    	tell application "System Events"
    		try
    			get process "Terminal"
    			
    			tell application "Terminal"
    				activate
    				do script "cd " & (quoted form of POSIX path of this_item)
    			end tell
    		on error -- Terminal Not running, launch and run in first window.
    			launch application "Terminal"
    			-- May need to wait until Terminal finishes launching
    			repeat while "Terminal" is not in name of processes
    				delay 0.5
    			end repeat
    			tell application "Terminal"
    				activate
    				-- So we don't create a new window: in window 1
    				do script "cd " & (quoted form of POSIX path of this_item) in window 1
    			end tell
    		end try
    	end tell
    end process_item
    

Installing Missing Sync on a Hackintosh

I am a registered user of Missing Sync for PalmOS, but it wouldn’t install on my Dell running OS X. Easy to fix: copy the installer package somewhere writable, and then open the package, find the file Contents/Resources/InstallationCheck. Edit this file in a text editor (luckily, they made it a bash script!), and before the final line (exit $RETVAL), insert: exit 0 Crude hack, but it gets it installed. Now to reboot and see if it will actually run!

Reinstalling Windows, Again

Here I go, reinstalling WinXP for the umpteenth time this week. I seem to have some corrupted files which prevents me from running all but the most simple of applications. Including IE, and Firefox, btw.

Mounting a share before running an application

I have all of my Music, Movies and TV shows stored digitally on a server, located just below my feet at the moment, but soon to be shifted to another location. This server just runs SMB file sharing, and provides access to the same files, as well as a heap of other data, to all of the machines in my network. It also provides easy access to media and installers for guest users, too. The one thing I like about Windows1 over OS X is that you can have shares set to auto-mount on bootup. I used to use an AppleScript to do this, which was okay, except OS X still disconnects when you sleep. Not that I sleep my machine much, anyway. Then today, I read a great hint on MacOSXHints: Make sure iTunes mounts a networked music library. Basically, instead of running iTunes from the location it is installed in, you create an alias on the music server volume, and run it (via another alias back into the dock) from there. Then, before loading iTunes, it mounts the volume, if it can find it. Otherwise, iTunes will not run. Which is fine by me, since all of my music is on that server!

  1. Mind you, Windows does have some other crappiness in conjunction with this. Lately, I’ve been finding that it won’t always mount all of the shares, even though I chose automatically mount after rebooting, and it sometimes forgets my passwords. Similarly, you cannot connect more than once to a server with different credentials. I mean, seriously?

Pacifist Bug?

I’ve used Pacifist to extract data from MacOS X Installer Packages before, but I just noticed something that might be a bug. It was on my Dell/Hackintosh, and I haven’t had time to try the same thing on the iMac G4, but I will. I was about to update the OS X x86 system to 10.4.9, and after reading Method to Update hackintosh 10.4.8 to 10.4.9 (Intel SSE2/3), I had backed up the files referenced, and was backing up the whole partition to a disk image. I thought I’d extract a couple of the files listed, and see if I could figure out the differences between them. So I extracted a file using Pacifist to the Desktop, ready to examine it. Okay, the file isn’t there. Go into Terminal, and list the Desktop. Poof. Finder is gone. When it reloads, the file is there. What I suspect is happening (and I haven’t tried it again, just yet), is that the file is copied, and the Finder isn’t notified. When something else tries to access the file, the Finder panics, or something. I will try to reproduce this on the same system, and my PPC setup. Until then, here I go to update…

Broken MBR and Partition Map

Ooh, scary stuff this afternoon. I was preparing to back up my OS x86 installation, and make a bootable version on another partition, but at some stage I must have repartitioned the whole hard drive. Which included the 75GB NTFS partition with Windows XP, and a heap of data on it. I originally had thought it was the NTFS-3G (read/write FileSystem driver for Mac), but, alas, it wasn’t. So, I spent the next few hours downloading repairers, trying in vain to undelete, before I happened across one CD ISO that did the trick - restored the partition information from a backup. I then had to repair the windows installation (fix the MBR and something else, FIXMBR and FIXBOOT), and everything is back to normal. Man, I’m feeling a whole lot happier than I did a couple of hours ago…

Fixing Broken Samba Sharing

Well, I had installed OS X on an unsupported machine, and had virtually everything I wanted working. With two exceptions. Finder wasn’t able to connect to any file sharing servers, but I was able to manually create mounts, using: $ mount_smbfs //user:pass@machine/mount /mnt I was also able to do something similar with AFS shares. Which, by the by, are much nicer - they actually allow me to copy icons from my iMac to my Dell. Then, I happened across this forum post: Personal File Sharing & Samba, JaS 10.4.7 Basically, it seems that some of the files from the Hackintosh installation aren’t perfect. So, the following needs to be done:

    $ cd /usr/sbin
    $ sudo rm AppleFileServer
    $ sudo ln -s /System/Library/CoreServices/AppleFileServer.app/Contents/MacOS/AppleFileServer AppleFileServer
    $ sudo unlink /System/Library/Filesystems/afpfs.fs

I’m not sure about the last one, but I did it anyway. And then I was able to use the Finder “Connect to Server…” tool. And have shortcuts on my desktop to servers.

MacOS X on Intel

Well, after two days of trying, I finally got OS X to install on my Dell Dimension 4600. In the end, it seems my installation DVD was slightly corrupted, enough to fail on trying to install a particular package. Which, it turned out, was the one that stops kernel panics on boot. Kinda handy. The way I got around it was to use Pacifist to unpack the package on the iMac, and copy the files across using my iPod. This was after countless reboots. I wish I’d thought of it earlier. Like yesterday morning. So, now I’m typing this from the lovely place that is OS X. I managed to get Sound working, just by changing the plug location. Only in-built AC97 sound works, but that’s mainly what I’ve been using anyway. I had been using the PCI soundcard for TeamSpeak, but not for actual system sounds. At the worst, I can just build a cable double adaptor and leave it plugged into both locations. Networking required the download of an extension - AppleIntel8255x.kext, and that worked fine too. In the short term, I just plugged in a Firewire cable to the iMac, and used Internet Sharing to build the network. But this is better, and it even picks up the same IP address (and hostname) from my DHCP server. Graphics still isn’t perfect, but I’m only a few minutes away from downloading a potential driver. In fact, it’s just finished now.