Thursday, June 05, 2008

EEE PC - eeeXubuntu Install Using Thumbdrive

So, you want to install eeeXubuntu to your eee PC - but you don't have an external CD-ROM. Or perhaps you are in the same boat as me. I have an external HP burner that a friend gifted me a few years back, but the eee PC won't recognize it or boot from it. If you have a thumbdrive that's at least 512MB, then you are in luck. In this blog entry I will show you how to turn your thumbdrive into a bootable installation "disk" which you can then use to install eeeXubuntu to your eee PC.

Step 1 - Go download eeeXubuntu. You can find a complete mirror list on the main support page for the distribution - http://wiki.eeeuser.com/ubuntu:eeexubuntu:home

Step 2 - Backup your thumbdrive. If you intend to keep what's on your thumbdrive now, it would be wise to back it all up, because we will be wiping it clean of all data. If you don't want to back it up, or don't care to lose everything - move to Step 3. To make a backup, hop onto your "everyday Linux PC". If you only have a Windows PC this can still be done, but may be a little trickier. See this page for deatails.

On your Linux PC, open up a terminal. Insert your thumbdrive, and then wait about 8 to ten seconds. Now in your terminal, run 'dmesg'. Your results should look something like this ...



Note that your device name should appear here several times and probably starts with 'sd'. Mine is 'sdc'. Knowing this, we can back it up using dd. dd is really simple. You tell it what to use for input ("if" means "in-file") and output ("of" means "out-file"). Now run 'dd if=/dev/sdc of=/home/yourname/filename.img'. If your thumbdrive is large, this may take a while. We are creating a block-by-block or exact duplicate of the device. It will look a bit like this ...



Now we have a complete backup of your thumbdrive and we are ready to proceed.

Step 3 - Prepare your thumbdrive. Burn your iso, and boot to it from your "everyday" computer. This is a live CD, so it doesn't matter what OS you are running when you use this disc. Additionally, this CD will not install anything unless you tell it to do so! As it boots up, choose the top option to "start or install Xubuntu". Then wait until it comes up to the desktop.

Once you are booted up we have some preparation work to do on your thumbdrive. First, we need to remove all of the partitions it presently has. Plug in your thumbdrive, and wait 8 to 10 seconds. Your thumbdrive will probably pop up in a window, and you will see it's contents displayed. Close this window. Then notice that there is a new icon on your desktop for your thumbdrive. Right click on this icon, and choose "Unmount Volume".

Open up a terminal with Applications > Accessories > Terminal. Now, in the terminal window, do a 'dmesg' as you did earlier. Note your device name of your thumbdrive which usually starts with 'sd'. It will look something like this ...



Now in your terminal, do 'sudo fdisk /dev/sdb' where sdb is your thumbdrives device name. At the prompt, type 'p' to have it print a list of your partitions. In my case, I had only one. Some thumbdrives will ship with four or more which contain all sorts of encryption software or special utilities. If you have multiple partitions, you will have to specify which one to delete. Type a 'd' and if prompted, enter the number of the last partition from the list. If you have more than one, repeat option 'd' for each partition until they are gone. Then do a 'p' again to make sure it's empty.



Now do a 'n' for a new partition. Then 'p' for primary type. Then a '1' for the first partition. For the starting and ending cylinders, just hit enter to take the defaults. Lastly, do option 'p' again to see what it looks like. Notice that you now have a partition number after your device name. In my case it's /dev/sdb1. Make a note of this 'partition name', you will need it shortly. Before leaving fdisk you must make two more important changes. First change the partition type. Do option 't' to change the type, and when asked for the "Hex code" enter the letter 'e'. This will give you the old-school "Windows 95 FAT16 Partition" that the installer wants. Lastly, enter option 'a', and when asked for a partition number enter '1'. This will make your thumbdrive bootable!!

Now is a good time to enter 'p' one more time and make sure it looks something like this ...



