Saturday, November 26, 2011

Arch Linux on Eee PC 900 Chronicle

Work in progress!!!


I have been pretty intrigued with Arch Linux for sometime. I have read numerous times in Distrowatch forum that this distribution can easily replace Ubuntu and that Ubuntu actually makes the name of Linux bad. It is touted by most that it is one of those real Linux, in the same ranks as Debian or Gentoo.

My recent experience with Ubuntu 11.10 and Linux Mint 12 on VirtualBox were not good to put it mildly. Now I am in quest for the best Linux distro that can be installed on VirtualBox. By the way, Ubuntu 11.10 works like charm on VMware ESXi 5.0. Should I just dump VirtualBox? Maybe not just yet. With VirtualBox, I can run it on Windows and Linux and still be productive. With VMware ESXi, I need to dedicate a machine for that. I do have 5 boxes running VMware ESXi for software testing but I do need access to Windows on my work laptop.

I can also move to VMware Workstation but I have higher hopes for VirtualBox as it is developed at a much faster pace. Plus, I can also help with the project as it is opensource.


The Eee PC 900 Hardware
Processor: (to come)

Arch Linux installation on Eee PC 900
With that said, I will deep dive and use Arch Linux on my aging Eee PC 900.

Follow Arch Linux Beginner’s Guide to get the latest installation media. As of this  writing, archlinux-2011.08.19-netinstall-i686.iso is available for download. You probably notice that I am going to do network install. 

