UNetbootin – Create bootable Live USB sticks

no comments

UNetbootin is one of those small, not well known, yet extremely useful tools which can save you a lot of time. In a few clicks, it let’s you create a boot image from a long list of distros, and format that right out to a USB stick. With many of the distros, you can choose between Live or Net Install images, and from versions a few years back in time. If you’ve already downloaded the ISO image for you distro, that’s OK, but it will even do that job for you if you like.

The list of supported distros is impressive, from the most popular ones, to more obscure (here in random order): Ubuntu, Debian, Linux Mint, openSUSE, Arch Linux, Damn Small Linux, SliTaz, Puppy Linux, gNewSense, FreeBSD, NetBSD, Fedora, PCLinuxOS, Sabayon Linux, Gentoo, MEPIS, Zenwalk, Slax, Dreamlinux, Elive, CentOS, Mandriva, LinuxConsole, Frugalware Linux, xPUD, Foresight Linux, VectorLinux, Slackware, Smart Boot Manager (SBM), xPUD.

To get going in Fedora:

yum install unetbootin syslinux-extlinux

If you don’t run as root, you will be prompted for the root password:

unetbootin

Linux Laptops

no comments

If you’re in the market for a laptop guaranteed to support Linux, the following companies are good places to start. System76 is on top, since that was my choice for my latest purchase. It’s a bit early to give a review yet, but things are looking very good.

Oh, only one word of advice: Make sure you go for the Intel option on the Wifi card. The default Realtek card is apparently poor hardware and drivers.

www.system76.com

www.emperorlinux.com

zareason.com

Then there are some list and general reviews:
www.linlap.com
www.linux-on-laptops.com
www.ubuntu.com/certification

Openmoko GTA04 – Free Mobile

no comments

A new version of the free mobile platform Openmoko is out. GTA04 manufactured by the German company Golden Delicious Computers.

The Openmoko wiki has some details, and the new project page has technical specs:

  • 800 MHz TI OMAP3 (ARM Cortex A8)
  • 3D Graphics Accelerator and DSP
  • 512 MB RAM, 512 MB Flash, Micro-SD up to 32 GB
  • HSPA UMTS with up to 400h standby time
  • GPS, Navigation Sensors, WLAN, Bluetooth, OTG2.0

At 750,- Euros it’s a rather expensive device, though. Paying for free hardware is fine, but this is a bit on the steep side. Hopefully, it will come down a bit.

Three Months Into the Thai Floods

no comments

TechSpot is running an article on the prices of harddisks from Newegg three months after the Thai Floods. As expected, prices remain high, with certain manufacturers and disk models hit at different degrees.

Gartner says the worst is yet to come: The hard drive shortage had a limited impact on fourth quarter PC shipments and prices — we checked a few random PCs on Newegg and didn’t see any noticeable effects. However, Gartner warns that the major impact will be felt in the first half of this year and potentially continue through the year.

Also interesting, was this comment on Slashdot. It explains the logistics of the disks and delivery contracts with big system integrators (Dell, Lenovo, etc.). Pointing out that the big buyers were buffered from the initial price spike due to fixed price long term delivery contracts, while the spot market (e.g. Newegg) saw the initial shortage. Now that the bulk buyers get new contracts, they will also see increased prices, but there will be capacity planned in for the spot market as well.

Git server on Fedora

no comments

This covers setting up a SSH access controlled Git server from scratch. It’s assuming there is no other repository to import from. It is loosely based on the instructions from Chapter 4 of the Pro Git book.

Installing Git is simple. You might also want to grab gitk for visualizing your commits and branches, and kdiff3 for merging changes.

yum install git gitk kdiff3

Initial setup might include configuring your name, and editor. “—-global” means that the configuration will be stored under ~/.gitconfig.

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

git config --global core.editor emacs

git config --global merge.tool kdiff3

Create an empty repository, and clone it into a “bare” repository. Actually, I’m not sure if the first step is strictly necessary, since the “clone” is “init” + “fetch”.

You might also want to create a root level directory, or alternatively a symbolic link from root, e.g. /git. This will make it easy to reference when cloning and working from remote computers.

mkdir /tmp/git_empty
git init /tmp/git_empty

mkdir /git
cd /git
git clone --bare /tmp/git_empty test.git

Now you can clone (the still empty) repository by the following. Notice the optional port number, if you have SSH running on a different port than the default 22. Notice also, since the port argument is specified, ssh protocol has to be prefixed explicitly.