You are done, so use option 'w' to write out your changes. It will do some 'syncing' and quit the utility for you. But you are *NOT DONE*.

Step 4 - FORMAT your new partition. The second time I ran through this, Xubuntu got confused and remounted my filesystem after I quit fdisk. You may want to check your Desktop for what looks like a mounted thumbdrive. If you have one, right click on it and choose to "Unmount Volume". Then wait about 10 seconds. The icon will probably remain, but don't worry about it. Now, in terminal run 'sudo mkfs -t msdos /dev/sdb1' where '/dev/sdb1' is your new partition which you created in fdisk. Do not fudge the device name or you may end up wiping out the contents of your "everyday system". This process runs remarkably fast - and is completely irreversible. It should look like this ...



Step 5 - Use the Xubuntu thumbdrive installation creator utility. It will work like a champ now that your thumbdrive has been *properly prepared*. To run this utility, in terminal do 'sudo /cdrom/mkusbinstall.sh --autodetect'. It will tell you to remove your flash drive and hit enter. Do that. Then it will tell you to reinsert it. So put it back! It should detect your thumbdrive and show you the device and partition name. If it's the same from before - we are ready to go. It will ask if you want to continue. Say 'y'. What happens next is a lot of copying to your thumbdrive. The CD will spin like wild, and your thumbdrive light (if you have one) will flicker for a while. Go get some coffee and wait. You may get an error or two in this process, such as "cannot stat `/cdrom/md5sum.txt'". If you get more like 5 to 10, then something is wrong. If you get some message about resizing partitions on your thumbdrive - you definitely did something wrong and you should repeat the process of removing and re-adding your partition.

Otherwise the process should finish nicely like this one did ...



Now you can remove your thumbdrive, and reboot your everyday PC. Make sure you remove the installer disc now. Keep it around, you never know when you might want to use it again.

Step 6 - Install eeeXubuntu. Insert the thumbdrive in your eee PC, hold down the ESC key, and boot it up. Then use the USB:USB Flash Disk as your boot device. The rest is smooth sailing. If you need help with general installation - refer to the main installation page here.

Step 7 - Restore your thumbdrive. Now that you have installed eeeXubuntu you may want to restore what was on your thumbdrive. Boot up your "everyday Linux" box that you used to make the backup earlier, and open a terminal window. We are going to simply reverse the 'dd' command we ran in Step 2 so that the "if" is your thumbdrive image, and your "of" is your thumbdrive device. Go ahead and plug in your thumbdrive now. It will probably get auto-mounted and pop up in a window. Close that window. Then go to your desktop and find the icon for it. It will probably be called something generic like "1.0 Gig Media". Right click it, and choose "Unmount Volume".

Now open a terminal and do a 'dmesg'. Make sure the device name of your thumbdrive has not changed. It should be the same as it was before. Next do 'sudo dd if=/home/yourname/thumbdrive.img of=/dev/sdc'. Your thumbdrive will be busy for a while, churning away while everything is restored. Go get more coffee.

When it's done, you should be able to unplug your thumbdrive - wait a few seconds - and then plug it back in. It will get auto-mounted and everything will be restored, looking as it did before you made it into an eeeXubuntu installer.

I sincerely hopes this helps a few folks out there. I ran into many obstacles in getting my eee PC up and going with eeeXubuntu, but it was well worth the efforts. If you find any errors, have suggestions, or you found this useful - please drop me a comment.

EEE PC - Meet iPod Nano

It was only a matter of time before I introduced my eee PC to my iPod Nano. If I plan on listening to music with my eee PC, it only makes sense to play it from my iPod (rather than eat up limited space with duplicate files). I have tried a lot of software for linux which plays music, but none works better with the iPod than Rhythmbox.

