Family, Work, Life

Howto boot ISO images via grub2 with ubuntu

February 6th, 2010 Ansi

Moin

I am using Ubuntu “Daily builds” for some time inside Suns VirtualBox. Unfortunately the daily builds are not longer booting inside VirtualBox for more then 2 weeks now. Christian told me about a new feature of Grub2. You can boot ISO images directly from your hard disk without burning them on CD or USB. Awesome feature and I had to try it today. Here is the description on how to do it with Ubuntu 9.10.

First I am using this tiny script to update all daily builds with the zsync tool. It transfers only the changed parts of the ISO so you and the Ubuntu teams save a lot of traffic.

zsync http://cdimages.ubuntu.com/daily-live/current/lucid-desktop-i386.iso.zsync
cd kubuntu
zsync http://cdimages.ubuntu.com/kubuntu/daily-live/current/lucid-desktop-i386.iso.zsync
cd ../netbook
zsync http://cdimages.ubuntu.com/ubuntu-netbook/daily-live/current/lucid-netbook-i386.iso.zsync
cd ../xubunutu
zsync http://cdimages.ubuntu.com/xubuntu/daily-live/current/lucid-desktop-i386.iso.zsync
cd ..
rm `find ./ -name "*.zs-old" `

This script keeps all my daily builds up to date.

Next Step is to enable the grub menu. In Ubuntu it can be done in “/etc/default/grub“. Change the following lines

GRUB_HIDDEN_TIMEOUT=10
GRUB_HIDDEN_TIMEOUT_QUIET=false

With this change you will see a 10 seconds count down when booting up. With the shift-key you get access to the grub boot menu. Next is to add the ISO images to the grub menu. Change to the “/etc/grub.d” dir.

Here you can find the grub menu entries and configuration files. Add your ISO images starting with 50 here. For example my entry for the normal Ubuntu ISO image (50_ubuntu) looks like this:

echo "Adding $(egrep menu[e]ntry $0 | cut -d'"' -f2)" >&2
 cat << EOF
menuentry "Ubuntu 10.04 Daily Build" {
       loopback loop (hd0,3)/ansi/software_and_config/ISOs/ubuntu/lucid-desktop-i386.iso
       linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ansi/software_and_config/ISOs/ubuntu/lucid-desktop-i386.iso file=(loop)/preseed/ubuntu.seed quiet splash bootkbd=sg --
       initrd (loop)/casper/initrd.lz
}

My ISO files are stored on sda3 under /ansi/software_and_config/ISOs/ubuntu/. In order to change it for your needs there are 3 elements to change. The loopback line contains your hard disk in grub style (hdx,y  x=0->sda x=1->sdb aso) and the path. The third element to change is in the linux line. Store this file as “50_ubuntu” in “/etc/grub.d“, make it executable with “chmod a+x 50_ubuntu” and activate the changes with “ubdate-grub“. After a reboot you should be able to activate the grub menu with the shift-key and select the new entry. Have fun.

I found some pages on this topic but the description there was not working for me so I changed it. But take a look on your own:

  • Share/Bookmark

Chrome extentions

December 20th, 2009 Ansi

Moin

I just run through several Chrome Extensions and here is my list of extensions I can recommend. Please write some comments if you have additional  recommendations.

  • Share/Bookmark

Ansi now on weather underground

June 26th, 2009 Ansi

Moin
Since 5 minutes I push my local weather station data (which can be seen in near real time here) to the weather underground network. See the sticker on the right side or this cool one here:

  • Share/Bookmark

APRS igate running xastir

June 14th, 2009 Ansi

Moin

I just played a little bit with APRS igate on Linux. There are some igate software available on Linux but the most supported package (javAPRESSrvr) is not available today because of an error on Yahoogroups where the files are hosted.

Therefore I installed xastir from Sourceforge and connected the the local running instance with the APRS-IS network. Now DM1AS is visible on FINDU. :-)

Nice side effect on this, the server generates an Google Maps page every 5 minutes with APRS stations around my home. Maybe tomorrow I connect my radio to the igate and there will be more local stations available.

So far you can see the map here:http://tinyurl.com/nacc5k


View Larger Map

  • Share/Bookmark

Server update to Ubuntu Server 9.04

April 26th, 2009 Ansi

Moin

My blog will be offline on sunday for some time because I will reinstall the server with new HD and Ubuntu 9.04.

  • Share/Bookmark

Howto download SIPGATE Voicemails (WAVs)

January 12th, 2009 Ansi

Moin

Sipgate has a very nice API to access the phonebook or write click2call applications. You can also check your voicemail (or as it is called in the API Unified Message). Unfortunately you can only get information on the amount of messages and if they are read or not. With a small wget script you can also download the WAV files and send them for example to your Nabaztag. Its cool to come home and your Nabaztag tells you about absent calls end presents you the message without picking up the phone or starting the laptop.

You need one wget call to get your PHPsession key:

 wget --no-check-certificate \
--save-cookies /home/ansi/.cookies/sipgate \
--keep-session-cookies \
--post-data "uname=Username&passw=Passwd&lasturi=%2Fuser%2Findex.php&jsh=1&okey.x=0&okey.y=0" \
"https://secure.sipgate.de/user/index.php"

Important to set your Username and Passwd in the script. Wget will then store your PHPsession key to your .cookies folder.

With

 wget "https://secure.sipgate.de/user/voicemail.php?\
       file=0001&status=new" \
       --load-cookies /home/ansi/.cookies/sipgate \
       --no-check-certificate
       -O 1.wav

you can download your voice messages as wav files. Then a little “lame” and an Nabaztag API call and your Voicemail will be presented to you as soon as you come home. Have fun.

  • Share/Bookmark

Pachube

January 9th, 2009 Ansi

Moin

Thanks to Oli (@EOLUS) I am now Beta Tester of Pachube. Cool Web 2.0 Service for Real Time Data exchange. People are streaming their measurement data with geographical informations in CSV or EEML XML format and can exchange their data.

I am now streaming my server temperature just for testing. Check out

http://www.pachube.com/api/1287.xml

Hope more will follow soon.

Its very easy to send your data from linux. For example with curl and csv:

/usr/bin/curl -X PUT -H “X-PachubeApiKey: abc123″ -d “`/bin/cat  /proc/acpi/thermal_zone/THRM/temperature | /usr/bin/cut -c 26-27`,” http://www.pachube.com/api/1287.csv

Important is your Pachube key in the header of the PUT request. And your feed ID. With this example I am catching the acpi CPU temp and send them to Pachube.

  • Share/Bookmark

Installed Akismet on my blog

December 21st, 2008 Ansi

Just installed Akismet on my blog. Hope I can handle now all these bloody spams. 82 in one day was tooo much!

And here is the counter:

  • Share/Bookmark

First new Post with WordPress 2.7

December 12th, 2008 Ansi

just installed the latest greatest WordPress 2.7 and hey the Dashboard looks great. Love the new interface.

  • Share/Bookmark

Server, Network and Phone reconfiguration

November 14th, 2008 Ansi

Moin
I am going to shutdown the server and network and the phone system now for complete reinstall and hardware upgrade / exchange. Hopefully the phone will work in one hour again and the network right after. The server can take a little bit longer… May be the tux with me….

  • Share/Bookmark