Wednesday, August 12, 2009

August 12th 2009 - Debian Netboot server working

Broadcast message from user@localhost

Today (at midnight) I had a working netboot server under my debian installation in my netbook. I followed a couple tutorials ( 'Debian Administration :: Setting up a server for PXE network booting' and 'DebianLive/Howto/Creating a Test environment - Debian Wiki' )

First I had to assign a static ip address to the wired network interface eth0, so I list the necesary setup which most of us already know about.

# cat /etc/network/interfaces
iface eth0 inet static
allow-hotplug eth0
auto eth0

Right after I installed the dhcp3-server and tftpd-hpa
# apt-get install dhcp3-server tftpd-hpa

The booting process goes as follows
  • The host request a ip address using the dhcp protocol.
  • The dhcp server assign an address to the host and sends a boot rom or a list of the available boot roms to let the user pick one. Once picked the kernel boots
With the necessary programs and the (very basic) background I post my sample configuration:
  • The configuration for the dhcp server
# cat /etc/dhcp3/dhcpd.conf
option domain-name "";
default-lease-time 86400;
max-lease-time 604800;

allow booting;
allow bootp;

subnet netmask {
filename "pxelinux.0";
option subnet-mask;
option broadcast-address;
option routers;
  • The configuration for the tftp server
# cat /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
OPTIONS="-l -s /var/lib/tftpboot"

After configuring we must create some files in the tftp root directory (/var/lib/tftpboot in this case)
  • Create the pxelinux directory
mkdir -p /var/lib/tftpboot/pxelinux.cfg
  • Create the default entry
touch /var/lib/tftpboot/pxelinux.cfg/default
  • Create the boot selection text
touch /var/lib/tftpboot/boot.txt
  • * Download a sample pxe boot rom
cd /var/lib/tftpboot/
  • Download a sample kernel and initrd to boot
mkdir -p /var/lib/tftpboot/debian/etch/i386
cd /var/lib/tftpboot/debian/etch/i386
  • Fill the pxelinux.cfg/default file
DISPLAY boot.txt

DEFAULT etch_i386_install

LABEL etch_i386_install
kernel debian/etch/i386/linux
append vga=normal initrd=debian/etch/i386/initrd.gz --
LABEL etch_i386_linux
kernel debian/etch/i386/linux
append vga=normal initrd=debian/etch/i386/initrd.gz --

LABEL etch_i386_expert
kernel debian/etch/i386/linux
append priority=low vga=normal initrd=debian/etch/i386/initrd.gz --

LABEL etch_i386_rescue
kernel debian/etch/i386/linux
append vga=normal initrd=debian/etch/i386/initrd.gz rescue/enable=true --

  • Fill the boot.txt file
- Boot Menu -


The pxelinux syntax us very similar to syslinux/isolinux/extlinux syntax because all these are a family of boot loaders (see for details)

With all the configuration done I proceed to connect the machines. since this is a basic test I kept the connection simple with a crossover cable

After a few tries I restarted three rc scripts and everything worked

# /etc/init.d/networking restart
# /etc/init.d/tftpd-hpa restart
# /etc/init.d/dhcp3-server restart

And the final result (after finding out the correct order to restart the services in order to make this work).

I set my netbook to be dhcp and pxe boot server, with the correct modifications this will work in the lab and on the flisol netinstall event.

init 0 ;

Monday, February 9, 2009

February 9th, 2009 - PowerBook G3 Massive Backup

Broadcast message from user@localhost

Today I'm making a massive backup of all the Mac harddrive's content, this time the backup is made over the network using ssh dd bzip2 and a little shell script to poll dd about the read sectors

The compound command goes as follows
  • PowerBookG3 root # time dd if=/dev/hda bs=1K | bzip2 --verbose --compress --fast | ssh isamu@ "time dd of=./MacintoshPowerBookG3-FullHDDBackup.dd.bz2"
And the little polling script
  • #!/bin/bash
  • while (kill -USR1 $1;) do (sleep 5) done;
The compound command is run on the target storage (in this case my Acer Aspire One) once it has a ssh connection with the source

The polling command is to be run on the source machine (the PowerBook)

Since it's a full drive backup it will take a while. Here are the partition details mac-fdisk throws.

PowerBookG3 ~ # mac-fdisk /dev/hda
Command (? for help): p
# type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Driver43 Macintosh 54 @ 64 ( 27.0k) Driver 4.3
/dev/hda3 Apple_Driver43 Macintosh 74 @ 118 ( 37.0k) Driver 4.3
/dev/hda4 Apple_Driver_ATA Macintosh 54 @ 192 ( 27.0k) Unknown
/dev/hda5 Apple_Driver_ATA Macintosh 74 @ 246 ( 37.0k) Unknown
/dev/hda6 Apple_Driver_IOKit Macintosh 512 @ 320 (256.0k) Unknown
/dev/hda7 Apple_Patches Patch Partition 512 @ 832 (256.0k) Unknown
/dev/hda8 Apple_HFS untitled 14815232 @ 1344 ( 7.1G) HFS
/dev/hda9 Apple_Free Extra 24253504 @ 14816576 ( 11.6G) Free space

Block size=512, Number of Blocks=39070080
DeviceType=0x0, DeviceId=0x0
1: @ 64 for 23, type=0x1
2: @ 118 for 36, type=0xffff
3: @ 192 for 21, type=0x701
4: @ 246 for 34, type=0xf8ff

Command (? for help): q

And here is the ressult of running the polling command (the only parameter it takes is the dd process id to send the USR1 signal to)
This obtains the input bytes processed by the first dd command.
  • ...
  • 1513013+0 records in
  • 1513012+0 records out
  • 1549324288 bytes (1.6GB) copied, 3305.86 s, 469kB/s.
  • ...

The speed is very slow, I compressed it before the network sending to eliminate the bottleneck caused by uncompressed dd streams traveling on the network. I expect the command to finish and I believe that's all for now (I'm pretty sleepy and it's 4:30AM, so I believe I should sleep a few hours... lol)

init 0

Wednesday, February 4, 2009

February 4th, 2009 - X-BOX Arrives

Broadcast message from user@localhost

Today I arranged a meeting with my friend Emanuel because he is selling me his X-BOX, we met at the lab (LIDSOL) and after a little chatting (while the lab was being cleaned by Julio, the social service guys and myself) I got the xbox with its original cardboard box. I didn't had my TV card (see previous posts) so I had to wait until I get home to see if the xbox was working properly.

I got home at night and checked plugged the xbox to the TV card and I was a little surprised to see the xbox error code shown below

I'm saying "a little surprised" because Emanuel warned me about the xbox was lacking it's hard drive, after a little researching on the 05 error code, I found out this error is caused because a retail bios is expecing to find a locked harddrive and if it finds an unlocked drive, then the error is shown and the system halts.

As I read in some pages the locking procedure goes as follows
  1. Turn on the target xbox with it's default harddrive, this xbox must be modded in order to boot non-legit media (such as the Evolution-X CD).
  2. Once the Evolution-X dashboard is launched, ftp the xbox and backup all drives.
  3. Within the Evoution-X menu get the HDD key and save it as well.
  4. Once the HDD key has been saved, the new harddisk may be properly locked and installed into the target xbox.
  5. If everything goes well, the new HDD will be properly detected and the xbox will load normally.
But, it results I don't have the xbox HDD Key, thus I'm unable to properly ock the hdd to be recognized on the xbox. There was another proceess involving a xbox modchip with bios replacement, basically the second bios does allow the use of unlocked drives and If i wish I can lock the drive with the Evolution-X CD to make the retail bios boot normally.

I need a modchip for about a day! I see pointless buying a modchip I'm using just for one day (apart from being quite expensive on my country). Hope I can talke my xbox with a friend of a friend who may helpme with this locking thing, the process itself (apart from soldering the modchip) is quite simple. So no big deal with the correct tools (and technical background).

I hope to get the xbox up and running by the end of this month :)

