Thursday, October 16, 2008

Debian Lenny on Toshbia Satellite L305, or A comedy of errors

I got a new laptop a few days ago, the Toshiba Satellite L305. It's pretty cool. My first goal with it was to split the default Vista partition in half and dual boot Vista/Debian. Dual booting if only so I can run Photoshop and the like on the Vista side. Plus, I suppose it wouldn't hurt to actually dive in and see what all the anti-Vista stuff is about.

Step one: Repartitioning
Vista claims it is easy to shrink a partition. No, it is not. The shrink partition dialog kept insisting that only 7GBs could be pulled out of the partition. There were a bunch of steps I found online that required disabling system restore, page file, etc. etc. but even after all that I could only get 7GBs out of it. The solution was to use the Gparted Live CD. I ended up having to download a new version because the old (and it wasn't even THAT old) version couldn't load the hard drive. I shrunk the partition in half, and formatted a few ext3 partitions and a swap for my impending Debian install. After shrinking the partition I ran the Vista recovery CD to regenerate the Master Boot Record. This is *required* to boot back into Vista (at least before installing grub.) I did this anyways in case I couldn't successfully install Debian, and also just to make sure the grub installation found Vista.

Step Two: Getting the right Debian installer
I happened to have a CD of Debian Lenny beta 2 from my desktop's install, so I threw it in and went to install. The problem was that the installer couldn't detect some of the hardware. After a lot of research, I discovered that the hardware in specific was my network adapters. I tried downloading a weekly build CD overnight and that could not detect the hardware either. Turns out the solution was to boot the net installer from a USB drive. The instructions came from a wiki entry on how to install Debian to an Acer Aspire One, as it has the same two network interfaces as the L305.

First download the boot.img.gz and the daily build of the netinst.iso.

Insert the USB drive (with at least 256MB) and find it in /dev. Make sure this is the right device, or you might lose information on your other drives. Mine, for example, was /dev/sdc. Make sure any files are backed up, as this will erase anything on the drive. As root, run the command
zcat /path/to/boot.img.gz > /dev/sdc
Then mount the flash drive and load the netinst.iso onto the drive.

Step Three: Install Debian
With the bootable USB drive, I was finally able to install Debian. Put the USB drive in, turn the computer on and press F12, which will then display different devices to boot from. Pick USB Memory, and the Debian installer should boot. Though the network devices will be found, they may not be usable unless you install with acpi turned off. I forget the exact way to do it, but the help, boot options menu gives an example that happens to exactly what we need (I think it is "acpi-off", though the Aspire One page says different.) The Debian install will now commence flawlessly. You should have a wired connection during this isntall, because the WiFi won't work right away, and since it is the net installer, a functioning network is extremely important.

Conclusion
The downside to my (eventual) Debian install is that perhaps through problems with install (perhaps turning off acpi during install?) or perhaps with problems with me, I can't access any of the power fucntions a laptop really need (batery power, CPU scaling, etc.) So while I was successful eventually, all was perhaps for naught. If you successfully install these thigns on the Toshiba Satellite L305 let me know, but for now I'm going to try out Ubuntu (8.10 beta) to see if it configures anything better for me.

5 comments:

Unknown said...

I gather that you already have stuff up and running smoothly. I recently installed debian on my L305 and put my steps on my website

http://personal.bgsu.edu/~inathan/Toshiba_Satellite_L305/

Please let me know if you have any improvements :)

Swinky said...

nmi,

Your guide is really good! I tried installing Debian Lenny again on my L305 again after I had given up and went to Ubuntu, and it worked better, but I still had issues with it, personally. Good call on installing the new video drivers, it was one of the things I never got working.

I do have one question, though: You mention that the brightness and quick keys work for you, did you have to do anything to get them working for you? Under Lenny, I never got them to work. Through from the picture on your guide, I know that we have different models of the L305 (There are quite a few different ones if you look at the site, and I never remember which model number I have.) The ONLY time I have gotten them to work (as well as the fan) is with the kernel that comes with the beta version of Ubuntu 8.10 (newer versions don't work) and I have yet to figure out what is causing that.

Unknown said...

Things working smoothly on the Toshiba Satellite L305-S5921:
http://www.fickleverbosity.com/2009/02/23/ubuntu-linux-on-toshiba-satellite-l305-s5921/

ad13 said...

Hi,

Been reading your blog in an attempt to solve my fan/acpi problems on a toshiba L300. I tried adding the line acpi_osi="Linux" to menu.lst and that doesn't work either. I am running debian lenny. Would you say the fan problem is more easily fixable (/fixable at all!) on Ubuntu or on debian? and if there is anything I could do at all to solve the fan problem? Omnibook module also fails. :-(

Thanks

Swinky said...

Hi ad13,

In my experience, the hardware in my laptop (L305) is hard to work with in Debian because of how new it is. I was using Debian Lenny, which was the testing version at the time I wrote this article, but had various problems with different hardware including the onboard video, wireless, and the fan.

Although I really liked Debian, I switched back to Ubuntu due to these problems. Ubuntu 8.10 still had some minor issues but I find that 9.04 really bridges the gap and finally makes Linux a viable option on these laptops.

The acpi_osi="Linux" trick works for me on Ubuntu 9.04, but have heard varying results depending on the model of laptop and the distro/kernel you are booting.