X1000 v2 Linux Installation & User Guide

Author: Ahmad Baitalmal

Version 3 is out! Click Here to get it

This distribution is a customized Linux build targeting HP/Compaq X1000 class of notebook computers. It is assumed that main hardware components are similar. Things such as:

GDM Login Screen
Framebuffer Console

This distribution is based on Gentoo 2004.0. Gentoo related technical issues should be discussed at http://forums.gentoo.org. It is an excellent place to get help and information.

This installation guide does not have any real special information. If you how to create partitions, setup grub and fstab, then you already know most of what's in this guide.

If X1000 Linux : Please consider making a small donation to the X1000 Linux Development Fund.



$5, $10, $15, what is your time's worth? This donation encourages the developers to improve the product for you and benefits both them and you. The other choice is to keep paying Microsoft hundreds and thousands of dollars for more crippled products and marketing spin.

Why?

Gentoo has a very powerful packaging and dependency resolution system. It is extremely flexible yet very easy to use and maintain. You will always hear how hacker-oriented or time consuming Gentoo is, but these complaints are almost always referring to the installation process.

HP/Compaq X1000 based notebook computers have similar hardware which makes it possible to build one optimized distribution and image it to other machines. Thereby illuminating 95% of the installation and configuration hassle.

Also, the distribution is “distributed” as a tar+bzip2 tarball. The tarball can always be used as backup to quickly rebuild a broken installation into a known working state.

What's included?

To see a list of the packages precompiled into X1000 Linux, see http://www.bitbuilder.com/x1000/packagelist.php

ALSA is now part of Kernel 2.6, X1000 Linux has ALSA preconfigured. Volume, mute, and play control keys are pre-mapped and working.

From left to right:

3DDesk is also prebuilt and configured. Just press F12 and see your whole desktop switch in 3D. 3DDesk in action, just press F12 Thanks to the fine work of the folks at desk3d.sf.net

Yes, there are NO KDE or QT applications. Two desktop environments are too much to maintain and distribute.

What type of optimization has been done?

The installation started from Gentoo Stage 1 with the following:

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -pipe -O3 -fomit-frame-pointer -frename-registers
-fprefetch-loop-arrays -falign-functions64 -mmmx -msse2 -msse"
CXXFLAGS="${CFLAGS}"
USE="X gtk gnome alsa aalib acpi acpi4linux apache2 avi berkdb bidi
bluetooth bonobo cdr crypt cups curl composite dri dga directfb dvd
encode evo esd ethereal fbcon flash gd gdbm ggi gif gphoto2 gimpprint
gtk2 gtkhtml gstreamer imlib irmc jpeg libwww lirc mad mmx mozilla
mozxmlterm moznocompose moznomail mpeg ncurses oggvorbis opengl opie
oss pam pcmcia pda pdflib php png pnp postgres python quicktime
readline samba sasl sdl slang spell ssl sse sse2 svga tcpd tiff
truetype trusted unicode usb wavelan wmf wxwindows X xml xml2 xmms
xosd xv xlib x86 zlib radoen -qt -kde -arts -ldap -java"

These settings have been giving stable performance. The beauty of Gentoo is that you can modify what you do not like in /etc/make.conf and rebuild.

Prelinking has been enabled, this gives a noticeable performance difference when loading large applications. See Gentoo Linux Prelink Guide.

Almost ALL packages in this distribution have been built using the ACCEPTED_KEYWORDS=”~x86” setting. Many features depend on the latest software available, so this feature is used.

Let's get started!

To install X1000 Linux the following steps must be taken:

  1. Download System Rescue CD.

  2. Download the X1000 Linux tarball.

  3. Create the partitions.

  4. Mount your new partitions.

  5. Expand the X1000 Linux tarball onto your new tree.

  6. Setup your partition access.

  7. Reboot and enjoy.

Download System Rescue CD

SystemRescueCD is a solid Linux distribution. that you should never leave home without. It can be downloaded from http://www.sysresccd.org. The CD ISO is about 104MB. The tools we are interested in are QtParted and/or fdisk.

You can use QtParted to slice and dice NTFS (and other) partitions. You may not need this if you already have your partition table figured out.

Using this distribution is a suggestion, not a requirement. You can use Knoppix or whichever LiveCD your like. As long as you are able to provide the required partitions.