init 0

Monday, February 2, 2009

February 2nd 2009 - Mac PowerBook G3 is here!

Broadcast message from user@localhost

Today I received a Mac PowerBook G3 and now I finally can get my hands on a mac with no restrictions (Those guys on the MacStore keep an eye on you whenever you touch the mac, thus no big fun on there T_T).

The Mac Specifications are as follows

Macintosh PowerBook G3 Lombard/Bronze (NewWorld)
PowerPC G3 740 at 333.33 MHz
66.66 MHz System Bus

512 MB RAM
20GB Hard Disk (ATA)

I'm making a backup of the Mac's hard disk drive and hope I get a MacOS X 10.0 - 10.3 CD to restore the mac in case something happens (I'm keeping this safe since I haven't had a mac and I'm pretty much new to this non-x86 hardware world).

Sunday, February 1, 2009

February 1st, 2009 - Alternate way to get video+audio input from external source in Pinnacle card

Broadcast message from user@localhost

As I didn't found a short term solution to add audio in composite or S-Video input I came up with a little hardware trick. As the previsous post said when selecting composite or S-Video input, the audio is grabbed from the last seen channel from antenna input, thus if I can only hear audio from a TV channel I can use my RF-Modulator between the external source and the Pinnacle card making all (audio+video from ext) appear in channel 3 or 4 on the TV (the modulator has a switch to select this)

The little modulator needs a 9V 100mA power source, it came with a power adapter wen I bought it a while ago. When no input from external source, the signal from the antenna is forwarded, but when a signal from external source is detected the device will modulate the input and send it to TV-OUT where the capture card waits for input in antenna source (pretty simple xD)

Here is a diagram explaining the connection:

Extra diagram if we need to connect mazimum 3 video sources (1 on RF, 1 on Composite and 1 on S-Video) to switch among them. We must remember again to have antenna input in channel 3 or 4 and if we supply audio from EXT-A (optional) it will remain independently of the selected video source.

I believe that's all for now, I played with the connections and saw the input quality by playing for a while (most all day ^_^ ), I Expect to get at least a recording of the gamecube booting GC-Linux Alpha Preview ( and if my screeenshots are good enough, uploading them to the site

init 0

Thursday, January 29, 2009

January 29th 2009 - Pinnacle PCTV Pro USB

Broadcast message from user@localhost

Today I bought a Pinnacle PCTV Pro USB TV Capture Card to capture the output of the game consoles, since it has 3 inputs (Antenna, Composite and S-Video) 3 gameconsoles may fit into it :)

