Archive for the ‘eeePC’ Category

Recompile the EeePC Xandros Linux Kernel

Thursday, January 24th, 2008

EEEPC 2GB of Memory topI finally took the time to recompile my EeePC Kernel to include highmem or memory over 1GB. I have the kernel recompiled to support up to 4GB but the EeePC bios only supports up to 2GB. In this article I will show you how it is done, how to do it yourself, and how to take the easy way out and use my pre-compiled kernel. You may also want iptables in your kernel for a firewall. I show you how to add that as well.

STEP 1 (Backup your EeePC):

YOU CAN SKIP THIS STEP IF YOU DON’T CARE TO BACKUP YOUR SYSTEM. IF YOU CHOOSE NOT TO BACKUP AND YOU BRICK YOUR EEE OS YOU WILL HAVE TO RESTORE FROM THE EEEPC CD-ROM. FOR THAT YOU WILL NEED A EXTERNAL USB CD-ROM OR FLASH DEVICE

You may backup your entire SSD by running the (dd) command with (/dev/sda) or individual partitions on your sda. There are 4 individual partitions located on the SSD and they are (sda1, sda2, sda3, and sda4).

My MMC-SD 16GB is using the vfat filesystem. I am mainly concerned with backing up (sda1, and sda2) which sda1=system partition and sda2=user partition because these are the partitions I will be working with and I don’t want to loose my personal settings that I have accumulated over it’s 3 months of use. These locations will differ when you boot to a external distro as seen below. Below will show you how to backup your entire SSD including the partitioning. EVERY BIT.

TO BACKUP INFORMATION TO MMC-SD:

- Create a usb bootable flash stick using slax linux or knoppix

SLAX USB installation tutorial (Using Windows): (Source: Pendrivelinux Slax)

Knoppix USB installation tutorial (Using Windows): (Source: Pendrivelinux Knoppix)

If you prefer to use linux to create a bootable system on USB or Flash use this instead: (Source: Pendrivelinux Knoppix 2)

-Reboot. Press [Esc] at startup and select (USB:NAME OF DEVICE) in my case it is: (USB:SanDisk Cruzer Mini)

-(I used Slax) Once in slax login with: USERNAME: root PASSWORD:toor

-Your USB flash stick and MMC-SD card will be automounted.

-In my case, using the “mount” command I found my SSD at “/dev/hdc” and my MMC-SD at “/dev/sda1″. “/dev/sda1″ is automounted at: “/mnt/sda1_removable”

-To backup my SSD to the MMC-SD I ran:

dd if=/dev/hdc of=/mnt/sda1_removable/eeebackup.img

If you ever have to restore it, just boot back to Slax and run:

dd if=/mnt/sda1_removable/eeebackup.img of=/dev/hdc

It will take a little while to back up the SSD. In my case, it took 2480.21 seconds (41 Minutes) at 1.6 MB/s.

Now that all your hard work has been backed up it is time to start gathering.

STEP 2 (Install Repos and Dependencies):