Burn the ISO file as a CD image (don't just copy it over on a CD).

Download the X1000 Linux tarball

The X1000 Linux tarball can be downloaded from http://www.bitbuilder.com/x1000/download.php.
You will need BitTorrent to download X1000 Linux.

Where to put the tarball?

When you download the tarball, make sure it will be available to you from a neutral partition (one that won't be involved in this installation like your Windows NTFS partition if it exists), OR on a networked computer that you can access the tarball from when you are booted in your SystemRescueCD or LiveCD.

Create the partitions

Now boot using the SystemRescueCD (or a LiveCD), let's set our partitions up.

You have total freedom on how to partition your drive. Most users will already have a single windows partition that takes the whole drive. Using a tool like QtParted enables you to shrink that partition's size. You can also use QtParted or fdisk (included in the SystemRescueCD) to partition the rest of your drive.

Here is a suggested drive partitioned for dual booting.

In this sample plan, the NTFS partition has been shrunk to 20GB, leaving us with 40GB to play with.

32MB for our X1000 Linux boot partition, it will have an ext3 filesystem.

20GB for our X1000 Linux root partition, it will have a reiserfs filesystem.

2GB (Ram x 2) for our X1000 Linux swap space

The rest ~18GB will be a FAT32 partition that both Windows XP and Linux can read from and write to.

If you are wondering why 5 & 6 are in an extenden partition, it is because a partition table can only have 4 primary partitions. And since we need 5 partitions, we have created the first 3 partitions as primary partitions (in blue) and turned our 4th partition into an extended partition. An extended partition can hold many "sub" partitions inside it. This has no impact on anything excepet the partition numbering. To the OS, It matters not.

If you already have the partition table setup, skip to Image the X1000 Linux images to your new partitions.

Important: Make sure you set the /boot partition as the active bootable partition.

If you already have enough space then you might find the Gentoo Handbook: Preparing the Disks very helpful. Or you can even use a standard installation from your favorite distribution like Fedora or Mandrake to create the partitions then cancel out. The main point is, you need to have your partition table ready.

Mount your new partitions

When you are done partitioning your drive, you will need to build the filesystem and mount it. This is very simple. Using our sample drive, here is how we do that.

Make our boot partition (/dev/hda2) an ext3 filesystem:

# mke2fs -j /dev/hda2

Make our root partition (/dev/hda3) a reiserfs filesystem:

# mkreiserfs /dev/hda3

Assign and turn on our swap partition (/dev/hda5):

# mkswap /dev/hda5
# swapon /dev/hda5

Now let's mount our whole tree. Here is how our partitions will look like when they are mounted:

I like my shared folder to be inside my home folder, you may like it somewhere else. We will leave the shared folder to be mounted automatically by our /etc/fstab file. Here is how you mount the other two partitions, we mount the root partition first:

# mount /dev/hda3 /mnt/temp1
Then we mount the boot partition inside it, we need to create the boot folder:
# mkdir /mnt/temp1/boot
# mount /dev/hda2 /mnt/temp1/boot

Now you are ready to transplant your new system over to your tree.

Expand the X1000 Linux tarball onto your new tree

If you downloaded the X1000 Linux images to a remote computer make sure your network is up and that you can access the remote computer.

If the images are on a local partition (your NTFS partition for example) you need to mount it first

// if your NTFS holding the images is /dev/hda1
# mount /dev/hda1 /mnt/temp2

Let her rip!

# cd /mnt/temp1
# tar xjfv /mnt/temp2/x1000-2.tbz

Expanding the tarball takes about 7.5 Minutes.
Neat eh? :)

Setup your partition access

Now that you have X1000 Linux installed, you need to setup a new user and setup the correct fstab and grub settings. To do that you need to chroot into your new tree

Chrooting means "to change root". Your current root "/" comes from the SystemRescueCD or LiveCD that you have booted from. If you were to create a new user in that environment, the user will be created for that temporary environment.

What you need is to go into your new tree (on /mnt/temp1) and make it the current root as if you booted from there instead. Any changes you make there will be applied to your new X1000 Linux.

Here is how you chroot into your new X1000 Linux tree:

chroot /mnt/temp1 /bin/bash
env-update
source /etc/profile

Real simple, if you "cd /" you will infact be at "/mnt/temp1", but the chroot command hides that. Now go ahead and create a new user for yourself. I created mine like this:

# useradd -m -g users -s /bin/bash ahmad
# passwd ahmad

That will create a user named "ahmad", make him part of the "users" group, and create him a home folder "/home/ahmad". Then use passwd to set a password.
You should take this opportunity to create the shared folder also:

# mkdir /home/ahmad/shared
# chown ahmad:users /home/ahmad/shared

The default root password is a jumbled mess. You MUST reset the root password also.

# passwd

Now edit fstab to have it remount your tree for your everytime you reboot your machine:

# nano /etc/fstab

Here is how our /etc/fstab should look like:

Next, we setup our bootloader grub. Edit your grub.conf file:

# nano /boot/grub/grub.conf

Here is how our /boot/grub/grub.conf should look like:

GRUB has a different notation to address partitions. The drive is called "hd0" instead of "/dev/hda". And the first partition is called "hd0,0" instead of "/dev/hda1", and so on.

You need to modify the X1000 Linux entry to the correct partitions. Also, notice the two kernel parameters that point to our root and swap partitions (the two grey line arrows). You can keep everything else as is.

Save grub.conf and exit nano. Let's put grub in our Master Boot Record (MBR):

# grub --no-floppy
# root (hd0,1)	// hd0 is our hda, and 1 is our /boot
# setup (hd0)
# quit

That's it, you are done :)

Reboot and enjoy

Exit chroot

# exit

Unmount

# umount /mnt/temp1/boot
# umount /mnt/temp1
# reboot

Remove the SystemRescueCD, reboot, and you should see your new GRUB menu.

Know Thy System

Network Interfaces

The network interfaces in your new system are as follows:

eth0Built-in RealTek Ethernet 100 mbps
eth1Centrino WiFi IPW2100

You can set your network configuration at /etc/conf.d/net. The file is well commented. When done, restart the desired interface:

# /etc/init.d/net.eth2 restart

emergelatest

Gentoo users are used to installing software using

# emerge some_software

X1000 Linux uses can still use that, but you can alse an alias to always use the ~x86 keyword.

# emergelatest some_software

prelinknow

It is a script (located at /usr/local/bin), every once in a while after you have emerged or rebuilt packages, run this script to re-prelink your system. The script automatically kills xdm (your desktop environment) then starts the prelink process. Do not prelink when your desktop is running.

fix_mtrr

This script attempts to fix a bug in the way DRI allocates memory. The script has been designed for ATI Radeon with 64Mb. For those with 32Mb, you can disable the script from /etc/conf.d/local.start.

Got Issues?

The community forum is your best place to ask questions at http://www.x1000forums.com.