There is an issue with the audio, I'm working with 'tvtime' to see the TV

At the beginning by running the following
  • $ tvtime --device /dev/video0 --vbidevice /dev/vbi0 --input 0
I can watch TV but no luck with the audio, until I found these two sites which list similar problems and they solve it by running sox - the swiss army knife in audio tools.

The problem basically is the capture card comes with a sound card and the audio from the TV channels is dumped into this new card, since I'm using my primary card I expected all audio went through it, but it ressult it wasn't, so I had to use sox to have a "digital wire" (formally a pipe) connecting the output from the usb audio card with the input of the primary audio card.

the sox usage info was obtained from the following sources

My command to load tvtime and pipe te audio to the correct card is:
  • $ tvtime --device /dev/video0 --vbidevice /dev/vbi0 --input 0 & sleep 1 && sox --channels 2 -sw --rate 44200 --type ossdsp /dev/dsp1 --type ossdsp /dev/dsp
  • Load tvtime and sleep 1 second, after sleeping (double ampersand) launch sox

So far I have only seen the signal with audio comming from antenna input, even if I connect the RCA audio to the device via RCA-to-3.5mmPlug adapter doesn't make any difference, the sound input is grabbed from the last tunned channel on Antenna input.

I hope to get the audio working from Composite or S-Video input, else I'm just bypassing the sox part

I believe that's all for now

init 0

Monday, January 5, 2009

January 5th, 2009 - GameCube - Phantasy Star Online

Broadcast message from user@localhost

Today I bought a Phantasy Star Online Episode 1 & 2 disc, this game is pretty rare and I got it cheaper, almost like any other used GC game. The disc is in good condition, some minor scratches, but it loads smooth and I played for some hours with it ^-^

I tested the PSOLoad method to run GC-Linux Alpha and it worked!. I had to set the ip address of my machine to static ip and the cube has it's own address, thus they need to be on the same segment
  • PC:
  • GC:
After a little reading on the page, I read the NBD and NFS versions of gcLinux may be edited to request an ip address through dhcp, so my logic pointed me to edit the zImage.dol replacing the following text
  • ip=
with this
  • ip=dhcp
I padded with spaces (to respect the binary size), the booted the image with PSOLoad and... it worked !!!. I'm very exited to see it worked.

In both cases (static and dynamic ip) the gamecube was able to serve the webpage
And I made telnet connections to it (after i read the gclinux page and foud out of user and password)
  • telnet 22