2011-06-18

Thinkpad T60 and Debian Wheezy

I recently decided to upgrade my main laptop. This is a bit of notes on the process as I remember it. I've put up a page about running Debian on the t60.

After toying around with the hardware and checking BIOS settings, I downloaded the Debian 6.0.1a netinst.iso for amd64 and burnt it on a small cdrw. I made another one for the latest BIOS update. Installed the BIOS and then installed minimal Debian Squeeze. After first boot, I switched the sources to Wheezy (testing) and upgraded packages in small batches from within aptsh (upgrade and install, never dist-upgrade). I removed aptitude immediately and installed sudo, zsh, vim, ssh, sshfs, and other necessaries.

I installed memtest86+ and it appeared in GRUB. I left it running over night and found 100% pass (over 7 hours running) on all tests, no logged errors.

I run postfix and logcheck, apt-listchanges (show both mode) and apt-listbugs everywhere; debfoster, deborphan, debian-goodies, popularity-contest.

I installed X and awesome. I didn't bother with the details. Most things worked. I used my old awesome, X resources and other things. ACPI (battery status, temperature) and other meters worked with my old config on the new laptop just as well. Getting X to start with no configuration at all required only installing xserver-xorg-video-radeon and xserver-xorg-video-ati (for autodetect).

I plugged in the printer (Samsung ML-1640), logged into CUPS with a browser and ran Add Printer and it Just Worked. I had installed splix for the drivers earlier. I also installed libreoffice in case I need it.

I installed gphotofs for easy emptying of cameras; geeqie, gimp, and especially ufraw.

Installing fprint-demo let me try out the fingerprint reader (Just Works). I installed libpam-fprint (off sid, pinned) and did dpkg-reconfigure libpam-runtime to enable it. It will now ask for a fingerprint first instead of user password when using sudo or logging in (getty or gdm).

I installed wine and tried spotify (current version crashes ofetn) and used it to extract (install) the ICC profiles (TPFLX.ICM) from Lenovo. I haven't looked into colour calibration more closely yet.

I've blacklisted pcspkr, since for some reason loading that makes the system beep incredibly loud. Normal beeps go through the mixer now. The mixer is clean and all channels seem to work (haven't tried recording or SPDIF). Correct chipset variation was autodetected, unlike on an Amilo.

I installed qemu-kvm, created a logical volume, and installed the OEM licensed windows XP in it. The mouse seems to get extra accelerated while in the qemu window. The system works quite nicely and installing didn't require any trickery. I intend to see if I can run some difficult software on it (such as Dynamic C).

2011-04-06

Chumby gets a new card

Bought an 8GB Sandisk C4 MicroSDHC card to use with the chumby.

[261960.474288] sd 6:0:0:1: [sdc] 3854336 512-byte logical blocks: (1.97 GB/1.83 GiB)
[261960.487488]  sdc: sdc1 sdc2 sdc3 sdc4 < sdc5 sdc6 >

iofiel% fdisk -l /dev/sdc

Disk /dev/sdc: 1973 MB, 1973420032 bytes
5 heads, 4 sectors/track, 192716 cylinders
Units = cylinders of 20 * 512 = 10240 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       14670      146697+  53  OnTrack DM6 Aux3
/dev/sdc2            1563       14063      125000+  83  Linux
/dev/sdc3           14063       26563      125000+  83  Linux
/dev/sdc4           26563      192308     1657444    5  Extended
/dev/sdc5           26564       39063      124998+  83  Linux
/dev/sdc6           39064      192308     1532441+  83  Linux

iofiel% dd if=/dev/sdc of=chumby2G.img
3854336+0 records in
3854336+0 records out
1973420032 bytes (2.0 GB) copied, 119.449 s, 16.5 MB/s
iofiel% eject sdc
And the new card...
[262427.694384] sd 7:0:0:1: [sdc] 15523840 512-byte logical blocks: (7.94 GB/7.40 GiB)
iofiel% dd if=chumby2G.img of=/dev/sdc
3854336+0 records in
3854336+0 records out
1973420032 bytes (2.0 GB) copied, 1041.09 s, 1.9 MB/s
You have new mail.                                                                                                  
iofiel% sync
iofiel% eject sdc
Plug back in...
[263569.155489]  sdc: sdc1 sdc2 sdc3 sdc4 < sdc5 sdc6 >

