Tuesday, June 21, 2005

Installing Linux on Acer TravelMate 4150

Installing Linux (Ubuntu 4.10 warty warthog) on acer travelmate 4150 notebook.

the live cd didn't work.

started installation using install cd.

installation goes fine till it hangs up while setting up PCMCIA(or so it seems).

added 'nobiospnp' and 'pci=biosirq' to the kernel options at boot(editing grub at boot time, and later modifying the /boot/grub/menu.1st file)

rebooting, again hangs up after starting up PCMCIA

rebooting in failsafe mode worked.

figured out the hald(hardware abstaction layer daemon) gets blocked and hangs up the pc when /etc/init.d/dbus-1 script is run.

edited the '/etc/init.d/dbus-1' and commented out the code that starts hald; shown below:

start_it_up()
{
if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown $DAEMONUSER $PIDDIR
chgrp $DAEMONUSER $PIDDIR
fi
if [ -e $PIDFILE ]; then
if [ ! -d /proc/`cat $PIDFILE` ]; then
log_success_msg "Removing stale PID file $PIDFILE."
rm -f $PIDFILE
fi
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
ES=$?
# if [ -d $EVENTDIR ]; then
# run-parts -a start $EVENTDIR
# fi
}

shut_it_down()
{
# if [ -d $EVENTDIR ]; then
# run-parts -a stop $EVENTDIR
# fi
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --user $DAEMONUSER
# We no longer include these arguments so that start-stop-daemon
# can do its job even given that we may have been upgraded.
# We rely on the pidfile being sanely managed
# --exec $DAEMON -- --system $PARAMS
ES=$?
rm -f $PIDFILE
}

ps:the hal script is in the events dir(and thats the only script there), so run-parts starts it up.

note: stopping hald didn't do any serious harm, these commands don't work: hald, hal-get-property, hal-device-manager, hal-set-property, lshw (but i never needed them anyway, can easily find hardware info from /proc dir).

i recommend to set the root passwd, and add user at this point.
$passwd
$useradd -m username

rebooting works fine, but no X.

ran aptitude from command prompt to finish the setting up of programs:
$aptitude

X configuration file /etc/X11/XF86Config, XF86Config-4 was fine, just changed the "Driver" entry in Section "Device" to "vesa" (it was i810 by default).

rebooting worked fine, X worked, logged in, but no sound, that was just because alsa is muted by default.

started a teminal , su(to root) and run alsamixer and turn ON the master, pcm etc (i guess 'm' turns them on)
$su
$alsamixer

add urself to the group audio:
$adduser username audio

logout and relogin, now sound works.(gxine runs everything)

to turn on the dma:

downloaded the kernel source (2.6.8.1 in my case).

modified drivers/ide/pci/piix.c, heres the diff output:

157d156
< case PCI_DEVICE_ID_INTEL_ICH6_5:
297d295
< case PCI_DEVICE_ID_INTEL_ICH6_5:
628d625
< case PCI_DEVICE_ID_INTEL_ICH6_5:
806d802
< { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20},

compiled the piix.ko module:
$make config
$make modules

copied the piix.ko module to /lib/modules//kernel/drivers/ide/pci/
(i recommend backing up the old one)

add 'piix -f' to /etc/modules above all ide-* entries.

add 'piix -f' to /etc/mkinitrd/modules

make initrd image:
$cd /boot
$mkinitrd -o initrd.img

change /boot/grub/menu.lst to affect initrd.img changes.

reboot and check for dma working by:
$su
$hdparm /dev/hdc

to get the soft modem to work:

downloaded slmodem-2.9.9

modem is agere softmodem 2.1.49 ac'97, vendor:device id 8086:266d (i guess ICH6)

slmodem worked fine after adding the vendor:device id to the slamr code(slmodem-2.9.9/drivers/amrmo_init.c code) and recompiling:

heres the diff output:

89d88
< #define PCI_DEVICE_ID_ICH6 0x266d
254,255d252
< {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_ICH6, /* 8086:266d */
< PCI_ANY_ID, PCI_ANY_ID, 0, 0, ICH4_CARD},

after instaling slmodem (modules:slamr, slusb and daemon:/usr/sbin/slmodemd, and creates devices:/dev/slamr[0-3] and /dev/slusb[0-3]), loaded the slamr module:

modprobe slamr

dmesg shows it found the device and module loaded properly
$dmesg

now run the slmodemd daemon:

$/usr/sbin/slmodemd -c INDIA /dev/slamr0

this creates the device /dev/ttySL0

used wvdialconf:

$wvdialconf /etc/wvdial.conf

it finds the modem (/dev/ttySL0) and creates the /etc/wvdial.conf file

edit the /etc/wvdial.conf file, and add the username and password for your ISP and add:
Carrier Check = no

run wvdial and it works fine.
$wvdial

Linux Rocks!