Talk:Diskless Mac-Mini Howto

From MythTV Official Wiki
Jump to: navigation, search

Well.. just submitted an initial version of this Howto. Hope I didn't forget any important steps. I really hope some people will experiment with this, so I'm no longer the only fool running myth on a linux Mac Mini. It's really quite riskless, since the contents of the mini's harddisk will remain unchanged!

If you see errors in this page, or want to make additions, please go ahead, after all this is a Wiki;)

best regards, and good luck!

Bas Hulsken

It's a hard habit to break, but that's not really The Wiki Way. See Be Bold, and may I suggest adding the page to your Watchlist? --Baylink 15:10, 15 February 2006 (UTC)
Ok, Point taken;) This is my first Wiki entry, I've added the page to my Watchlist, and changed the above. --Bhulsken 23:13, 15 February 2006 (UTC)


  • Update to diskless-0.4. A lot of fixes. Script defaults for fedora core 5, mythtv-0.20-fixes. Some issues with appearing X-cursor have been fixed by installing an invisible cursor theme. Some sound issues with mplayer and ac3 have been fixed by disabling the altivec resampler. And probably a lot of things I forgot. Bottomline, the script works well for me, and fc5+mythtv0.20 on the mini is working very well (pretty close to perfect I might say). OpenGL doesn't really work atm, so choose the qt renderer. I think the opengl implementation for radion in fc5 is not bug free. --Bas 14:31, 22 October 2006 (UTC)
  • Updated to diskless-0.2. This fixes the sound problems, and also builds a patched version of mythmusic. --Bas 12:04, 22 February 2006 (UTC)
  • Removed the system-config-netboot dependency (redhat scripts included in this should make the script a bit less fedora core 4 dependend. In fact, I guess now it should work on fc3, and other RPM base distributions. Also adopted a version number. --Bhulsken 12:23, 16 February 2006 (UTC)

Working on porting to fc5

I've updated the scripts (not uploaded yet, will be in version 0.4) to install fc5 for the mini. However, I can't compile /libs/libmythtv/mpeg/iso639.cpp. The Mini just hangs. Very strange.. hopefully a gcc or kernel update will fix this. Otherwise fc5 looks promising, seems at least the clock is fixed. --Bhulsken

Well, I've fixed the compilation issue, it turned out to be a swapping over nfs problem. Using this line: '/sbin/sysctl vm.min_free_kbytes=8096' in the bootscript fixed it.

Unfortunately, now myth compiles, but X always has a scrambled display. Grrrr... seems some wrong clock detection. Well.. I'll upload the scripts when this last problem gets fixed. Otherwise FC5 is great, at last ntp can keep the time synchronised.

note: all this has been fixed (in version 0.4 of the script), see changelog above. --Bas 14:31, 22 October 2006 (UTC) --Bas 14:19, 1 April 2006 (UTC)

Your changelog would be very useful in the comments field for the actual changes

Your comments you are entering for changes are very useful. They would be ideal if you entered them in the comments field at the bottom when you make the edit to the main article. Then, you only need to read the history of the article to see your summary along with the option to read the actual difference. Basically, the way I monitor this article is reading all the diffs on Special:Recentchanges. I don't really depend on talk pages having accurate change logs. --Gregturn 13:41, 22 February 2006 (UTC)

Hosting of the file

You may want to consider BitTorrent for distribution of the diskless image (assuming you have rights to do that). You can use Azureus on your machine to create a .torrent for the image, then upload the torrent to a site like, seed the file for a while, publish the link to the .torrent on this page, as people download it using BitTorrent and other seeds come online, you may even be able to stop seeding yourself but the worst case is the bandwidth load from you is significantly reduced. --Kkuphal 17:08, 22 February 2006 (UTC)

How did you build your PPC image? And can you switch it off netboot mode?

I'm trying to do something very similar to this with Gentoo. Right now I've created a /diskless/ppc partition and exported it through nfs (I've extracted a stage 3 ppc gentoo tarball). Right now I'm wondering how to go about compiling a kernel for the PPC arcitecture. I want to compile this kernel from scratch (even thought my Mac Mini already has dual boot Mac OSX and Gentoo, and I could just copy that kernel and filesystem.)

You mention how to put your Mac into Netboot mode, but what happens if you haven't configured your master server correctly? Can you easily get the Mac out of netboot mode -- can you boot it off a Linux PPC CD? or are you screwed until the master server actually works and the device boots of the network?

I'd like to mention that I've now completed my own diskless PPC, and would like to offer some ammendments to the document: For starters, you can reset the nvram on the mac by holding apple command p and r right after the boot up chimes. The system will chime a second time once the nvram is reset. Resetting the nvram made the machine boot up normally off the hard disk (and it didn't affect Yaboot's [my bootloader] operation at all)

For the second part, I was able to easily build a ppc image on gentoo by mounting the nfs shares rather than a freshly partitioned disk, and then just follow the gentoo handbook as normal. When you get to the last few stages though, you won't be installing a bootloader. There is a gentoo article on heterogenius diskless environments that talks about how to configure tftpd and dhcpd on the server, and what kernel parameters you need to setup to allow diskless booting.

some answers

I never actually compiled a kernel for the ppc, I've always been happy with standard fedora kernels, and haven't compiled my own since the year 2000 or so.

About setting the wrong stuff in nvram: On my macmini, if it can't boot from the network, it will boot from the harddisk, although there is a very long timeout (10min or so). It would probably be wise to advise in the howto to be carefull with this, and try to force a keyboard netboot first to see if things work out. However, I never had a keyboard with my mini, which is why this was my approach. And as you've found out, it's relatively easy to reset the nvram, so no permanent harm can be done.

Im not sure what you mean in your last paragraph... I don't use a freshly partinioned disk at all... just a root filesystem in the /diskless directory. The advantage of this is, that you can use rpm to install the entire ppc os. This is a quick way to get a working system which is also very easy to make changes to. I guess in Gentoo things are different.. with the compiling from source and all. I can't see a way to avoid setting up a separate root fs for the minimyth, since it's a ppc, while my host system is i386. Do note, that you can attach several macminis, and they'll use the same root filesystem. So you don't need individual root filesystems for every frontend.

anyway, thanks for your interest! Glad to hear you could make things work in Gentoo! I'll comment on your suggestions below.


You *need* an effectively static IP address handed out by your DHCP server. If you get a different address on each boot things will get messed up badly. Try a fixed mapping in your DHCP server config file, for example:

 host macmini {
   hardware ethernet 00:0d:93:77:77:77;

It's a bit dangerous to switch openfirmware to boot permanently off the network - if that doesn't work you may be stuck. (The Apple-Command-P-R key combination only works if you have an Apple keyboard.) I suggest instead doing a manual boot first until you are sure it works correctly. Run the following on the OSX command line:

 sudo nvram 'auto-boot?=false'

then openfirmware will prompt for what to do when booting. Boot off the network by entering the following at the openfirmware boot prompt:

 boot enet:,yaboot

Once you're happy that the network boot works, you can make it permanent by storing it in nvram as described in the article. Alternatively, get back to MacOS by typing mac-boot at the openfirmware boot prompt. Run the following on the OSX command line to get back to automatic MacOS startup:

 sudo nvram 'auto-boot?=true'

Please check the paths in the "getmythtv" script, the Sourceforge CVS paths have changed. Add the project name (the part behind "/cvsroot/") in front of the domainname, for example:

 old: cvs -z3 co -P faad2
 new: cvs -z3 co -P faad2

Also, mplayer is now hosted using subversion, not cvs. (I haven't tried compiling that yet.)

As a style note, I suggest never using "cd .." in shell scripts, since that risks going to unexpected places if an earlier "cd" failed (such as when the svn dirs are missing). Instead, use subshells:

      cd lame
      ./configure ...
  ) # now back in parent directory

-- KlausWeidner 05:46, 29 August 2006 (UTC)

Answers/ comments

1) Do I really need a fixed ip? I thought myth looks at the DNS name, not the ip. But I could be mistaken. So far there haven't been any problems though, dhcp gives you the same ip anyway if your address space is larger than the total number of hosts.

(kw) Yes, the Fedora diskless setup uses a directory on the NFS server named after the client's IP address, so if that changes all the files written in the previous session are inaccessible. The policies how the IP addresses get handed out seem to vary based on the DHCP server, my router recycled addresses after their lease expired.

2) About the nvram stuff, you are right, see my comments above as well. I'll change this in my next revision of the howto. Note however, that it's (almost) impossible to do permanent harm with these nvram settings, because they can be reset at boottime.

(kw) I was just being extra paranoid since I don't have an Apple keyboard. As far as I know I can't enter the required nvram reset combination using a standard PC keyboard.

3) Yes, many hostnames have changed, and mplayer has moved to svn. The next version of this script will have all the changes. It also uses fc5, mythtv 0.20, and allows direct rendering. It's working pretty well for me, so I'll post it soon.

(kw) Thanks for your efforts, I'm looking forward to it! KlausWeidner 16:18, 15 September 2006 (UTC)

4) You're right about the 'cd ..' it's not very nice, and not fault tolerant at all. The script is a bit of a quick hack;-) Anyway, I'll change it in the next iteration of the script.

Thanks for your comments and suggestions! It's very much appreciated.

--Bas 09:20, 14 September 2006 (UTC)

Note: I've addressed some of your suggestions in the new version of the script (0.4), not all though. This is not because I disagree with your suggestions, but just because I'm very short on time (writing my Phd thesis).

--Bas 14:31, 22 October 2006 (UTC)