Anyway, with ISO downloaded, start to check all the stroage media in the system, like:
$: sudo fdisk -l | grep "Disk /dev"
Ah, I am using Ubuntu :(. The venerable sudo. Anyway, output should look like this:
Disk /dev/sda: 60.0 GB, 60011642880 bytes
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
Disk /dev/sdc: 203.9 GB, 203928109056 bytes


Plugin USB thumb drive that will be used for the installation. Run sudo fdisk -l | grep "Disk /dev" again to determine the location of the USB thumb drive. Now, burn the ISO, like:
$: umount /dev/sdd1
$: sudo dd if=archlinux-2011.08.19-netinstall-i686.iso of=/dev/sdd bs=4M
Assuming that the USB was partitioned and auto-mounter is working its magic, need to umount before writing the ISO to the thumb drive. Should now be ready to plug this in to my Eee PC 900.

While Eee PC 900 is booting up, hit on ESC so that it displays the boot options. Select USB: USB Disk. Arch Linux should now show you options what to do next. Select Boot Arch Linux and hit on Enter. You should be dropped to tty session with a root user.

Begin installation by running:
#: /arch/setup
Follow the instructions as they are presented. In "Select source", ensure that core is selected and optionally select a mirror that is closest to you. For the editor, select either vi or nano. I am a bit comfortable with vi so I have it selected.

For clock, thus say for region and timezone, I selected North_Dakota/Center as this is my current location. If not very familiar with how time is handled in Linux, select UTC and opt to use an ntp.

Now for preparing the hardrives. Setup /dev/sda as boot drive, set fs type to Linux (83). For /dev/sdb, create one partition (/dev/sdb1) and set fs type to 83 as well. Then set /dev/sda1 as /boot (ext2) and /dev/sdb1 as / (root mount point) formatted as ext2. You should be curious by now why ext2 is used here. From Arch Linux Eee PC 701 it is generally not recommended use journaling file system on SSDs. Though ext4 can be configured to disable journaling, I will be using ext2 here for now and see how it performs.

For packages, select base and wireless_tools.

Now wait for the installation to complete, be patient here as it can take time depending on connection speed.

In configuration, change /etc/fstab, add noatime for both /dev/sda1 and /dev/sdb1. It should look like below:
/dev/sda1 /boot ext2 defaults,noatime 0 1
/dev/sdb1 / ext2 defaults,noatime 0 1
Set the root password for obvious security reasons.

Install boot loader as instructed. And reboot. Yeay... I now have a working Arch Linux running on Eee PC 900

Install graphical user interface (X Org)

Install X Org basic package, like:
#: pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils xterm
Eee PC 900 comes with Intel embedded video controller, so install that driver.
# pacman -S xf86-video-intel
Next, install driver for the mouse pad
#: pacman -S xf86-input-synaptics
Let us detour here and install non-root user, see this for more info.
#: adduser
It will show you something like this:
Login name for new user []: timus
User ID ('UID') [ defaults to next available ]:
Initial group [ users ]:
Additional groups (comma separated) []: audio,lp,storage,video,wheel,power
Home directory [ /home/timus ]:
Shell [ /bin/bash ]:
Expiry date (YYYY-MM-DD) []:
In Linux, there lots of options for desktop environments but I will be using LXDE as it is a bit lightweight. Now install this DE:
#: pacman -S lxde
LXDE needs D-Bus (message bus system for simple inter-application communication).
#: pacman -S dbus
And ensure that D-Bus runs after boot-up, so add it in DAEMONS array in /etc/rc.conf. It should look like:
DAEMONS=(syslog-ng network crond dbus sshd)
Next up, install display manager. Again, so many choises to make in Linux. I will be doing xdm this time.
#: pacman -S xorg-xdm xorg-xconsole
Note that I am installing both xorg-xdm and xorg-xconsole.

Make .xsession executable:
$: chmod 744 .xsession
If you don't have that file in /home/[username]/, copy one from /etc/skel/.xession. By the way, this is the reason why a detour was done above to create a user. If you don't have /home/[username], open a new virtual console (like Alt+F2) and login. This should initialize the files and folders for that user.

I like that xdm look a little more appealing, so I have to install xdm-archlinux, like:
#: pacman -S xdm-archlinux
Since xdm-archlinux uses terminus fonts, installing it is in order:
#: pacman -S terminus-font
Almost done with setting up the basic GUI system, to start the machine in graphical mode, edit /etc/inittab to change runlevel to 5, like:
## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:
Towards the end of /etc/inittab, uncomment or add xdm, like:
# Example lines for starting a login manager
x:5:respawn:/usr/bin/xdm -nodaemon -config /etc/X11/xdm/archlinux/xdm-config
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1
#x:5:respwan:/usr/sbin/lxdm >/dev/null 2>&1
# End of file
Reboot machine and viola!!! Nice looking xdm.
------------------------------- To be continued


References:
https://wiki.archlinux.org/index.php/Asus_Eee_PC_901
https://wiki.archlinux.org/index.php/Asus_Eee_PC_701
https://wiki.archlinux.org/index.php/Beginners_Guide
http://terribly-misanthropic.blogspot.com/2009/04/eee701-arch.html

Tuesday, November 22, 2011

Is it just me or GNOME 3 based distributions are getting buggy

Is it just me or GNOME 3 based distributions are getting buggy?

I have tried Ubuntu 11.10, Linux Mint 12, Fedora 15 (I should update to Fedora 16 soon), but I can't help but complain about the performance of this latest distributions virtualized using VirtualBox. Or is VirtualBox that's getting really buggy??? :(

Ubuntu 11.10 feels really slow, clicking on an application using Unity takes forever to bring up the applications main GUI (even gedit is slow). Linux Mint 12 while looks nice but also is problematic. Clicking on Mint Menu shows blank items ... and it only shows up the entries once I wiggle the mouse around. Picture speaks a thousand words, so see below.

Figure 1. Mint Menu shows blank on the left side :(

Another issue I have observed with Linux Mint 12 is that the menu gets out of sync. So like if select Internet it does not move focus to it. But the items to the right gets updated. Again, see below for a screen capture.

Figure 2. Menus are out of sync

Fedora 15 while useful but feels really slow. My host machine is a Core 2 Quad CPU clocking at 2.50 GHz. Yes, the guest is only allocated one core and 1GB of memory, but Linux should not need more than that. Or at least it should be comfortable to use it using that configuration.

Did we succumb to release schedule? Or is GNOME 3 is still in a state of influx? Or VirtualBox is getting really buggy?

Linux Mint 11 Installation Screen Capture tour

Linux Mint 11 (Katya) was released 2011-05-26. As usual it comes with all the goodies but this time user can download an ISO without all the codecs. Below shows version numbers of the major packages.


Release: Linux Mint 11
Code name: Katya
Linux: 2.6.38-8-generic
GNOME: 2.32.1
X.Org X Server 1.10.1

So here goes how the installation looks like.

Figure 1. Boot screen, looks really nice and clean

Figure 2. Linux Mint 11 Live CD desktop

Figure 3. Install to hard drive, select English as language

Figure 4. Preparing for installation

Figure 5. Allocate drive space

Figure 6. Erase disk and install Mint

Figure 7. Select time zone

Figure 8. Select keyboard layout

Figure 9. Create user

Figure 10. Install complete, ready to reboot

Figure 11. Login screen

Figure 12. Linux Mint 11 desktop

How to get X server version from the command line

To get X Org servers version from command line, do:

Xorg -version

Sample output from the command above looks like this:


X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.32.29-dsa-ia32 i686 Debian
Current Operating System: Linux deb6 2.6.32-5-686 #1 SMP Mon Jun 13 04:13:06 UTC 2011 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686 root=UUID=6df69de5-fdf6-4729-a83b-c56fb0d8af3f ro quiet
Build Date: 19 February 2011  02:37:36PM
xorg-server 2:1.7.7-13 (Cyril Brulebois <kibi@debian.org>)
Current version of pixman: 0.16.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.

Tags:
X Server, X Window, version, command line, console, cli

Sunday, November 20, 2011

Ubuntu 11.10 alternate install blank screen

With Ubuntu 11.10 Unity requiring lots of resources both in CPU and memory, I embarked on installing a trimmed down version of it using alternate install. This used to be straight forward, follow the text based wizard and you are ready to go.

The problem is that after installation, on reboot it shows a blank screen. Just nothing... (except for the blinking cursor). This might be specific to VirtualBox guest machines but I can't verify this.

Anyway, it took me a while to figure this one out (of course with the help of Google). The following, from  Ubuntu's bug repository Launchpad, shows the problem:


Ubuntu 11.10 Command line only installation fails over and over again
http://ubuntuforums.org/showthread.php?t=1873069

grub2 configuration has vt.handoff=7 even when X11 is not installed
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/695658

Command-line Install on Minimal CD tries to boot graphically
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/831752

The problem
Ubuntu minimal/alternate failed to cover the use case that user might not need GUI in Ubuntu. This is a big oversight as a big chunk of Linux users (servers) don't need GUI. What happens is that it boots up and creates virtual terminal session 7 so that it can transition to GUI login seamlessly. 

The work around
In Ubuntu 11.10, /etc/grub.d/10_linux line 70, it checks if the word "splash" is present in GRUB_CMDLINE_LINUX_DEFAULT.  This GRUB_CMDLINE_LINUX_DEFAULT can be modified in /etc/default/grub. So changing this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT=""

I should have removed "splash" only but I also would like to see all the message while the machine is booting up.

Next up, is add the following towards the end of /etc/default/grub:
GRUB_GFXPAYLOAD_LINUX=text

Ok I am not so familiar with this one. But I believe what it does is to force it to run in text mode instead of doing KMS functionality built-in the kernel.

Now, to update grub.cfg run:

sudo update-grub
Then reboot the machine, like:
sudo reboot

Thursday, November 17, 2011

Ubuntu 11.04 Installation Screen Capture

Linux is moving in such a fast pace that I can't keep up playing around with the latest and greatest. Ubuntu 11.04 was released long time ago (in internet time) but I am keeping installation screen capture here for posterity.

Release: Ubuntu 11.04
Code name: Natty Narwhal
Kernel: 2.6.38-10
GNOME: 2.32.1

So here goes the screen captures.

Figure 1. Select language

Figure 2. Preparing to install Ubuntu

Figure 3. Allocate drive space

Figure 4. Erase disk and install Ubuntu

Figure 5. Timezone

Figure 6. Keyboard layout

Figure 7. Set user

Figure 8. Installation complete, reboot

Figure 9. Login screen

Figure 10. DASH 

Monday, November 14, 2011

Windows Antivirus log that failed me

This is a log of free anti-virus that I have used that failed to protect Windows computers so far. Do note that non-free "expensive" ones can also fail. I have witnessed this firsthand in the office where a zero day exploit rendered our network almost useless.

Anyway, this does not necessarily mean that below are lackluster products, it is just that it did fail me one time or another.

List is listed based on chronological order, oldest listed first:
1) AVG Anti-Virus Free Edition - this was my all time favorite but failed me way back in 2010.
2) Microsoft Security Essentials - last week (second week of Nov 2011), one of our home computers was infected by a virus. Got to recover the entire system.

Experimenting with the following for now, see if it does protect a Windows XP PC:
- Avast Free Anti-virus (Program version: 6.0.1289)

Sunday, November 13, 2011

Recovering Sony VAIO VGN-N110G

We have a pretty much old, by today's standard, Sony VAIO VGN-N110G running on Windows XP. This machine was hit hard by a virus and MS Security Essentials was not doing its job. Not sure if Security Essentials is a good anti-virus but I am using it anyway (hey it is free).

The virus was pretty smart and distructive. Though the data files were not deleted but it did  delete the menu entries in Windows leaving it almost unsable. Initial impression of the virus was that it hides all files making you believe that everything was gone. It even offers a solution, like buy an anti-virus. Anyway, as I mentioned above, I did try to do full scan using MS Security Essentials, it was able to identify several and it did mention that the virus was removed. But the system was still unusable after the anti-virus cleanup exercise.

So I tried to fire-up VAIO recovery to no avail. It says it cannot find the restore drive. It was really getting so bad.

Rebooting into safe mode does not help. So tried another reboot but this time I pressed F10 by mistake. What a surprise, F10 during boot actually allows the user to recover the system.

Good job here Sony, this feature is very handy.

So, to summarize, Sony VAIO VGN-N110G can be recovered by rebooting the machine and hit F10 just after the BIOS checks.

Tag:
Sony VAIO cannot find recovery drive.

~ts

Monday, November 07, 2011

Fedora 15 Screen Capture Tour

I have been trying to keep a log of the *nix distribution I am using. Mostly I take screen captures and post them as blog post. I have been slacking lately due to personal commitments. Anyway, so here goes Fedora 15 (released May 24, 2011).


Boot screen

GNOME 3 failed to load on VirtualBox

Install to Hard Drive

Keyboard selection

Type of store device

Confirm to wipe disk

Set computer hostname

Set time zone info

Set root account password

Storage allocation, use all space

Install complete

Welcome to Fedora

License agreement

Create user

Set date and time

Hardware profile

Login screen

Class GNOME menu

Fedora 15 major software versions
kernel: 2.6.40
GNOME: 3.0.1
Firefox: 6.0

Saturday, November 05, 2011

Mounting VirtualBox shared folder that is writeable by non-root user

I have been using VirtualBox for awhile now but I mostly use Windows as the host machine. I just had setup few Linux boxes as VirtualBox host and found a need to save files in the host as I normally do snapshots and clean 'em up.

Mounting a shared folder is easy, what caught me was that I can't change ownership of the folder created under the shared folders. So my regular user account can't create files.

I realized that mount actually accepts options as to who would have access to the mounted folder, so to mount with read/write access to a user, do:

sudo mount -t vboxsf -o rw,uid=1000 userdat /mnt/userdat
Where:
uid=1000 is the user ID of the user. For example, I have a user named timus, to get the ID, you can do:

timus@ubu1110:~$ cat /etc/passwd | grep timus
timus:x:1000:1000:timus,,,:/home/timus:/bin/bash

As can be seen, timus uid is 1000 and group ID is 1000 as well.

userdat is the VirtualBox shared folder name.
/mnt/userdat is the mount point

Keywords for easy search:
user userland VirtualBox shared folders read write

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04 I am planning to run qemu-system-ppc to play around QEMU ...