git clone ssh://johndoe@example.com:2222/git/test.git

Finally, after adding, changing and committing to the new local clone, these changes can be “pushed” back to the server. Conversely, the updates on the server can be “pulled”.

git push origin master

git pull

Geeky watches

no comments

Douglas Adams had something against digital watches, always criticizing the ape descendants for thinking they were neat. Well, I have to admit I rather like them. As a 8-year old, I spent the better part of a year saving up for my first Casio. However, at some point in the 90s, they seem to have goon out of fashion. Which is a shame, because there are some really nice geeky looking watches around now.

Take these from Sparkfun, for example: The “Solder : Time Watch Kit” to the left is, as the name suggests, a solder kit you put together yourself, to create a fun looking digital watch. Complete with resistors and ICs on display, which is a PIC microcontroller. To the left is the Arudino (ATMega328) based Sparkfun version; “BigTime Watch Kit“. Again you have to solder yourselves, but it is intended as a beginner’s kit, so everything are nice big through-hole components, which there are only a few of.

However, if DIY watches isn’t your cup of tea, you can always go for ThinkGeek’s selection. Here there is a lot of good looking geekery to choose from, including a DIP-switch controlled watch, a binary watch, or if you want to go simple maybe a sundial ring (possibly for the next steam punk gathering).

Internet blackout

no comments

Today many sites across the Internet mark their opposition against the proposed US legislation Stop Online Piracy Act (SOPA) and the Protect-IP Act (PIPA). Jason Hooper has made a collection of screenshots of the black front pages.

Hopefully, this will never become a reality. However, for some sites it already is. In Holland, Pirate Bay is already on the blocking list, as is the case in Belgium. And a number of domains were already seized by the Department of Homeland Security last year.

The days of the free and uncontrolled Internet is long gone, and in some countries, it never even existed. The next questions are how much freedom there will be left on the WWW as we know it today, and how much will have to be taken under ground, using darknets or similar systems.

Android: Unpacking boot.img

no comments

After successfully building the Android OS, and flashing to the Galaxy Nexus, I’ve started investigating how it all hangs together. Starting with the boot.img, and unpacking the parts; header, kernel, and ramdisk. The structure is explained in detail on the Wiki android-dls.com, but also in the source for building the boot.img file.

As mentioned on the Wiki, and seen in the source, the page size can be 2048 or 4096 bytes, with the former the default. The header, which is rather boring, containing only a “magic string” (”ANDROID!”) and a checksum takes up the first page of 2048 bytes. It can be separated from a boot.img with the following command:

dd bs=2048 if=boot.img of=header count=1

Next up is the kernel. I’ve yet to find a way to determine its size, however you could go looking for white space padding and then round up to the nearest 2048 bytes. (Also, magic bytes (1F 8B) of the gzipped ramdisk will provide a clue.) In my case, I “cheated” and looked at the size of the kernel file under out/target/product/maguro. It turned out to take 1912 pages, so we can separate it by the following command (skipping the header part):

dd bs=2048 if=boot.img of=kernel skip=1 count=1912

Then it’s only the ramdisk filesystem left (there’s no “second stage” section in use). It will take the rest of the size of the file, which came down to 158 pages in my case:

dd bs=2048 if=boot.img of=ramdisk skip=1913 count=158

The ramdisk is a gziped, cpio packed archive, which can be extracted into its own directory by
mkdir ram
cd ram
gunzip -c ../ramdisk | cpio -i

That should give you the following files and directories

./init.rc
./ueventd.tuna.rc
./init.omap4pandaboard.rc
./res
./res/images
./res/images/charger
./res/images/charger/battery_4.png
./res/images/charger/battery_5.png
./res/images/charger/battery_1.png
./res/images/charger/battery_charge.png
./res/images/charger/battery_2.png
./res/images/charger/battery_fail.png
./res/images/charger/battery_0.png
./res/images/charger/battery_3.png
./init.tuna.usb.rc
./ueventd.goldfish.rc
./dev
./init.tuna.rc
./init.goldfish.rc
./init
./system
./data
./sys
./ueventd.rc
./sbin
./sbin/adbd
./sbin/ueventd
./proc
./charger
./default.prop

For more about the Android boot process, and kernel, look at the Embedded Linux Wiki.

