unhappy_mage
[H]ard|DCer of the Month - October 2005
- Joined
- Jun 29, 2004
- Messages
- 11,455
Well, it's been mentioned lots of times before, but it's finally ready (sort of). Unhappy_mage is proud to present the Folding@Home Network Booting Server. Total download size as of now is around 65MB, and total headache factor per end user is still ridiculous. It will get about 5MB bigger, and about 37 zillion times easier to use, i promise.
For now, these are the instructions. These are not for the faint of heart or Linux n00bs, but it'll get easier and you can really only break one machine. If you are one of the aforementioned n00bs, it might be worth trying anyway if you don't mind losing one machine until it gets worked out.
https://netfiles.uiuc.edu/jkersey/linux/ is the URL. Get the 2 files from there, and get tomsrtbt from toms.net. You want the "dos" or "linux" version. If you have another disk, it'll probably work, just it needs fdisk, mkswap, mke2fs, and tar. Create a disk, and boot it on your "server" machine. You'll also need the server.tar.bz2 and install.tar.gz files available, burn 'em to a CD or something.
Okay, now we start the process of creating a place to put the installation. Run "fdisk" and make a / partition and a swap. You'll only need 512 or so of swap at most, don't go crazy on it. Make the rest /. You probably won't need a /boot partition, but it won't hurt. Run mkswap on the swap partition (remember to change the type!) and mke2fs -m 0 (the -m 0 says reserve 0% for the superuser) on the root. Remember to change the types of the partitions to 82 for the root (and boot, if you make one) and 83 for the swap.
Now mount the root somewhere and the cdrom somewhere else. For the sake of argument, the system is on /mnt/system and /mnt/cdrom. So do this now:
This will uncompress the server files to that partition.
Now we need to do some other miscellaneous stuff to finish up the install. First, we'll fix some config files. A few things are different in my setup than they are in yours, so they need to change. We'll make a script to simplify these changes.
First, what IP do you want for the server? Do "export IP=<your ip here>".
Where is your gateway to the internet? Do "export GW=<your gateway here>".
DNS server? "export DNS=<your DNS server>".
Name of the disk installed to? (e.g. hda, EXcluding the /dev/ part) "export MBR=/dev/<your disk>"
Name of root partition? (e.g. hda1) "export DISK=<your root>"
Name of swap partition? (e.g. hda2) "export SWAP=<your swap>"
Okay, now you've got the bits you need defined. Now we'll create the script itself. This is a "sed" script. We use "echo" to make the script.
Okay, now the sed script is made. Make sure you get the right number of >'s (one the first time and two thereafter) one each line.
Now we'll unpack the install.tar.gz file to somewhere. Anywhere, it doesn't really matter. Just remember where it is. Change to that directory and do "cd files". Then run these commands:
Now we're ready to run Lilo and reboot. Do "lilo -C /mnt/system/etc/lilo.conf".
Clients should be able to boot now. The server will handle either "PXE" or "Etherboot" clients with equal ease.
If you run into trouble with these instructions, please email me. I appreciate any help you can give me in simplifying these instructions, the whole process, fixing stuff that's broken, money , or whatever. Fold on, everyone.
edits:
add disclaimer about change partition types
no /dev/'s in DISK, SWAP, and ROOT.
For now, these are the instructions. These are not for the faint of heart or Linux n00bs, but it'll get easier and you can really only break one machine. If you are one of the aforementioned n00bs, it might be worth trying anyway if you don't mind losing one machine until it gets worked out.
https://netfiles.uiuc.edu/jkersey/linux/ is the URL. Get the 2 files from there, and get tomsrtbt from toms.net. You want the "dos" or "linux" version. If you have another disk, it'll probably work, just it needs fdisk, mkswap, mke2fs, and tar. Create a disk, and boot it on your "server" machine. You'll also need the server.tar.bz2 and install.tar.gz files available, burn 'em to a CD or something.
Okay, now we start the process of creating a place to put the installation. Run "fdisk" and make a / partition and a swap. You'll only need 512 or so of swap at most, don't go crazy on it. Make the rest /. You probably won't need a /boot partition, but it won't hurt. Run mkswap on the swap partition (remember to change the type!) and mke2fs -m 0 (the -m 0 says reserve 0% for the superuser) on the root. Remember to change the types of the partitions to 82 for the root (and boot, if you make one) and 83 for the swap.
Now mount the root somewhere and the cdrom somewhere else. For the sake of argument, the system is on /mnt/system and /mnt/cdrom. So do this now:
Code:
cd /mnt/system
tar jtvf /mnt/cdrom/server.tar.bz2
Now we need to do some other miscellaneous stuff to finish up the install. First, we'll fix some config files. A few things are different in my setup than they are in yours, so they need to change. We'll make a script to simplify these changes.
First, what IP do you want for the server? Do "export IP=<your ip here>".
Where is your gateway to the internet? Do "export GW=<your gateway here>".
DNS server? "export DNS=<your DNS server>".
Name of the disk installed to? (e.g. hda, EXcluding the /dev/ part) "export MBR=/dev/<your disk>"
Name of root partition? (e.g. hda1) "export DISK=<your root>"
Name of swap partition? (e.g. hda2) "export SWAP=<your swap>"
Okay, now you've got the bits you need defined. Now we'll create the script itself. This is a "sed" script. We use "echo" to make the script.
Code:
echo 's/@@IP@@/$IP/;' > /tmp/sub.sed
echo 's/@@GW@@/$GW/;' >> /tmp/sub.sed
echo 's/@@DNS@@/$DNS/;' >> /tmp/sub.sed
echo 's/@@DISK@@/$DISK/;' >> /tmp/sub.sed
echo 's/@@SWAP@@/$SWAP/;' >> /tmp/sub.sed
echo 's/@@MBR@@/$MBR/;' >> /tmp/sub.sed
Now we'll unpack the install.tar.gz file to somewhere. Anywhere, it doesn't really matter. Just remember where it is. Change to that directory and do "cd files". Then run these commands:
Code:
sed -f /tmp/sub.sed < bootlocal.sh > /mnt/system/opt/bootlocal.sh
sed -f /tmp/sub.sed < dnsmasq.conf > /mnt/system/etc/dnsmasq.conf
sed -f /tmp/sub.sed < fstab > /mnt/system/etc/fstab
sed -f /tmp/sub.sed < hostname > /mnt/system/etc/hostname
sed -f /tmp/sub.sed < hosts > /mnt/system/etc/hosts
sed -f /tmp/sub.sed < ifcfg-eth0 > /mnt/system/etc/sysconfig/network-scripts/ifcfg-eth0
sed -f /tmp/sub.sed < interfaces > /mnt/system/etc/network/interfaces
sed -f /tmp/sub.sed < lilo.conf > /mnt/system/etc/lilo.conf
mkdir /mnt/system/foldsave
mkdir /mnt/system/fold
Clients should be able to boot now. The server will handle either "PXE" or "Etherboot" clients with equal ease.
If you run into trouble with these instructions, please email me. I appreciate any help you can give me in simplifying these instructions, the whole process, fixing stuff that's broken, money , or whatever. Fold on, everyone.
edits:
add disclaimer about change partition types
no /dev/'s in DISK, SWAP, and ROOT.