Archive for the ‘Tutorials and Guides’ Category
Posted by Derek@TheDailyLinux »
17 Comments »
This is a step by step tutorial on how to get VirtualBox 3.2 up and running on Fedora 13. Specifically, this guide was written using the VirtualBox 3.2.0 (32-bit) version. It can be adapted to upcoming versions and different CPUs (64-bit). The folks at VirtualBox have made it easy to install for Fedora users and I’m going to show you how in a few easy steps. Right, open a terminal window and let’s get to it…
[Read more →]
Posted by Derek@TheDailyLinux »
Add Comment »
I recently got my hands on a Beagle Board to play around with at work, so I figured I would document and create a set of scripts that anybody can use to quickly setup a Beagle Board to boot from an SD card (2GB+). I’m going to assume you know the standard blurb of instructions: copy/download scripts, give them executable rights, and then run with root privileges while taking caution as to not mess up your Linux box. Also, please keep in mind that images and file locations change over time. Let’s begin!
[Read more →]
Posted by Derek@TheDailyLinux »
5 Comments »
Update: May 25, 2010 — I was able to take some time to verify the following steps to installing Fedora 13 Final on MacBook Aluminum 5,1. Enjoy!
This is my guide to getting Fedora 13 Goddard running on a MacBook Aluminium 5,1 (I believe this should work on more recent generations as well because the only difference was the addition of the SD card slot and Firewire port). As with Fedora 12, there were many things that worked out of the box. I have created this guide to help others get Fedora 13 installed on their MacBook Aluminum.
[Read more →]
Posted by Derek@TheDailyLinux »
Add Comment »
Recently, I was asked to make an embedded system running Linux completely read-only. To accomplish this, I utilized the unionfs utility. The standard blurb from the man page will shed some light on it:
Unionfs is not a command, but rather a file system. This manual page describes additional mount options that Unionfs supports.
Unionfs is a stackable unification file system, which can appear to merge the contents of several directories (branches), while keeping their physical content separate. Unionfs is useful for unified source tree management, merged contents of split CD-ROM, merged separate software package directories, data grids, and more. Unionfs allows any mix of read-only and read-write branches, as well as insertion and deletion of branches anywhere in the fan-out. To maintain unix semantics, Unionfs handles elimination of duplicates, partial-error conditions, and more.
In a nutshell, Unionfs allows you to layer directories into a single, mounted directory. Once the module has been compiled and inserted, it’s very easy to use. For example, to mount a read-only filesystem, you’ll want to replace any lines in your linuxrc file (if you don’t know what this is, you’ll want to read the article from logicsupply) that mount your filesystem (at /mnt/root, for example) with something like this:
insmod /unionfs.ko
mkdir /mnt/root.ro /mnt/root.rw
mount -o ro /mnt/root.ro
mount -t tmpfs root.rw root.rw
mount -t unionfs -o dirs=/mnt/root.rw=rw:/mnt/root.ro=ro unionfs /mnt/root
In the above example, we insert the unionfs.ko module located in the / directory. We then create the directories for which we will merge. These directories are where we’ve mounted our root filesystem and the tmpfs filesystem. Next, we mount our root filesystem as readonly to the root.ro mount point and then mount a tmpfs filesystem to root.rw which will become our writable layer. Finally, we merge the two together and voila! A read-only filesystem. The next thing to do is to chroot to /mnt/root and you’re done. Keep in mind that any changes made are being written to the tmpfs layer of unionfs and will not be persistent.
Take a look at these great articles on other example usage:
http://www.logicsupply.com/blog/2009/01/27/how-to-build-a-read-only-linux-system/
http://www.linuxjournal.com/article/7714
The most difficult part is getting your kernel to support it, but even this isn’t too difficult thanks to good patches on the main project website here:
http://www.filesystems.org/project-unionfs.html
We’ll run through an example. Say that your embedded system is using the 2.6.24 kernel and you want to use Unionfs. The first things you’ll need to do is find the 2.6.24 patch on the Unionfs main project website, download it, extract it, and then apply it using a command like the following from within the kernel source directory (the same directory with the Makefile):
patch -p1 < unionfs-2.5.4_for_2.6.24.7.diff
When patched, you’ll then need to use make menuconfig to select the Unionfs module. Save the .config changes when prompted to do so and use the make command to compile the kernel and modules. Install the kernel Image and the module into your embedded system and then try to insmod the driver. It should just work. Then, you can use the commands outlined above.
And that’s that! Be sure to check out the links provided. It would be too difficult to include everything there is to know about Unionfs in a single post. I hope I was able to provide you with at least a start in using it. Good luck and have fun!
Posted by Derek@TheDailyLinux »
Add Comment »