iofiel% sudo fdisk /dev/sdc       

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdc: 7948 MB, 7948206080 bytes
5 heads, 4 sectors/track, 776192 cylinders
Units = cylinders of 20 * 512 = 10240 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       14670      146697+  53  OnTrack DM6 Aux3
/dev/sdc2            1563       14063      125000+  83  Linux
/dev/sdc3           14063       26563      125000+  83  Linux
/dev/sdc4           26563      192308     1657444    5  Extended
/dev/sdc5           26564       39063      124998+  83  Linux
/dev/sdc6           39064      192308     1532441+  83  Linux

Command (m for help): v
Warning: partition 1 overlaps partition 2.
Warning: partition 1 overlaps partition 3.
Remaining 11677702 unallocated 512-byte sectors

Command (m for help): d
Partition number (1-6): 4

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Selected partition 4
First cylinder (26563-776192, default 26563): 
Using default value 26563
Last cylinder, +cylinders or +size{K,M,G} (26563-776192, default 776192): 
Using default value 776192

Command (m for help): n
First cylinder (26564-776192, default 26564): 
Using default value 26564
Last cylinder, +cylinders or +size{K,M,G} (26564-776192, default 776192): 39063

Command (m for help): n
First cylinder (39064-776192, default 39064): 
Using default value 39064
Last cylinder, +cylinders or +size{K,M,G} (39064-776192, default 776192): 
Using default value 776192

Command (m for help): v
Warning: partition 1 overlaps partition 2.
Warning: partition 1 overlaps partition 3.
Remaining 7 unallocated 512-byte sectors

Command (m for help): p

Disk /dev/sdc: 7948 MB, 7948206080 bytes
5 heads, 4 sectors/track, 776192 cylinders
Units = cylinders of 20 * 512 = 10240 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       14670      146697+  53  OnTrack DM6 Aux3
/dev/sdc2            1563       14063      125000+  83  Linux
/dev/sdc3           14063       26563      125000+  83  Linux
/dev/sdc4           26563      776192     7496291+   5  Extended
/dev/sdc5           26564       39063      124999+  83  Linux
/dev/sdc6           39064      776192     7371288   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


iofiel% resize2fs /dev/sdc6 
resize2fs 1.41.12 (17-May-2010)
resize2fs: Bad magic number in super-block while trying to open /dev/sdc6
Couldn't find valid filesystem superblock.

Ok, not quite as planned. Parted also can't seem to cope with the funky overlapping first partition. So I'm trying fdisk. I have a dump of /mnt/storage, so I made a new ext3fs and restored the files. Reassemble partly, power up and hold breath...
chumby:~# dmesg -c
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #1 PREEMPT Tue Mar 2 16:09:35 PST 2010
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: STMP378X
...
[    1.530000] Waiting for root device /dev/mmcblk0p2...
[    1.580000] mmc0: new SDHC card at address e624
[    1.590000] mmcblk0: mmc0:e624 SU08G 3.40 GiB 
[    1.590000]  mmcblk0: p1 p2 p3 p4 < p5 p6 >
...

chumby:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/mmcblk0p2          118.2M     97.1M     15.0M  87% /
tmpfs                    29.3M    640.0k     28.7M   2% /tmp
none                     32.0M     60.0k     31.9M   0% /var
none                     32.0M         0     32.0M   0% /mnt
/dev/mmcblk0p5          122.0M      4.1M    111.8M   4% /psp
/dev/mmcblk0p6            6.9G    247.8M      6.3G   4% /mnt/storage
none                     32.0M     44.0k     32.0M   0% /dev
Ok, now I should have a new card to play with, a backup image, and the old card to boot in case of bricking incidents.

Edit: It might be safe to fix the partition table.

2011-04-02

Building some Chumby software

Some time ago I bought a Chumby One with a cracked screen (and practically dead touchscreen) to play with. Cracked chumby I can't run any of the normal Flash/Chumby stuff on it because of the screen, but it is still a functional little ARM box with a small screen, speaker, rotary controller, 802.11, USB, button etc.

Sometime back, I installed the required scratchbox, unbroke wine (SBOX_CONF_BIN_W32=0 in scratchbox-configuration) and built some stuff. Today, I finally got around to trying things out on the device.
I also took the opportunity to have a closer look at mksh.
I'll try to write down some instructions and programs for the Chumby.