I needed to reinstall OS X, but my discs were broken. Fortunately, I had an image of the installation DVD on my server, so I figured that I should be able to boot into that image over the network. Well, it wasn't that easy.
In the end what you will need is a computer running two servers: one tftp server and one web or NFS server, preferably NFS, since you don't have to worry about making sure you have Apache 2 or newer to support huge file transfers over http. You'll also need some command-line skills, too.
The first step is to get four files:
An mkext file (which is a bunch of drivers)
The image you wish to boot
All of these items are actually relatively easy to get. The first three are obtainable from inside a functioning OS X environment (or rather, an environment into which you, at the very least, can get a command-line). The bootloader is located at /usr » standalone » ppc » bootx.bootinfo. Copy it to your favorite place, i.e. a USB stick or something like that.
The kernel is located at /mach_kernel, just under the root directory. Copy that one, too.
The third one is a little bit trickier. It involves picking the drivers you'll need and putting them in a nice package. I'll give you a line to make life easier:
This will create a file named mach_kernel.mkext in the /System » Library » Extensions folder, which contains everything you need to successfully boot an image over the network. If you're curious about the flags, check out man kextcache. You really should also put this file on some kind of removable media, otherwise you may get stuck.
I started using MarcoPolo recently to switch networks on my Macbook when moving between home and work. I also wanted to turn the firewall on and off easily, but could not find and scripts to switch the Leopard firewall between "Allow all incoming connections" (my definition of OFF) and "Allow only essential services" (ON).
If you are not using Growl for notifications, then remove the register_growl and growlnote subs and their associated calls.
Once you have the "ON" script working, to create the "OFF" script, just change Allow only essential services to Allow all incoming connections as noted in the commented lines -- simple.
[robg adds: I tried both scripts, and they worked as described. Copy the above into Script Editor and paste, then save it as Firewall Off. Follow the instructions to switch the functionality, and then save the modified version as Firewall On. With some tweaking, I think it'd be possible to do this in one script by first checking the status of the firewall. I'll leave that version as an exercise for someone with more AppleScript skills than I, though.]
Here's how to build vpnc as a drop-in replacement for the Cisco VPN client. Why on earth would I want to do this? Because, in my opinion, Cisco's client is a pretty poor piece of software, you shouldn't have to have a Cisco contract to download the thing, and I am a big proponent of open source software.
This process has been tested under Mac OS X 10.5.5 and Ubuntu Intrepid 64 bit, and it's written up in detail on this page on my site. Here's the executive summary version:
A UNIX system. (Sorry, Windows folks. I have neither the time nor patience to even try to set it up under Windows).
The CD/ROM in my computer busted, so I decided to try to remotely mount the CD from another computer on mine. I know the MacBook Air can do this, so I reasoned that any Mac could. It turns out it is possible, but the solution is far from obvious -- after much searching, I found the solution here.
Here's a quick synopsis. Go to System Preferences » Sharing, and enable 'DVD or CD Sharing.' (I think you need to do this on both machines -- the one with the drive and the one without the CD/ROM drive). Then, on the computer that does not have the CD drive on it, go to a Terminal window and enter:
I have two computers -- a Power Mac and a MacBook. I have massive amount of storage space on my desktop, but for portability's sake, I don't typically connect hard drives to my MacBook. This means I keep all my movies on my desktop. But what if I want to watch them on my MacBook? I don't want to deal with plugging in hard drives, or waiting for a movie to transfer over the network before I start watching.
So here's what I do. I first begin a file transfer across the network of the movie I want to watch. (I typically do a file copy, not a move, so when I'm done, I can just trash the file on my MacBook.) I wait a second to let it get a head start, and then open the partially-transfered movie in VLC. Note that opening from the Finder won't work; either open the file inside VLC, or drag the file onto VLC in the Dock.
Now, VLC is going to think the file is broken, and ask if you want to repair it -- don't. Your movie will now start playing, and assuming your transfer speed is fast enough to keep up with the movie's speed, you should be able to watch the movie while it transfers in the background.
[robg adds: I've posted this because I think it's interesting that VLC will start playing an incomplete movie without (too many) complaints. However, for general viewing, it'd be much easier to just actually stream the movie using VLC. Just connect to the Power Mac over the network, mount the volume that holds the movie, and start playing. You my have to adjust VLC's cache settings to avoid stutters and drop-outs; for more on that, see this hint.]
In some cases, you may not want your OS X users to have the ability to create an Ad Hoc network. This can cause all kinds of issues if they are broadcasting their own SSIDs through out your network. After some extensive Google searching and hitting up some mailing lists, I was able to configure the AirPort daemon to require Administrative privileges to create an Ad Hoc network.
This is not widely documented, and I have only tested it in 10.5. I also rebooted my machine to restart all daemons after running the command. If you try running it in 10.4, you will have to test it as I do not have a Tiger machine around me to test this out.
Open up Terminal and run the following command:
sudo /usr/libexec/airportd en1 ‑ibss_admin 1
To undo this, simply rerun the code, but replace the ending 1 with a 0, and then all users will be able to create Ad Hoc networks.
If you want the fastest possible wireless network, and you have all N-compatible clients, then on your AirPort Base Station, set the following options:
Radio Mode: 802.11n only (5GHz)
In the Wireless Options section, insure that Wide Channels are selected
Other vendors use wide channels in the 2.4GHz spectrum, but this is a problem as doing so can use up to 75% of this spectrum. Not great if you have a cordless phone, or neighbors that are also using 2.4GHz hardware mentioned above. As the 5GHz the channels don't overlap like they do in the 2.4GHz range, then this can be done. In 2.4GHz, if you wanted to have three non-interfering networks, they would each have to be five channels apart so that they don't overlap -- 1,6,11 for example.
You should get speeds up to 500MB per minute between two 802.11n clients with this setup.
[robg adds: I don't know if these are ideal settings or not -- if you have advice on setting up the fastest N-only network, please add your comments.]
I bought a new D-Link DIR-625 router and got it to work with all my computers except one -- an older PowerBook Pismo with an AirPort wireless card. I kept getting the error that it couldn't connect to the airport network. The machine would connect to my old router, and to my neighbor's router, just not my new D-Link router. For days, I tried everything I could find to fix it. I called support multiple times, and tried everything that they suggested. Their suggestions were of no help, however.
I finally stumbled on to the fix myself. I had to change the wireless mode from "B,G and N" to just "B and G," and then it worked fine. The problem is that my new MacBook has N wireless and now can't use my new N router at full speed. I guess that is why it is still called "draft" N router!
I wrote a free widget for switching HTTP, FTP or HTTPS proxies, and it currently works for Ethernet or AirPort networks.
The widget is basically a front end for a bash script, which does the hard work. I also had to write an Objective C tool for parsing of current configuration information. It is all free, so if somebody would like to see the source, just let me know.
Are you having difficulty redirecting X11 to your Mac running Leopard without using ssh -X? Someone figured out that Leopard turns off listening to X11 traffic on TCP port 6000 by default. The following steps will TCP listening back on, so that the X11 server will service a client request.
First see if your server has TCP listening turned off by executing the following command: defaults read org.x.X11 | grep nolisten. The output will read either "nolisten_tcp" = 1; which is bad, or "nolisten_tcp" = 0; which is good. If TCP listening is off, turn it back on. I did this both as root and my default non-root username, as I didn't know which one took precedence:
Shut down your X11.app, then in Terminal, type xterm, and as normal, the X11 terminal should pop-up. In the xterm, enable all remote users by typing xhost +. Back in Terminal, type the following to see if the server is now listening for inbound TCP requests: netstat -na | grep 6000. You should see something like this output:
Now on your remote system things should be as before. Just setup your DISPLAY to point to the Mac and fire away. I assume this is persistent across a reboot, but I didn't try. The original solution was found here by Johannes Overmann.