eitch's blog http://blog.eitchnet.ch me geek, you? Fri, 27 Aug 2010 19:11:55 +0000 http://wordpress.org/?v=2.9.2 en hourly 1 Ubuntu Netboot http://blog.eitchnet.ch/?p=266 http://blog.eitchnet.ch/?p=266#comments Fri, 27 Aug 2010 18:46:16 +0000 eitch http://blog.eitchnet.ch/?p=266 Notes on getting Ubuntu netboot to work so that I don’t have to burn any CD’s

This document expects a DHCP server to be available in the network

Install tftp

sudo aptitude install tftpd-hpa tftp-hpa

Get netboot files:

cd /var/lib/tftpboot
sudo wget -r -nH -np --cut-dirs=8 http://archive.ubuntu.com/\
ubuntu/dists/maverick/main/installer-amd64/\
current/images/netboot
find ./ -name "index.*" | sudo xargs rm

Add the following to the DHCP subnet configuration:

next-server 10.0.0.68;
filename "pxelinux.0";

Now normal netboot should work.

If one wants to have liveCD, then carry on by installing NFS-Server:

sudo aptitude install nfs-kernel-server

Add export for the livecd in /etc/exports:

/var/lib/tftpboot/maverick 10.0.0.0/255.255.255.0(async,no_root_squash,no_subtree_check,ro)

Mount and copy liveCD contents to exported NFS share:

sudo mount -o loop /tmp/maverick-desktop-amd64.iso /mnt
sudo cp -ar /mnt/* /var/lib/tftpboot/maverick/

Add a new menu entry in ubuntu-installer/amd64/boot-screens/rqtxt.cfg

label maverickLiveCD
menu label ^Live CD
kernel maverick/casper/vmlinuz
append vga=788 boot=casper netboot=nfs \
nfsroot=10.0.0.68/var/lib/tftpboot/maverick initrd=maverick/casper/initrd.lz --

Restart NFS:

sudo /etc/init.d/nfs-kernel-server reload

If problems arise, try using the following boot append line:

append file=/var/lib/tftpboot/maverick/preseed/ubuntu.seed vga=788 \
boot=casper root=/dev/nfs netboot=nfs \
nfsroot=10.0.0.68:/var/lib/tftpboot/maverick initrd=maverick/casper/initrd.lz --

]]>
http://blog.eitchnet.ch/?feed=rss2&p=266 0
VirtualBox resolution problems in a headless environment http://blog.eitchnet.ch/?p=255 http://blog.eitchnet.ch/?p=255#comments Mon, 16 Aug 2010 07:15:51 +0000 eitch http://blog.eitchnet.ch/?p=255 In certain cases running a VirtualBox VM in a headless linux environment can lead to a Windows XP having an undesired resolution.

I fixed this using the following two commands:

Global command:
VBoxManage setextradata global GUI/MaxGuestResolution 1920,1200

For a running VM:
VBoxManage controlvm "remote" setvideomodehint 1920 1200 24

I found the resolution in this forum:
VirtualBox Forums

]]>
http://blog.eitchnet.ch/?feed=rss2&p=255 0
aptitude search vs apt-cache search http://blog.eitchnet.ch/?p=249 http://blog.eitchnet.ch/?p=249#comments Wed, 07 Jul 2010 06:54:19 +0000 eitch http://blog.eitchnet.ch/?p=249 Over the years I have grown used to the fact that when I search for a package on a debian based distro, then I use:
apt-cache search foo bar
The result was a list of all the packages which had the text ‘foo’ and ‘bar’ in the description.

Lately it has been discouraged to use apt-get and apt-cache, but one should rather use aptitude as this tool is more powerful.

It is more powerful, but it does not behave the same. So the following command:
aptitude search foo bar
would return any result where either ‘foo’ or ‘bar’ was in the package name, not the description.

Since I have gotten used to apt-cache way this is how I do it with aptitude:
aptitude search "~dfoo bar"

But! This command does not check package names. Package names are with ~n. Maybe someone out there can explain how I can combine the two correctly?

]]>
http://blog.eitchnet.ch/?feed=rss2&p=249 0
Debugging And Logging Java RMI Calls http://blog.eitchnet.ch/?p=246 http://blog.eitchnet.ch/?p=246#comments Tue, 15 Jun 2010 06:22:31 +0000 eitch http://blog.eitchnet.ch/?p=246 If you ever need to debug Java RMI, then add these properties to the VM configuration:

-Djava.rmi.server.logCalls=true
-Dsun.rmi.server.logLevel=VERBOSE
-Dsun.rmi.client.logCalls=true
-Dsun.rmi.transport.tcp.logLevel=VERBOSE
]]>
http://blog.eitchnet.ch/?feed=rss2&p=246 0
Determining the base directory of a bash script http://blog.eitchnet.ch/?p=242 http://blog.eitchnet.ch/?p=242#comments Sun, 09 May 2010 13:59:14 +0000 eitch http://blog.eitchnet.ch/?p=242 While writing bash scripts, I find it a good idea to put reusable functions into their own scripts and then source them into other scripts.

This means that one must use the source /file/to/source call to load these files. To be able to do this, the bash script must know where the scripts to source are. To not have to hardwire this into the script, I just have the requirement, that the script must be in the same directory as the script itself.

The following code shows how one can find the base directory, with out using any external commands and it should work with out regards to how the script is called:

SCRIPT_NAME="${0##*/}"
SCRIPT_DIR="${0%/*}"

