Archive for the ‘GNU/Linux’ Category

Installing Frets On Fire on Ubuntu by making .deb package

Sunday, November 8th, 2009

sudo apt-get install dh-make
mkdir fretsonfire-1.3.110
cd fretsonfire-1.3.110
dh_make -s -n
cd debian
rm *.ex *.EX
mkdir fretsonfire
mkdir fretsonfire/usr
mkdir fretsonfire/usr/share

Now download the game
wget http://downloads.sourceforge.net/fretsonfire/FretsOnFire-1.3.110.tar.gz?use_mirror=osdn
tar zxf FretsOnFire-1.3.110.tar.gz
mv Frets\ on\ Fire-1.3.110/ fretsonfire/usr/share/fretsonfire
rm -rf Frets\ on\ Fire-1.3.110/ FretsOnFire-1.3.110.tar.gz

mkdir fretsonfire/DEBIAN
pico control

Make sure it look something like this
Source: fretsonfire
Priority: optional
Section: universe/games
Maintainer: yourname
Homepage: http://fretsonfire.sourceforge.net/
Package: fretsonfire
Architecture: all
Version: 1.3.110
Depends: python-pygame, python-opengl, python-numpy
Description: Open source guitar game

cp control fretsonfire/DEBIAN/
mkdir fretsonfire/usr/bin
echo -e "#\!/bin/dash\ncd /usr/share/fretsonfire/src/\npython FretsOnFire.py" > fretsonfire/usr/bin/fretsonfire
chmod +x fretsonfire/usr/bin/fretsonfire
mkdir fretsonfire/usr/share/pixmaps

# if the following image does not exist, find another one through google
wget http://www.freedownloadsplace.com/photo/Frets-on-Fire-1.png -O fretsonfire/usr/share/pixmaps/fretsonfire.png
mkdir fretsonfire/usr/share/applications
pico fretsonfire/usr/share/applications/fretsonfire.desktop

Overwrite with this text
[Desktop Entry]
Version=1.3.110
Type=Application
Name=Frets On Fire
Comment=A opensourced guitar game
Icon=fretsonfire
Exec=fretsonfire
Terminal=false
Categories=Game;ArcadeGame;

cd ..
dh_builddeb
cd ..
dpkg -i fretsonfire_1.3.110_all.deb

Ubuntu network install (PXE)

Sunday, October 25th, 2009

sudo apt-get install tftpd-hpa tftp-hpa xinetd dhcp3-server
sudo pico /etc/xinetd.d/tftp

Then write following

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = /var/lib/tftpboot
disable = no
}

Edit TFTP config
sudo pico /etc/default/tftpd-hpa

Make it look something like

#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"

Create TFTP directory and get latest netboot image

sudo mkdir /var/lib/tftpboot
cd /var/lib/tftpboot
sudo wget -np -r http://archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/
sudo mv archive.ubuntu.com/ubuntu/dists/karmic/main/installer-i386/current/images/netboot/* .
sudo rm -rf archive.ubuntu.com

Now restart TFTPD
sudo /etc/init.d/tftpd-hpa restart

To check if running@
netstat -uap

For DHCP, make sure you have a fixed ip for your device
pico /etc/dhcp3/dhcpd.conf

I did use firestarter as a DHCP generator since I used my desktop as PXE-server.


# DHCP configuration generated by Firestarter
ddns-update-style interim;
ignore client-updates;
authoritative;

subnet 192.168.66.0 netmask 255.255.255.0 {
option routers 192.168.66.9;
option subnet-mask 255.255.255.0;
option domain-name-servers 130.67.60.68, 193.213.112.4;
option ip-forwarding off;
range dynamic-bootp 192.168.66.10 192.168.66.20;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.66.9; # important for PXE
filename "pxelinux.0"; # important for PXE
}

After the DHCP change we must restart DHCP
sudo /etc/init.d/dhcp3 restart

You should now be able to boot PXE of this machine.