Tag Archives: laptop

Arch Linux on a T400 – Log

Trying out Arch Linux on a Lenovo T400!

First step after getting the T400 Dual Core Centrino 2.26GHz 4GB RAM: replace the 160GB spinning rust to a 120GB Samsung 840. Very easy to take out the old disk and put the new SSD in the carrier.

https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T400 has some details.

https://wiki.archlinux.org/index.php/Installation_Guide and the Beginner’s Guide are quite helpful.

To make it easy, the partition layout I created with parted was:

mklabel: MSDOS
mkpart: pri, 0%, 300M /boot ext4 – flag bootable
mkpart: pri, 300M, 100%, /, ext4
No swap!

Install base and some important packages to disk after mkfs and mounting and setting up mirrors:

pacstrap /mnt base dialog iw wpa_supplicant grub parted sudo alsa-utils vim ttf-dejavu openssh screen

Beginners’_Guide had sufficient instructions to set up the boot loader, except this was needed or the grub-mkconfig would fail with syntax error.

echo “GRUB_DISABLE_SUBMENU=y” >> /etc/default/grub

After successful boot time to get a graphical display up and running :)

Beginner’s guide to the rescue: Beginners’_Guide#Graphical_User_Interface

Lightdm was easy to set up and worked right out of the box, which GDM did not. DWM was easy too, I think I can get used to using the ABS/makepkg stuff. Nicer than compiling it and copying the binary around.

Windows key is Mod4Key in config.h for DWM.

Packages and getting chromium-pepper-flash working:

  1. Install all the dependencies for Aura
  2. Download aura and makepkg -i install it
  3. aura -A chromium-pepper-flash

alsamixer and pressing “m” mutes/unmutes a channel :)

Making use of IBM Laptop T40 – Part 4

Logging in!

Wireless worked straight from the start.
It says that my battery probably is broken (only 28% capacity).
Some 2.6~GB is used by the default installation out of my 40GB disk. 1.6GB for swap.

Step 1 – set up Synergy.

This is so I don’t have to use the laptop keyboard/mouse but instead can just move the mouse from my desktop and I can then control the laptop. It is pretty awesome. To do this, go to the Applications/ubuntu software center and search for synergy. Then install QuickSynergy. I had to click on “use this source” first.

Then go to accessories and quicksynergy and put in IP of the machine where you have synergy and a screen name. Tada. I wonder if this works after a reboot. But doesn’t matter much, you can just drag the entry in the applications menu to the ubuntu desktop and then you’ll see it when you log in.

You can find more details on the Ubuntu community pages.

Trying this out, it’s a little tricky. Managed to bork the login with this. Cannot even get into recovery console. Probably a wrong character somewhere :/ If this happens, hit CTRL+ALT+F1 to get to the console prompt.

Anyway, follow that guide. But you do not have to have the while thing when putting the stuff in the gdm session files.
Instead you can just put the “sleep 1”. This means you’ll have a lag of 1 second. But it’s working.

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc --name identifywithname IP.IP.IP.IP

Step 2 – Install Updates.

This popped up automagically. 302MB of extra updates does it want to install. I just went with the default, always good to have updates :) The root password is the same as your normal password, unless you’ve done something special.
During the updates the cursor when I was using synergy was lagging behind. But that’s because I’m using a poor wirless connection (maxes out at 580kB/s) and the update probably uses all it can get. The normal mouse works fine :)

You may have heard that ‘you don’t need to reboot in Linux’ this is true unless you make a change to the kernel. Which is what this update updated.

The rest – whatever you feel is important :)

hdparm – testing hard drive

I have some suspicion that the internal hdd is singing on its last verse.
The built-in tool to test IDE/ATA drives is: hdparm.
First though you want to find what device name your disk has.
If you type ‘mount’ you will see on top something like this:

/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)

This will tell you that /dev/sda1 is where / is installed. / is root. The file system.

The syntax to test the hard drive cache:

martbhell@bottle:~$ sudo hdparm -T /dev/sda

Timing cached reads:   688 MB in  2.00 seconds = 343.59 MB/sec
martbhell@bottle:~$ sudo hdparm -tT /dev/sda


Timing cached reads:   774 MB in  2.00 seconds = 386.65 MB/sec
Timing buffered disk reads:  102 MB in  3.00 seconds =  33.95 MB/sec

So that looks good. I feel better now :)

webbrowser – ubuntu 10.10 comes with Firefox 3 and when I search it doesn’t find Firefox 4

So we install google chrome!

All you have to do is go use firefox and find google chrome page. Download the .deb package (ubuntu is based on debian). And open, this will open Ubuntu Software Center. Install.

DWM in Ubuntu

find dwm in ubuntu software center, also installing dzen2 with the add-on “i3status”.
When you install dwm you also get suckless-tools – which include dmenu and more.

To start it:

  • get to the login screen
  • select user
  • change from ubuntu desktop to dwm
  • login!
  • then in there, hit ALT+p – type quick, (you’ll see quicksynergy) – hit enter
  • set that up, and then you can use synergy in there as well
  • to log out: ALT+SHIFT+Q