- begin by following my article on installing repos and apt pinning.
(http://ruckman.net/tech/2007/08/17/eeepc-xandros-added-repositories/)

-Run the following:

apt-get update

apt-get upgrade

apt-get install build-essential gcc cpp libc6-dev libncurses5-dev

STEP 3 (Install Single User Mode):

NOTE: You will need to know how to use the ‘vi’ editor. Tutorial here:

(http://unix.t-a-y-l-o-r.com/Vbasics.html)

Turn on eeePC and hit F9 until GRUB bootloader appears

press ‘e’ to edit the normal boot option

Now you’ll see a screen showing the Grub entries associated with that boot choice. Scroll down to the one that starts with “kernel /boot/vmlinuz….” and then again press the ‘e’ key to edit this line.

Now you’ll be taken to an editor screen that shows you the end of the line you were previously looking at. Add the following to that line: XANDROSBOOTDEBUG=y and then press Enter. You’ll be taken back to the screen showing the 3 lines for this boot option.

Now press ‘b’ to boot. You’ll be taken to a BusyBox shell, with root permissions.

Installing rescue mode (Single User Mode) is simply the process of adding another entry to the Grub boot menu, so you don’t have to make the edits we previously described each time you want to enter single-user mode.

You need to edit the file /boot/grub/menu.lst, and you need to do it as root, and you need to do it single-user mode. So, follow the previous instructions to start single-user mode, then mount /dev/sda1 on /mnt-system:

mount /dev/sda1 /mnt-system

Then use vi to edit /mnt-system/boot/grub/menu.lst:

vi /mnt-system/boot/grub/menu.lst

After opening the file, you’ll see three entries. Type the following entry after the first entry:

title Rescue Console

root (0×80,0)

kernel /boot/vmlinuz-2.6.21.4-eeepc quiet rw irqpoll root=/dev/sda1 XANDROSBOOTDEBUG=y

initrd /boot/initramfs-eeepc.img

(Be careful about the numbers - if the other entries in menu.lst do not have 2.6.21.4, use the one they use.)

Now save your file and close the editor (using Esc :wq in vi). Then power down the Eee PC. Next time you need Rescue Mode, you can select this option.

STEP 4 (Obtain and compile the kernel):
Asus has made the kernel source for the stock hardware available here:

(http://support.asus.com/download/Download.aspx?SLanguage=en-us)

I downloaded and uncompressed it, installing it to /usr/src. (dpkg -i linux-source-2.6.21.4-eeepc_5_all.deb) then extract the files. (tar -xjf linux-source-2.6.21.4-eeepc.tar.bz2)

I got the original kernel configuration file from /boot/config-2.6.21.4-eeepc, and copied this to /usr/src/linux-source-2.6.21.4-eeepc/.config, and ran:

make oldconfig

make prepare

make scripts

I then opened up the config file in a text editor and changed the following:

CONFIG_LOCALVERSION to:

CONFIG_LOCALVERSION=”-eeepc-HIGHMEM”

CONFIG_NOHIGHMEM to:

# CONFIG_NOHIGHMEM is not set

I changed the CONFIG_HIGHMEM4G to:

CONFIG_HIGHMEM4G=y

You may now save that file and run the following command:

make menuconfig

You can accept the defaults or for a more advanced configuration you can add or remove kernel modules. For instance if you wanted iptables you could add netfilter.

For IPTABLES (Netfilter) do make menuconfig and enable “networking > networking options > network packet filtering framework (netfilter)”

And then in the netfilter sub options enable all iptables options as a module <M>.

Device drivers (A list to help you for iptables)

  • Networking support
    • [y] Networking support
    • Networking options
      • Network packet filtering
        • [y] Network packet filtering
        • IP: Netfilter Configuration (*)
          • [y/m] Connection tracking
          • [y/m] IP tables support
          • [y/m] Connection state match support
          • [y/m] Connection tracking match support
          • [y/m] Packet filtering
          • [y/m] Full NAT
          • [y/m] LOG target support

FINALLY!

Compile the new kenel (This will take a while):

make bzImage

make modules

make modules_install

Because I changed the name of the “local version”, the modules got copied to a new sub-directory of /lib/modules. If you don’t change the name, and you use the stock source, your existing modules will be overwritten, and this will have weird events when you try to boot your old kernel that will try unsuccessfully to use the new modules.

Note also that I DID NOT run ‘make install’ to put the kernel in /boot!

STEP 5 (Install the kernel):

reboot and switch to single user mode:

Mount the partitions:

mount /dev/sda1 /mnt-system

mount /dev/sda2 /mnt-user

Copy your new kernel to its new home:

cp /mnt-user/usr/src/linux-source-2.6.21.4/arch/i386/boot/bzImage /mnt-system/boot/vmlinuz-2.6.21.4-eeepc-HIGHMEM

edit grub to add new kernel.

vi /mnt-system/boot/grub/menu.lst

Add the following:

title Nornal Boot Highmem

root(0×80,0)

kernel /boot/vmlinuz-2.6.21.4-eeepc-HIGHMEM quiet rw vga=785 irqpoll i8042.noloop=1 root=/dev/sda1

initrd /boot/initramfs-eeepc.img

Also change the default to a different number if needed. 0 would equal the first entry, 1 the second entry to boot by default and so on.
Save the file and return to the root directory.

Unmount the filesystem:

umount /mnt-system
umount /mnt-user

Reboot to test your new kernel.

You also may run into wifi driver issues after a recompile. You can do the following to help resolve them. This will install the updated Madwifi drivers:

wget ‘http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz’
tar zxvf madwifi-ng-r2756+ar5007.tar.gz
cd madwifi-ng-r2756+ar5007
make clean
make
sudo make install
reboot

THE EASY WAY:

Now that you have done all that compiling and installing, if you have a 701 4G like me, you can just download my precompiled kernel and do STEP 5. ENJOY!

HIGHMEM KERNEL DOWNLOAD 701 4G KERNEL 2.6.21.4

Note: The easy install kernel supports up to 4GB of memory, but does not support iptables (Netfilter)! Netfilter requires additional modules to be installed which means you must compile the kernel yourself to get iptables working. You must compile and install the additional modules using menuconfig as listed in the steps above. Hopefully Asus will send a update to include iptables in the future for those who are too faint of heart to attempt a kernel recompile on their own.

A few EEEssues for Asus

Tuesday, December 18th, 2007

I have recently informed Asus of a couple problems with their EeePC Xandros distribution. It would seem that the Kernel doesn’t have iptables built into it for firewall protection. Which means any running system services are wide open to any connected network.

A permanent fix for iptables will involve recompiling the Kernel from scratch which would be easiest if Asus recompiled it and released it as an apt update. It can be done manually though.

A temporary fix is to disable the “portmap” and “samba” services. This will close the ports but leave you without the ability to share folders from the EeePC. You can still view samba shares on other computers.

To disable these services, open /usr/sbin/services.sh and comment out the following code:

start-stop-daemon –start –quiet –oknodo –exec /sbin/portmap

/usr/sbin/invoke-rc.d samba start

One thing you can learn from the above code is that you can start and stop any service by using the invoke-rc.d script. A good thing to know as well.

I have noticed that the Xandros file manager works but is inadequate for using samba shares. Instead of using the default file manager from Xandros I used Konqueror instead. It is already installed but hidden.

If you wish to create a shortcut to Konqueror it is located at:

/usr/bin/konqueror

Also, I have discovered another issue with the Kernel that will involve recompiling it from scratch. The kernel was compiled to only recognize up to 1GB of RAM. You can change a parameter in the kernel configuration that controls the maximum RAM allowable. If you set it to 4GB then a 2GB module will work in the Xandros OS. If you install another Linux distribution you will not have to recompile the kernel as they are set to allow this much memory by default. Windows XP is already set to allow a maximum of 4GB of RAM.

There is information on recompiling the kernel (HERE) but I found that it is incomplete and doesn’t explain how to set the RAM limits.

There is better information (HERE) and (HERE).

I will add more information on this at a later time once I successfully recompile my Kernel with the iptables module and RAM settings.

Welcome eeePC

Friday, December 14th, 2007

I am happy to announce the arrival of my new black eeePC. I can honestly say this is one of the sweetest laptops I have ever bought. I highly suggest getting one! You are going to see a lot of articles being posted on this little jewel. I love my eeePC!

eeePC Black

The picture above shows my work pc which is a Dell Latitude D520, and my new eeePC 701 4G.

EDIT: No mPCIe (Mini PCI Express) connector on the 7B serial numbers. Picture below.

No MiniPCI

 

 

EeePC Xandros Added Repositories

Friday, August 17th, 2007

Add the following lines to your /etc/apt/sources.list

deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free
deb http://dccamirror.xandros.com/dccri/ dccri-3.0 main
deb http://www.geekconnection.org xandros4 main

To protect your default install, you must activate pinning so that your main distribution packages don’t get overwritten. Which could possibly cause stability issues.

Add following lines to /etc/apt/preferences (if it does not exist, create it).

Package: *
Pin: origin update.eeepc.asus.com
Pin-Priority: 950

Package: *
Pin: origin xnv4.xandros.com
Pin-Priority: 900

Package: *
Pin: origin dccamirror.xandros.com
Pin-Priority: 850

Package: *
Pin: origin www.geekconnection.org
Pin-Priority: 800

You can then use apt-get to install additional software.

ADDITIONAL REPOSITORIES:

Debian multimedia repository:
deb http://www.debian-multimedia.org/ sarge main

Another debian multimedia repository:
deb http://ftp.sunet.se/pub/os/Linux/distributions/debian-multimedia sarge main

Matty’s & Andrew’s Archives (xorid):
deb http://www.xandros.or.id/archive/ xxxx matty andrew

Debian Stable (sarge) repository:
deb http://http.us.debian.org/debian/ sarge main contrib non-free

Debian Stable (sarge) repository (For downloading source):
deb-src http://http.us.debian.org/debian/ sarge main contrib non-free

Video Lan (VLC) testing repository:
deb http://download.videolan.org/pub/videolan/debian/ sid main

Video Lan (VLC) testing source repository (For downloading source):
deb-src http://download.videolan.org/pub/videolan/debian/ sid main

Tor Debian Repository:
deb http://mirror.noreply.org/pub/tor/ sarge main

Tor Debian Repository (For downloading source):
deb-src http://mirror.noreply.org/pub/tor/ sarge main

More Debian Multimedia mirrors can be located here:

http://www.debian-multimedia.org/mirrors.html