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

Qype: Weinstube Trollinger in Stuttgart

December 18th, 2009 Ansi

StuttgartEssen & TrinkenRestaurantsWeinbars & Weinstuben

Letzte Woche auf der Suche nach einem netten Abendrestaurant durch Stuttgart gelaufen und durch “Zufall” ins Trollinger geraten. Aber sehr ueberrascht worden. Das Essen war sehr lecker, das Fleisch sehr zart, die Portionen uebergross und die Bedienung war superfreundlich und sehr schnell. Obwohl ein “Zufallstreffen” werden wir oefters vorbei schauen. Kann ich sehr empfehlen.

Mein Beitrag zu Weinstube Trollinger – Ich bin AnsgarSchmidt – auf Qype

  • Share/Bookmark

HTC Hero earphone jack problem and howto solve

November 29th, 2009 Ansi

Moin
Last week I had some problems with my HTC Hero Android phone. The mobile is awesome no question about that, but there is one funny “feature” which I don’t need at all and what caused me some trouble. The Hero (maybe other mobiles too) has the nice feature to switch from build-in loudspeakers to external earphones (via the jack on top) via software switch and not like other devices via hardware switch. This causes a problem when the process is not responding when you plug in the earphone. First impression is “hardware error” and you want to send back your phone to the repair center. But wait. This is a software bug (although the T-Mobile stores are not aware of that). Thanks to the Androidforum ere are two solutions for that.

  1. The easy but not always working way
    1. Turn off the phone by holding down the Hangup button for some time.
    2. Plug in your earphones
    3. Turn on the phone (if you see the earphone symbol everything is fine now)
  2. The not so easy but always working way
    1. Download the APKatcher App from the Market (market://search?q=pname:nEx.software.Apps.APKatcher
    2. Enable 3rd party apps on your mobile in order to accept apps from other locations then the market
    3. Get the toggleheadset application from google code.
    4. Send the app to your phone via email
    5. Install the app
    6. Add the toggleheadset widget to your phone desktop

After that you can toggle between your earphones and the internal loudspeaker.

  • Share/Bookmark

Qype: Ackermanns in Stuttgart

November 15th, 2009 Ansi

StuttgartEssen & TrinkenBars & KneipenKneipenEssen & TrinkenBars & KneipenBars

Eigentlich waren wir auf der Suche nach einer Tatort Kneipe und sind haben das “Maulwurf” mit dem Ackermanns verwechselt (ist die gleiche Internetseite). Leider gab es dann in diesem Ackermanns kein Tatort. Aber dafuer haben wir eine sehr sehr schoene Kneipe entdeckt. Lecker und guenstiges Essen. Nette Atmosphere und super nette Bedienung. Wir werden da wohl oefters hingehen. Die Bier und Whisky Karte ist super und sehr sehr lecker.

Mein Beitrag zu Ackermanns – Ich bin AnsgarSchmidt – auf Qype

  • 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

testupload

June 13th, 2009 Ansi

New bibliothek stuttgart
Image posted by MobyPicture.com
- Posted using MobyPicture.com

  • Share/Bookmark

Bikemap Routes on Garmin GPS

June 13th, 2009 Ansi

Moin

I love Peters Bikemap.net page. Using this service to plan all my bike tours. Unfortunately my Garmin (GPSmap 60) does not understand the gpx file from Bikemap export. I wrote this little script to modify and split the route into smaller routes. GPSmap 60 only handle 250 points per route. Therefore the script splits the route into smaller pieces, renames the note names into “rtept” resp. “rte” and uploads the route via USB to the connected garmin.

What you need to run this script are gpsbabel and the unix commands: sed, split,cut and head .

Here it is, as usually no guarantee.

#!/bin/bash
filename=$1

gpsbabel -i gpx -f ${filename} -o csv -F out.csv
split -l 200 out.csv splits
rm out.csv

for i in `ls splits*`
do
 gpsbabel -i csv -f ${i} -o gpx -F ${i}.gpx
 sed 's/wpt/rtept/' ${i}.gpx > out
 rm ${i}.gpx
 mv out ${i}.gpx
 rm ${i}

 linenumber=`wc -l ${i}.gpx | cut -d " " -f 1`
 let linenumber-=1

 sed -n 10,${linenumber}p ${i}.gpx >a.gpx

 rm ${i}.gpx

 cat ${filename} | head -n 9  >${i}.gpx
 echo "<rte>"                >>${i}.gpx
 cat a.gpx                   >>${i}.gpx
 echo "</rte>"               >>${i}.gpx
 echo "</gpx>"               >>${i}.gpx
 rm a.gpx

 sudo gpsbabel -r -i gpx -f ${i}.gpx -o garmin -F usb:0
 rm ${i}.gpx
done
  • Share/Bookmark

LeChuck Me… Monkey Island is back yeahhhhh

June 2nd, 2009 Ansi

Moin

Just found on Slashdot the article on the new Monkey Island. Its points to rockpapershutgun. Go and read on your own or just watch this cool movie with preview and background information and hey also great impressions on the new Monkey Island. Cant wait to have it:

  • Share/Bookmark