As seen from the files above, the charger icons displayed when the phone is charging while off is plain PNG images. Might be fun to change. Furthermore, the initial splash screen logo can be changed by adding a file called initlogo.rle to the root directory of the ramdisk. Might try that next.

Building Android on Fedora

1 comment

Here’s a brief command-by-command guide to building Android 4 (ICS -Ice Cream Sandwich (with extra sugar on top)) from scratch, and deploying the new images on the Samsung Galaxy Nexus, all from Fedora 16. This is heavily based on the Free your Android article, and of course the instructions at android.com.

First, install the supporting packages. (Instead of the OpenJDK version, you might have to download the Oracle one, if you get version conflict errors at the make step below.)

yum groupinstall "Development Tools"
yum install java-1.6.0-openjdk kernel-devel git gnupg flex bison gperf zip curl zlib-devel glibc-devel glibc-devel.i686 ncurses-devel.i686 glib-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686 mesa-libGL-devel.i686 readline-devel.i686 arm-gp2x-linux-gcc-c++ python-markdown xmlto libxslt

Download the source. The final sync command will take about an hour.

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

mkdir android
cd android

repo init -u https://android.googlesource.com/platform/manifest
repo sync

Download proprietary binaries and drivers. They are available here:

http://code.google.com/android/nexus/drivers.html

Assuming the Galaxy Nexus – GSM/HSPA+ (”maguro”), there’s two drivers. (Please check the link above for new versions).

wget https://dl.google.com/dl/android/aosp/imgtec-maguro-iml74k-a796ffae.tgz
wget https://dl.google.com/dl/android/aosp/samsung-maguro-iml74k-de1cc439.tgz
tar zvxf imgtec-maguro-iml74k-a796ffae.tgz
tar zvxf samsung-maguro-iml74k-de1cc439.tgz
extract-imgtec-maguro.sh
extract-samsung-maguro.sh

Build, still assuming the same phone as above. On my somewhat dated dual core 2.6 GHz CPU, it took almost four hours to compile.

source build/envsetup.sh
lunch full_maguro-eng
make -j4

Then, transfer the image files to the phone. Make sure the phone is connected over USB, is unlocked, and has USB debugging enabled. After the images are transferred, and the userdata and cache partitions are erased, the phone will reboot. It will show the Android logo, reboot one ore two times more, and then wait maybe a minute or two before the UI is available. And there it is, your home-built Android OS.

out/host/linux-x86/bin/adb reboot bootloader
sudo out/host/linux-x86/bin/fastboot -w -p maguro flashall

If something, or everything, failed and you are left with a useless phone, here are the factory images from Google. Download and unpack the archive corresponding to your phone, and run the script

flash-all.sh

For more details on “unbricking” your phone, see Derek Ross’ comment.

Skype on Fedora 16, 64 bits

4 comments

Skype on Linux was always a bit of a drag to install, and for some reason a 64 bits version is not available for Fedora. It is unlikely to change now that Microsoft bought the whole shop. Luckily, the old 32 bits version still works, with a few tricks.

After downloading the RPM, install with

yum install skype-2.2.0.35-fedora.i586.rpm

Get the 32 bits versions of these libraries:

yum install libv4l.i686 pulseaudio-libs.i686 alsa-plugins-pulseaudio.i686

And finally, make sure you have these binaries:

yum install ld-linux.so.2 libasound.so.2 libXv.so.1 libXss.so.1 libQtDBus.so.4 libQtGui.so.4

Thanks to drjolo and tuxor for these fixes.

Jarre and experimental instruments

no comments

Enjoying a concert by Jean Michel Jarre recently, I got musing over his many innovative and experimental ways of controlling the music. Including signature instruments like the laser harp, theremin, but also more conventional boxes, like the Minimoog and various Moog synthesisers, the ARP 2600, the Moog Liberation keytar synthesizer, Korg Mini Pops, and Roland HPD-15 Handsonic Percussion Controller, an iPad, and much more.

For even more experimental instruments, see the Elixir and Home Made Labor acts. They make they own instruments, sample it, tweak it, and create ambient sound-scapes. At a live performance a few years ago, they would mould and shape the sound as they went along, slowly adding complexity ad-hoc.  Here’s a video where they go into a bit of detail.

Finally, while digging up some of this, I came across to other Zurich based projects: domizil, and ICST. I don’t know much about either, but domizil has a few CDs out. Might be worth looking into.