Although this may not be helpful to those running modern Linux distributions, it may be helpful to those who are in an embedded environment where things like Network Manager aren’t available. It may even be useful to know how to configure a wireless connection in the terminal for troubleshooting purposes (or maybe you just prefer to do things quickly in the terminal without messing around with a GUI).
Wireless devices vary greatly, so it’s near impossible to create a guide that’s going to work for all of them, but for the most part, these steps will get you there. The first step is to find the correct wireless driver for you device’s chipset. Drivers that work pretty well with Linux are from ralink and zydas. There are others I’m sure, but it just so happens that the following steps work for both the rt2501usb (rt73) and zd1211b (zd1211rw or zd_b) drivers. Once you’ve located the correct driver, use “insmod” to insert the module and then check out /proc/net/wireless to make sure the device was recognized properly. For example:
[/bash]
root# insmod rt73.ko
root# cat /proc/net/wireless
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 16
rausb0: 0000 100. 220 177 0 0 0 0 0 0
[bash]
Once you’ve gotten this far, you should install the wpa_supplicant and wireless-tools packages so you can take advantage of iwconfig and others. Here are a few useful commands:
iwconfig — use to check status such as associations
iwlist scan — reports wireless networks available
pump OR dhclient OR udhcpc — assign a dynamic IP address
Another thing to note of the below steps are that the rausb drivers are being using to connect to WPA and WPA2 access points. You may want to use wext instead depending on your environment and how the drivers were compiled. With that said, let’s get to it…
1) Bring the rausb0 interface up
* ifconfig rausb0 up
2) Associate with the AP
* iwconfig rausb0 essid the_essid
3) Assign a static IP
* ifconfig rausb0 192.168.1.101
1) Bring the rausb0 interface up
* ifconfig rausb0 up
2) Associate with AP
* iwconfig rausb0 essid the_essid key the_key
3) Assign a static IP
* ifconfig rausb0 192.168.1.101
1) Bring the rausb0 interface up
* ifconfig rausb0 up
2) Generate a configuration file for wpa_supplicant to use
* ./wpa_passphrase the_essid the_password > /etc/wpa_supplicant_custom.conf
3) Use wpa_supplicant to associate with AP and run it in the background (-B)
* ./wpa_supplicant -irausb0 -Dralink -c/etc/wpa_supplicant_custom.conf -B
4) Assign a static IP
* ifconfig rausb0 192.168.1.101
1) Bring the rausb0 interface up
* ifconfig rausb0 up
2) Generate a configuration file for wpa_supplicant to use
* ./wpa_passphrase the_essid the_password > /etc/wpa_supplicant_custom.conf
3) Insert "proto=RSN" into "network" block in /etc/wpa_supplicant_custom.conf
4) Use wpa_supplicant to associate with AP and run it in the background (-B)
* ./wpa_supplicant -irausb0 -Dralink -c/etc/wpa_supplicant_custom.conf -B
5) Assign a static IP
* ifconfig rausb0 192.168.1.101
1) Bring the rausb0 interface up
* ifconfig rausb0 up
2) Setup rausb0 for Adhoc mode
* iwconfig rausb0 mode ad-hoc channel 3 enc off essid the_essid
3) Assign a static IP
* ifconfig 169.254.114.101 netmask 255.255.0.0
4) Add default gateway to route (optional)
* route add default gw 169.254.114.100
Posted by Derek@TheDailyLinux »
Add Comment »

A hard word wrap or line break feature isn’t included in gedit by default, but it’s easily added by using the ‘External Tools’ plugin and a two-liner shell script. This will allow you to format your documents with a line break at column 80, or whatever you’d like it to be, by selecting the text, paragraph, or entire document and applying the shell script. Here’s how…
1. Open gedit
2. Navigate to Edit -> Preferences -> Plugins
3. Enable “External Tools” and press “Configure Plugin”
4. Press “New” and enter “Line Break at Col 80″ (or any name you like)
5. Paste the following script in the “command(s)” text area (you can choose to leave out the #comments, these are only here as a reminder in case you want to modify it to fit your needs):
#!/bin/sh
BREAK=80
# fmt [-WIDTH][OPTION]... [FILE]...
# --uniform-spacing -- one space between words, two after sentences
# --split-only -- split long lines, but do not refill
# --width=WIDTH -- maximum line width (default of 75 columns)
# when FILE is -, read standard input
fmt --uniform-spacing --split-only --width $BREAK -
6. Choose “Current selection” as Input
7. Choose “Replace current selection” as Output
8. At this point, you can choose to create a shortcut key such as “ctrl+m” for easy access.
8. Close “External Tools Manager” by pressing the “Close” button
9. Now this script is executable under the “Tools” menu. Alternatively, you can use your shortcut key for quick access.
The next step would be to somehow get gedit to automatically perform these hard wraps as your typing (like the evolution email client does). If anybody has a suggestion, I’d love to hear about it in the comments below. I’m very surprised that this isn’t included in the already many featured gedit program by default, but thankfully it’s very easily remedied with the method described above.
Posted by Derek@TheDailyLinux »
Add Comment »
This guide will help you understand the very basics of setting up a TFTP server. This was written using Fedora 12 and tested with SELinux disabled. I have not yet confirmed if SELinux needs to be disabled, but I have confirmed that the firewall needs to be configured to allow port 69 (TFTP port). Let’s get to it…
[Read more →]
Posted by Derek@TheDailyLinux »
Add Comment »
Here are the steps that I have taken in the past to fix the “public key is not available:” message while trying to use apt-get:
1.) Use apt-get to install debian-archive-keyring
apt-get install debian-archive-keyring
2.) Try using apt-get again. Additional information will be provided.
3.) Use additional information from last attempt with gpg commands.
Replace the KEYNUMBER with the actual keynumber that you should now have from running apt-get again.
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys KEYNUMBER
gpg --armor --export KEYNUMBER | sudo apt-key add -
4.) Update apt-get to resynchronize the package index files.
apt-get update
5.) You should be good to go!
Keep in mind you may need to run apt-get update a couple of times. Also, make sure your date is set correctly.
Posted by Derek@TheDailyLinux »
1 Comment »
This is a no-frills Linux command line guide/cheat sheet that will help you archive or compress just about any file that you’re bound to come across. If you’d like to have more options, read the man pages! Also, the opposite to this guide about extracting/uncompressing/unarchiving files in Linux can be found here.
[Read more →]
Posted by Derek@TheDailyLinux »
Add Comment »
Table of Contents
This guide will assist in loading a pre-built VirtualBox image. The example used is a pre-built Ubuntu 9.10 “Karmic Koala” guest image. Any VirtualBox image can be used however.
[Read more →]