To install Rhythmbox, open a terminal and do a 'sudo apt-get install rhythmbox'. There are a bunch of dependencies - go ahead and let it install those. One thing I found, is that I was unable to play *any* of my music. That's because Rhythmbox does not incude the gstreamer libraries needed to play them. To add the missing libraries, go to your terminal and do a 'sudo apt-get install gstreamer0.10-plugins-ugly'. Note that there is also a gstreamer0.10-plugins-good and a gstreamer0.10-plugins-bad set of plugins which may be required to play other obscure non-mp3 formats.

So now I can plug in my iPod, open up Rhythmbox, and start rocking out. I noticed my album art is missing, but I don't know that it bothers be enough to fix it. Maybe I will work on that later.

Wednesday, June 04, 2008

EEE PC - Screen Real Estate

The screen on the eee PC is pretty damned impressive. The tiny screen on my old 3-Com Audrey was just about the same physical size as my 4G Surf, but it packed in about half the pixels. These days you get an easy 800 pixels across in such tight space that my old eyes simply can't count the dots.

Of course, you are still taxed with a 'short' display. It's not a problem in Terminal or in your web browser, because you can scroll. But sometimes you get a window that's too big and you can't get to the close or okay buttons. The fix for that by the way, is to hold Alt while clicking and dragging the window around.

Looking for more space in Firefox? - Open up Firefox. Right-click the toolbar somewhere such as over-top the Stop button. If you don't use the Bookmarks bar (I never do) you should uncheck that. Also notice how big the buttons are in Firefox? You can downsize them. Right-click the toolbar again and choose 'Customize'. In the window that pops up, look to the bottom for an option to 'Use Small icons' and check that box. You have just increased your browsing real estate. You may even decide to part with your status bar (but I like mine too much). To remove it, click View and uncheck Status Bar.

Want more space in your taskbar? - Taskbars are always over-crowded but the eee PC has a little less horizontal space than you may be used to. How about getting rid of the word 'Applications' on the Application button? An eeeuser.com forum poster, Red Penguin found this remarkably easy method. Simply right-click the Applications button, and click Properties. Now just uncheck the option 'Show title in button'.

Another space eater is the Desktop Switcher. It looks like four big boxes in the right hand corner. This is handy if you spread your windows across separate spaces (one desktop for work, and one for games?). I have never really made good use of this feature and you don't need the switcher panel to switch desktops anyway (you can press Ctrl+Alt+Arrow Key and get the same effect. To get rid of the desktop switcher panel (it's actually called the "Pager") right-cick it and Remove it.

I am still collecting space saving tips myself - so I my add to this topic in the future. In the meantime here is what my tight-on-space desktop looks like.

EEE PC Network Manager Replacement; wicd

It was a really busy day at the office. But thankfully a third of my work today was waiting for software installations to finish. In this minimal off-time I was able to try out an alternative Network Manager for eeeXubuntu called 'wicd'.

The default network manager is "not bad", and it looks a little something like this ...



I have a few complaints.

1) It seems to lie about the signal strength, and sometimes it really drags when connecting me to a network or obtaining the IP address.
2) It doesn't give you a lot of options or additional information about the networks it finds. It's almost too simple.
3) It's connected to the Keyring application. That means it saves all of your WEP/WPA passwords safely - but every time you log in you are prompted for your master password. I made mine really long too. Woops.

With that, I went off in search of an alernative network manager. I found one mentioned in the eeeuser.com forums called 'wicd' which seemed to be well liked. The installation instructions were not very clear - so allow me to elaborate.

1) Open terminal and do a ' sudo mousepad /etc/apt/sources.list'. Then scroll to the very bottom and add these lines (the first is for your reference only) ...
# WICD.longren.org
deb http://wicd.longren.org gutsy all

2) In terminal, do a 'sudo apt-get update'. This may take a few moments.
3) Next, do a 'sudo apt-get install wicd'. Note that you cannot have *two* network managers, so you are going to lose network-manager and network-manager-gnome in the process. If you have stored away WEP/WPA passwords ... they will be saved in case you want to go back to the old manager. They will not however, be 'ported' to the new application.
4) When you say 'Y' to continue - the NetworkManager will *crash* and generate error messages. Because it is being removed. Don't panic. It's no big deal.
5) You may need to reboot. But try clicking Applications > Network > Wicd and launch the interface. If it's blank - reboot. Otherwise it will look a little like this ...