Cool Linux games on Fedora

1 comment

Linux might not be famous for its games, however there are still plenty around. You will not find the latest Call of Duty, though. Rather, there is a long list of classics and small and fun games. From the Scumm based offerings from Revolution, to remakes of classics like Freeciv, LinCity, and Ultimates Stunts.

Fedora offers a dedicated “spin” installation for games, which offers more than hundred small and big games. Below is a random pick of a few favourites, along with their RPM package names.

As far as I understand, many of them are OpenGL based, or require a properly configured graphics card to run.

  • Beneath a Steel Sky – beneath-a-steel-sky-cd
  • Lure of the Temptress – lure
  • Flight of the Amazon Queen – flight-of-the-amazon-queen-cd
  • Freeciv – freeciv
  • Glaxium – glaxium
  • Mania Drive – maniadrive
  • Ultimates Stunts – ultimatestunts
  • Tremulous – tremulous
  • Abuse – abuse
  • LinCity – lincity-ng

And to install them all!

yum install beneath-a-steel-sky-cd lure flight-of-the-amazon-queen-cd freeciv glaxium maniadrive ultimatestunts tremulous abuse lincity-ng

Fedora 16 Released

no comments

Fedora 16 was released today. There are a number of changes, including “GRUB 2 replaces legacy GRUB, HAL is gone and replaced by udisks, upower, and libudev, migration from SysV init to native Systemd continues”. Furthermore, Java 7 is finally being previewed, while Java 6 is still the default.

Download your copy now, a special “spin“, or share over Bittorrent.

RF Communication on 433.92 MHz

no comments

I recently got a Sparkfun order on my door, so it’s time to play. In the box was a RF Link Transmitter, and Receiver. They are sold as 434 MHz radio wireless links. Others talk about 433 MHz. To be precise, it’s 433.92 MHz. That matters, because if you search for that number, you will find the so called home automation systems using that frequency, including X10, Everflourish, and many others. My plan then, is to build something similar to the TellStick from TellDus, which control these devices from my computer. Connect that up to an Android app, and I could control my lights and other appliances from any mobile phone.

First things first, though. Hooking up the bits was easy, following these two similar tutorials. Using the VirtualWire Arduino library v1.5 (1.6 released at the time of writing) by Mike McCauley (download version 1.5) transmitting data was a breeze. The library includes example code for transmitter and receiver, simply upload and go. Note that the transmitter data should be connected to pin 12 on the Arudino, and the receiver on pin 11 on the other. Data was received loud and clear, without errors. Mike’s library is well written, and covers several important aspects of RF communication, including a dedicated protocol, CRC handling, robust encoding over the air, baud rate, and to top it off, an easy to use API.

Now, of course when using my Everflourish nothing happened. Which was a good sign; it did not interfere with the Virtual Wire transmission. That remote is using a different protocol to talk to the light switches. Luckily, it has already been reversed engineered and the source code is available from TellDus. It will probably take some time to get this working. Meanwhile, some pictures.

Arduino, Fedora 15, and the gpsd incompatibility

no comments

Even though the Arduino is very popular amongst makers and other electronics hobbyist, it is still a fringe platform in most settings. And even though the arduino package is available through many repositories, more testing would be welcome.

In the latest packages in Fedora 15, things have broken down in several ways. Tom Trebisky does a good job of guiding you through the pitfalls here. He has further useful notes on Arduino here.

What had me going mad was this message: “avrdude: stk500_recv(): programmer is not responding”. Everything seemed to be fine, the lights were blinking when connecting, the logs looked normal, and what’s more, all my boards worked when programmed on another system, but not on my Fedora 15 at home! Furthermore, the error seemed to be half sporadic. Sometimes it would fail at once, while other times it got a bit further before it stopped.

Tom writes: “On a hunch (having watched the messages via dmesg when I plug in my arduino) I get rid of gpsd“. And that was my problem as well. The gpsd daemon was some how conflicting with the ttyUSB device. One option to remove it would be

service gpsd stop
killall gpsd
yum erase gpsd

However, in my case I could not remove the gpsd package because it was a dependency of another application I wanted. In the end, I simply renamed the binary (/usr/sbin/gpsd), so it would not be automatically activated when I plug in the Arduino. Maybe not so elegant, but I could finally get to work with more fun stuff.

Bad Behavior has blocked 114 access attempts in the last 7 days.