# if the script was started from the base directory, then the
# expansion returns a period
if test "$SCRIPT_DIR" == "." ; then
  SCRIPT_DIR="$PWD"
# if the script was not called with an absolute path, then we need to add the
# current working directory to the relative path of the script
elif test "${SCRIPT_DIR:0:1}" != "/" ; then
  SCRIPT_DIR="$PWD/$SCRIPT_DIR"
fi

# now we can source our other scripts
source $SCRIPT_DIR/logger.sh
]]>
http://blog.eitchnet.ch/?feed=rss2&p=242 0
Ubuntu 10.04 and Lucid Lynx: No icons in menu or buttons http://blog.eitchnet.ch/?p=233 http://blog.eitchnet.ch/?p=233#comments Thu, 06 May 2010 09:38:11 +0000 eitch http://blog.eitchnet.ch/?p=233 Preferences -> Appearance. What made them do that I can not fathom. Yet there is (still) an option to put the icons back. You can put it back for all new users by adding the following two lines to [...]]]> For the Ubuntu 10.04 Lucid Lynx, the developers decided to remove the Interface tab in System -> Preferences -> Appearance.

What made them do that I can not fathom. Yet there is (still) an option to put the icons back.

You can put it back for all new users by adding the following two lines to /usr/share/gconf/defaults/10_libgnome2-common:

/desktop/gnome/interface/menus_have_icons       true
/desktop/gnome/interface/buttons_have_icons      true

And you can activate it again for your current user by using these two commands:

gconftool-2 --type bool --set /desktop/gnome/interface/menus_have_icons        true
gconftool-2 --type bool --set /desktop/gnome/interface/buttons_have_icons       true

I just really hope support for this isn’t removed altogether in new Gnome versions

Courtesy of the following two ubuntu forum threads:
No icons in context menu for 9.10
GTK menus missing icons

]]>
http://blog.eitchnet.ch/?feed=rss2&p=233 0
Nerd Test http://blog.eitchnet.ch/?p=230 http://blog.eitchnet.ch/?p=230#comments Tue, 20 Apr 2010 15:16:26 +0000 eitch http://blog.eitchnet.ch/?p=230 I just had to do it:


I am nerdier than 89% of all people. Are you a nerd? Click here to take the Nerd Test, get geeky images and jokes, and write on the nerd forum!

]]>
http://blog.eitchnet.ch/?feed=rss2&p=230 0
Australia, Day 41 http://blog.eitchnet.ch/?p=149 http://blog.eitchnet.ch/?p=149#comments Tue, 16 Mar 2010 22:30:59 +0000 eitch http://blog.eitchnet.ch/?p=149 Day 41, Tuesday, March 16 2010
————————————

Today I enjoyed the city of Sydney. I went alone in the early morning and walked around the city centre of Sydney, loosing myself in the many streets. Every now and then I found a book store, into which I just had to go. It was interesting to see that every book store had a different assortment, with minor overlappings. For instance, one had more spiritual books, the other more language books, then another was only fantasy, horror and science fiction books.