One thing was obviously missing, and that is the 'tray icon' down in the bottom right corner. Surely it has one, right? Of course it does, but you will need to add that to your 'Autostarted Applications' list.

6) Click Applications > Settings > Autostarted Applications. Then the 'Add' button. The name and decription can be whatever you like, but the Command box must read '/opt/wicd/tray.py'. Refer to this screenshot ...



7) Log out, and log back in. Now you should have a tray icon, and you can go to work.

I was not all that impressed with wicd, and at the end of the day - I went back to my default network manager. Here are my dislikes for wicd.

1) It's slower than the default manager, and it takes forever to scan the network and show you the results.
2) When it strikes an error or a problem joining a network - you are put on endless hold. There is a cancel button which *does* cancel the connection - and that is a plus.
3) It does not consolidate wireless networks. This was a dealbreaker for me. If I have 6 access points in range, all with the same 'SSID', it shows all 6 of them to me. I don't want to see all those, and it takes time to query and report on all of them!
4) This also lies about signal strength which tells me the driver is the root of that problem.

If you want to go back to the default manager:
1) Open a terminal and do a 'sudo apt-get install network-manager network-manager-gnome'. It will automatically remove 'wicd' for you, as you can't have both.
2) Remember to go into Autostart Applications and remove the wicd tray applet.
3) Perhaps reboot, although it may not be necessary as your old tray icon is probably back and functional again.

A note of caution - if you return to wicd a second time you may have issues. I found myself removing wicd, deleting the entire /opt/wicd directory, and reinstalling it again just to create some screenshots for this blog entry.

Tuesday, June 03, 2008

EEE PC Day 2 - Wardriving Attempts

After some late night last minute attempts to make Kismet work last night, I was actually graced with some a bit of minor success. Kismet loaded, and displayed some accurate capture information.



Now if only I could get my "production network tool" to play nicely. It seems to only want to connect to my home network, and disregards everything else it sees. When I search for other networks it finds them by name - but shows a very weak signal for them and won't seem to commit when I tell it to connect. It's a tad annoying, because I can pull out Audrey II (the Mac) and jump onto any one of these networks without a problem.



I am assuming the problem is:
1) The way the driver was written.
2) The utility demands a certain level before it will connect.
3) Power limitations to the card keep it running weaker, but longer on battery.
4) The card just simply is not that good.

It could be a number of those factors run together. I spent some time tonight searching for an option in the driver or with a wireless tool like iwpriv which would allow me to step up the power consumption to get a better wireless reach. I came up empty there. I guess my next step is to see if I can't find a replacement for this native wireless network manager. I hope to have these training wheels off soon. I am anxious to get back to wardriving.

Monday, June 02, 2008

The EEE PC Day 1

I was walktzing down the hall today at the hospital past the supply man with a cart of stuff, and he had something for me. My EEE PC had arrived a full four days ahead of schedule. As busy as this day was I still managed to find some time to play with my new toy.

Out of the box, I was pretty impressed with this little device. I have the 4G Surf model which has the smallest screen and keyboard of the bunch, but with 4GB of SSD flash versus 2GB. The default Operating System was "not bad", but it had all the makingd of kids computer. If Webkinz made an OS it would probably look a little like that. There were great big buttons spread amongst four tabs or so for launching applications. These ranged from Instant Messaging and multimedia stuff to limited "work" applications like Abiword. If this was the OS you were stuck with, these little machines would have never taken off.

Within 10 minutes or so I had decided that I was ready for a real operating system. With that, I got a copy of eeeXubuntu and ran through an installation. It was a bit cumbersome because I was unable to boot to my external CD-ROM drive as I had hoped. Instead, I had to use a thumbdrive to install from. This involved getting everything off my thumbdrive and creating a backup with 'dd'. Then I booted up to the eeeXubuntu live disc using a PC on my desk. Next I repartitioned and formatted my thumbdrive as a FAT16 drive - and ran a script from the CD-ROM to create a bootable and installable thumbdrive. From there - the install to my EEE PC was cake.