To change stuff:

To change stuff in DWM you need to re-compile the package. Because I found dwm in ubuntu software center I was inclined to use that. But maybe the best option would be to do it manually..

Then, downloading it from suckless.org Making sure that the config.mk points to where dwm is not currently installed. (Maybe I should have uninstalled it first).

See /usr/share/xsessions/dwm.desktop
That is the file that starts dwm.
It’s also a good idea to point the xsession startup script to a script that runs xsetroot in a loop, if you want to update ‘xsetroot -name’ with time, for example.

You can see more details and my scripts in this blog post:

When I try to compile dwm, it complains that X11/cursorfont.h is missing. Probably because libx11-dev is not installed. After installing, it complains that X11/extensions/Xinerama.h is missing. Installing libxinerama-dev. After that it compiles just fine and runs just fine.

Previous posts:

Part1 – thoughts before installing
Part2 – ultimate boot CD – for diagnostics
Part3 – Installing Ubuntu

Making use of IBM Laptop T40 – Part 3


Two previous posts:

Part1 – thoughts before installing
Part2 – ultimate boot CD – for diagnostics

I ran the laptop with google-chrome 10 and two flash-pages loading all night, no blue-screens, no errors in event viewer. No actually it looks and feels pretty ok. It’s not very fast, but I suspect this is the hard drive being slow.

Turns out I do have some CDs lying around!

Starting off easy with ubuntu-10.10-desktop-i386.
The reason why I’m not trying the 11.04 is because I tried that in a VM the other day and it gave lots of errors. I also read some post about that 5/11 users managed to crash the Unity VM. So not stable :p

If that works (maybe even just try live-cd? nah, that’s chicken) then maybe later I will can try something else like:

archlinux (which apparently requires setting up x-servers (required for graphical interface):

How to boot:

Put in CD, press F12 during boot, chose the ACPI CD0 entry.

The install:

Ubuntu loading logo looks like crap during boot (green pixelation around it). However during the actual install it looks fine.
It would be good to have an UTP cable so that you can have internet access during install (download updates to packages etc). I did not have a UTP cable so I will hope that the wireless works and that I can update after install.
I like that while the CD is copying files, you get to set some settings:

partition layout/hard disk layout, timezone, keyboard layout, username, passwords, computer name, home directory encryption,

While setting up the computer name, the installer automagically found out that it is a Thinkpad T40 that I have!

When it’s done, the CD pops out, take it, press enter, wait, log in!

Next post is about logging in and doing the initial setup.

Making use of IBM Laptop T40 – Part 2

Previous post in this series:

I’m going to try to put ubcd on an old USB pen I have, lots easier than burning a CD/DVD. Which I may not even have. It’s an old Jens of Sweden 1GB mp3-player, that doesn’t start unless plugged in a USB-port..

On the UBCD (you can mount this on  your pc) there is a tool under x:\ubcd\tools\win32\ubcd2usb

Open a command prompt on your PC type:

  • x:
  • cd ubcd/tools/win32/ubcd2usb
  • ubcd2usb.cmd CDROM: USBDRIVE: (like ubcd2usb.cmd D: E:)

Then you need to put in the USB-pen, boot your computer. Check BIOS and put USB drive at the top.

Turns out I have forgotten my thinkpad supervisor password.. So that is a no-no because apparently to reset that I need to do some soldering. Also there is only a CDRW-drive, and I do not have an empty CD to burn, only DVDs :/

PXE boots is also an option, but this looks incredibly difficult. It probably isn’t (should be just DHCP and tftp server, but gotta make floppy boot disks, etc).

But, got a hold of my lovely laptop, boots up WinXP just fine. Going to patch it now and keep it going for a while running something, we’ll see if it crashes or not. Maybe it is OK?

Next post in this series will be published on the 18th of April. That one is about installing Ubuntu on the Thinkpad T40!

Making use of IBM Laptop T40 – Part 1

Next project coming up!

I want to have the laptop running so that I can have some use for it.
Maybe run some services on it instead of in a VM on my desktop?
But also so that I can chat while playing games ;)

I want to put Linux on this laptop! Which one? Haven’t decided yet.

  • Archlinux (keep it simple)?
  • Ubuntu (I used to run this before, worked even better than WinXP)?
  • Gentoo? – Too much work?

First: Go and pick it up ;) It’s been living in a friend’s cellar for half a year now.
Second: Find out what kind of hard drive/connector it is, in case it’s something special. Google says it shouldn’t be, but I would like to just buy a laptop 1.5″? PATA drive online and put that in instead. But they are some 60€ which is what a you pay for a 1TB these days.
Third: I want to replace that hard drive because it has a tendency to bluescreen a lot. But maybe I should run some kind of diagnostics on it first.. yes. I will run the Ultimate Boot CD – I have never tried it before but I heard it’s good. It’s only 300MB large.

Next post in this series.