I ended up in Darling Harbour, where I then went to the IMAX and watched Under The Sea and Avatar both in 3D. That was a good afternoon.

In the evening I met with Iris, but we didn’t do much anymore. We went to bed early, where I first packed my suit case and then read a bit. Once in bed I listened to a chapter of Harry Potther and the half blood prince.

]]>
http://blog.eitchnet.ch/?feed=rss2&p=149 0
Australia, Day 40 http://blog.eitchnet.ch/?p=147 http://blog.eitchnet.ch/?p=147#comments Tue, 16 Mar 2010 22:30:26 +0000 eitch http://blog.eitchnet.ch/?p=147 Day 40, Monday, March 15 2010
————————————

Our trip to the Blue Mountains was on this day. It started off with us having to find the Oz Experience office. It was on the other side of town and thanks to good instructions from Laurence at the reception and a quick train ride we were on time waiting for our bus driver. Our bus driver is called Jason. He is a strange bloke. It told us a bit too much of his private life, but he was nevertheless very informative and the day was quite nice.

The trip starts off with a long drive through the heavy Sydney morning traffic. Afterwards we went to a camp spot in the blue mountains, where were supposed to be able to spot kangeroos. Animals are not predictable, so we were not too upset that we didn’t see any. Jason said that he mostly does see them, but today we ran into bad luck.

I was actually not all too happy with this hunt, because I didn’t want to go to a spot, where I saw a mown lawn and maybe have an opportunity to see some kangeroos. For me it would have been better if we had extended the walks. After conferring with the guides at the hostel, they said that was how someone spoke who already had seen kangeroos. Other people would come to Sydney for three days and would want to see a kangeroo, so that was why this part was incorporated into the trip. I suppose they are right.

Our trip continued on to the Wentworth Falls walk. This is a beautiful little round circuit from the car park, which goes down a bit into the valley and gives a wonderful view over the blue mountains valley and the of the Wentworth Falls. It took us about one and a half hours to do the walk.

We stayed at the car park after the trip and then had our lunch their. Sadly I had not told them about me being vegan so all I had for lunch was lettuce, tomatoe and cucumber. They didn’t even serve some italian dressing, salt or any other kind of flavouring! That definitely was not good. I have definitely been served well, especially if I think about our Uluru trip…

The next and last walk consisted of the walk down to the base of the scenic railway, which takes one down a large set of stairs. In the early days, these steps were taken by miners, which would go down them in the morning and come up with the railway after their work ended. This walk was very nice as we walked through many crevices in the side of the mountain, had a beautiful view and also ended up with a view on to the three sisters. Here we stopped and our guide told us the story of how the three sisters came to be in the aboriginal world.

The last walk concluded our trip, and we started the trip back into Sydney. The trip was very nice, yet 100 AUD was not quite adequate for what we had. It was too little walking, but I suppose that is just me, who loves walking in nature…

The evening was concluded with a BBQ which was provided by the hostel.

]]>
http://blog.eitchnet.ch/?feed=rss2&p=147 0
Australia, Day 39 http://blog.eitchnet.ch/?p=145 http://blog.eitchnet.ch/?p=145#comments Tue, 16 Mar 2010 22:29:48 +0000 eitch http://blog.eitchnet.ch/?p=145 Day 39, Sunday, March 14 2010
————————————

This morning was my last couple of hours in Tasmania, which was quite sad since I had such a fabulous time… But oh well, swapped the pictures we made on the hikes and Monika gave me some good music which I had heard on the way to and back from Coles Bay. Most were australian interprest like: The Presets, Lisa Mitchell, The beautiful girls, The Temper Trap, Wolfmother, Xavier Rudd, etc.

As time was running out, I packed my bags into the car, and we then headed out. Monika took me up the wine route for a couple of kilometres where I was able to enjoy a beautiful view over Launceston and of the Vineyards which were on the highway.

As a last stop, we went to the gorge in Launceston, where I saw what I was going to miss, as there was no time left for me to walk around through the gorge and enjoy another nice hike.

So, with a few minutes after two, we arrived at the airport. Sadly this was good-bye. I had immensly enjoyed the time with Monika in Tasmania, and was sorry to leave, but nothing is forever and I might see her soon, when she would be doing her next trip to Europe…

]]>
http://blog.eitchnet.ch/?feed=rss2&p=145 0