While the installation took the better part of an hour, once it was complete I was quite impressed with the speed. Booting seemed to take less than 30 seconds or so, and running applications was pretty pleasing. I've never spent much time using the default window manager 'xfce' but I will probably hold onto it a while. It's very thin, and there's not much eye candy. But the speed that you get is amazing.

With a good functional OS I tempted fate and installed all available updates. I did not do the 'dist-upgrade' as I have heard that certain things will be broken if you move up to the hardy release (current eeeXubunt runs gutsy 7.10). My updates finished at 5:00PM and I was out the door.

Since then, it's been a battle getting kismet installed. I am anxious to get back to wardriving but a wifi scanning app is essential. There are all sorts of issues with Kismet, madwifi, and the eee PC in general. From what I have read, people have got it working by mising new and old libraries and deb packages. I'm not sure I like that idea, so I have stuck to attempts. I got the latest Kismet source and built it pretty easily. It runs, detects my card, and gives no complaints ... but then it doesn't display anything. Of course, it also cripples the wireless driver which is rather typical for putting a device into monitor mode. Doing some more reading I found someone had posted a command to put things back in order and save a reboot ... 'wlanconfig ath0 create wlandev wifi0 wlanmode sta'.

And now, as I get ready for bed I thought "why not break this thing in and Blog a bit". The keyboard is definitely awkward being so small ... but the first keyboard I ever used was a lot like this (TRS-80 Color Computer). I think the 3-Com Audrey keyboard was also about this size. I'm probably chucking out typos a-plenty - but fuck spell checking. There also seems to be some running joke about finding punctuation marks on this thing, but since it's marked so well - it shouldn't take you any more than 10 minutes to become acustomed to the layout.

I look forward to the adventures I will have with this little toy.

*EDIT* It's tough to go to bed with a job unfinsihed. After reading a few entries to the Kismet mailing list, I found that my madwifi driver needed an option to be passed to it at the time it is loaded for Kismet to run properly. I will spare you the bloody details. If you are interested however, you can read this post from the eeeuser.com forums.

Tomorrow - we wardrive.

Sunday, June 01, 2008

Blog Upkeeping

I was digging through a drawer a few days ago and I came across a "web server backup" that I had made in late 2005. At that time, I was still administering a web server from work which I used to host Gloop.net. The domain name, and the server, have both long since been dead and forgotten. With them went a lot of pictures that I had put in my blog over the years. I have always been a little sad that my older blog posts are now photo-less and plagued with dead link boxes.

Vowing to fix the image problem, I slowly began to work my way through old blog posts identifying the images that are now dead, and fixing them by uploading them to Blogger (which actually uses Picassa to store them). Hopefully Blogger.com will outlive me, and I never have to worry about repairing dead links again.

I was only halfway through the year 2003 when I realised that my Blog has some other problems. Namely that my commenting feature has always been hosted by Haloscan.com. At the time I started my blog, the Blogger service did not have a commenting feature. This of course predates when Google bought them ... and it was before Wordpress ever came into existence. In it's hayday, Haloscan served me well. These days, their servers are slow as hell and add what seems like a 45 second delay to my page loadings.

I have spent a good two to three hours copying those Halsoscan comments and pasting them into my Blogger entries. So if you are rolling back in time and reading old Blog entries they will appear in the post as "Historic Comments". Future comments will now be hosted by Blogger! I could have just switched to Blogger comments, and dumped the old ones. But I love reading those old comments from my friends. :-)

I also dropped a new theme overtop of the old one, which I have probably had for at least 3 years .... maybe longer. It's not what I want - but I will work on that later. Now, I need to cook dinner. I'm making Strombolli!