This post is written assuming you have a headless box of some sort that is capable of PXE booting (I'm using a Dell Powervault 715), and are using a machine running OS X as the server. There seem to be plenty of tutorials out there aimed at using Linux as the server. Note: this is a work in progress. It is incomplete and untested. This blog may prove very useful.
First, get osx-pxeboot. I believe it's distributed by a company called Metrix Communication LLC. The readme explains a lot of it. Download and mount the ISO for the Fedora DVD, then browse to images/pxeboot and read the README file. This directory is really all you need from the DVD. Don't know if you could just pull it off of CD 1, but bandwidth has not been an issue for me (boy I love this Class A subnet). And as it turns out, it doesn't need to be in the webserver as osx-pxeboot says (I think - haven't finished writing yet) because we're going to be doing a network install over HTTP/FTP anyway. There's a fourth file in that directory called TRANS.TBL, but it can be ignored - I believe it's just a filesystem think specific to Linux, kind of like Windows' .thumbs and OS X's .DS_Store.
You don't need to copy everything from osx-pxeboot to / - some of it is already there. I recommend you only copy what you need, and keep a list of what that is. In my case, I copied /etc/dhcpd.conf, the contents of /sw/etc, and /tftpboot. Note that it's probably a good idea to use cp -i and cp -iR, as the i flag will cause cp to prompt you before overwriting files, which is always a Good Thing when mucking about as root. Note also that even when you're copying the entire contents of a directory, there may already be stuff there - so if and when you go back to delete that stuff, check before you do an rm -r! Anyway. Some of the files mentioned above are unnecessary - some of tftpboot/, for instance - but there's no harm in copying them over, since they're not overwriting anything.
Now, copy the vmlinuz and initrd.img to /tftpboot/. Modify pxeboot.cfg as necessary - basically replace default with the appropriate file (model it after default.console, or read the PXELINUX/SYSLINUX docs if you're feeling thorough). Mine is just one line: "DEFAULT /vmlinuz initrd=initrd.img".
Oh - note that if you're using Tftpserver (gui frontend to tftp, as the name implies), your path to /tftpboot/ may be different - mine is /private/tftpboot.
Now. Connect the boxes with an ethernet cable (needs to be a crossover cable). Power up the target box. Use the console to tell the BIOS what to do. Note that Mac laptops have no serial port (aww ...) so you'll need to do that with another computer or terminal or whatever, if you don't have a USB-serial adapter (if you do, remember that you need drivers. Assuming, like me, you bought no-name crap from Radioshack, use System Profiler to find the chipset in question. It's probably Prolific, in which case, the necessary tweaks are described here - use the sourceforge driver, the other one is broken). On the Mac, run /user/sbin/pxeboot as root. When done, type "/user/sbin/pxeboot die" and proceed to install from there. Most likely you want to do a vnc or ssh install.
This is as of yet untested - that is coming soon. It may EAT ALL THE CHEESE IN YOUR HOUSE.
20061204
Concatenating PDFs
Dealing with pre-existing pdfs tends to be a pain, but concatenation is pretty simple. I like the Ghostscript option - I'll probably write a script to automate that over winter break.
The Ghostscript above didn't work well for me, but I had luck with theGhostscript TexExec for this (duh). But if you're doing this on a machine with a decent commandline (and LaTeX), we can usually assume you have that. The page listed above also mentions ways of putting multiple pages on one sheet (like you often see with Powerpoints). Haven't tried it yet, but it looks simple. And I didn't have the performance issue mentioned on that page - it ran quickly for me. There's also a trick there to using TeX with a package called PDFpages. A bit more cumbersome, but it should work.
So, at oh-dark-thirty when you've finished your psets, scp them to athena; concatenate them; pdf2ps the resulting file; and you need only run one lpr command in the morning (if you want to be really ambitious, concatenate them on your local machine, and ssh into athena.dialup.mit.edu to run the lpr command as you walk out of your room - then your printout will be waiting for you as you pass the cluster).
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf
The Ghostscript above didn't work well for me, but I had luck with the
texexec
command from the same page - just texexec -pdfarrange -result out.pdf in1.pdf in2.pdf [...]
. If you want to add a blank page anywhere, use the --addempty=n
flag, where n
is a comma-delineated list of the pages after which you want an empty page. Note that for whatever reason, texexec
will pad the end of your document with an empty page if you have an odd number of pages. If you don't want that, you can use the --noduplex
flag, but why not print double sided and save a tree? Anyway, you need So, at oh-dark-thirty when you've finished your psets, scp them to athena; concatenate them; pdf2ps the resulting file; and you need only run one lpr command in the morning (if you want to be really ambitious, concatenate them on your local machine, and ssh into athena.dialup.mit.edu to run the lpr command as you walk out of your room - then your printout will be waiting for you as you pass the cluster).
Welcome
I have a bunch of stuff that would fit here on my other blog - I just figured it would be a good idea to consolidate all of the memoize-type stuff in one place so it's easier to search. Hopefully I will have time after finals to transfer those posts over, but that depends a great deal on how lazy I am.
Subscribe to:
Posts (Atom)