Page 1 of 1

Debian Install Help

Posted: Mon Aug 31, 2015 11:32 am
by Sense
Would like to dual boot Debian "Jessie" and Windows 7 on a T420 machine. From what I researched so far, it seems like the wireless card will not work. My computer also has the NVIDIA NVS 4200m which is known to be somewhat problematic. Anyway, any tips on installing Debian would be great! I will be turning this into a guide later so it saves time and the trouble of trial and error for the next Debian user on a Thinkpad.

Current reference:
http://www.thinkwiki.org/wiki/Installin ... nkPad_T420
http://www.linlap.com/lenovo_thinkpad_t420
https://wiki.debian.org/InstallingDebia ... 420/jessie

Re: Debian Install Help

Posted: Mon Aug 31, 2015 10:01 pm
by axur-delmeria
I've installed Debian Jessie on an X220, which has similar hardware to your T420. (except for the NVS 4200M).

Before even inserting the Debian installer disc, make sure that there is enough unpartitioned space in the hard drive.
By default, Windows uses up all disk space, so you need to shrink it.
Windows Disk Management has that capability, but it's best to make a backup of your filesn, then defragment your HDD before doing so.

Intel wifi cards work on Linux, but the drivers need to load the firmware first. Since Debian's license and social contract prohibit it from including close-source software (the firmware) in its installers, you need to use the LAN port during the installation. Alternatively, you can put the need firmware files on a flash disk and tell the installer to load it from there, but when I tried this, it didn't work. Maybe it was because my disk had other files in it.

IMO the trickiest part of the installation is the partitioning.

These days I make a 16GB BTRFS partition with a mount point of /, a 4GB swap partition (or make it equal to your RAM size to enable hibernation), and the rest for the /home directory. The /home directory is the equivalent of "Documents and Settings" in Windows. It's generally a good idea to put it in a separate partition to make it easier to upgrade to a newer version of Linux in the future.

If the installer asks if you want to use a network mirror, answer "Yes". It will suggest Debian mirror sites nearest to your country, but you can choose a different one. Using a network mirror will let Debian check if there are any updated packages and install them as needed. Having a fast internet connection is recommended.

Once you have Debian up and running, you can install the firmware using the package manager named "aptitude". Search for "iwlwifi" and install the package named "firmware-iwlwifi".

Alternatively, open up a terminal window, use the "su" command to become root, then type:

Code: Select all

apt-get install firmware-iwlwifi
To install the firmware. I don't remember if you need to restart the computer or not, but you can try unloading the intel wifi driver:

Code: Select all

modprobe -r iwlwifi
Then loading it again:

Code: Select all

modprob iwlwifi

Re: Debian Install Help

Posted: Tue Sep 01, 2015 2:42 pm
by Sense
Thank you for the useful information! Will work on this soon and post results!

Re: Debian Install Help

Posted: Fri Sep 11, 2015 1:12 pm
by Sense
Wow the partitioning was a pain. Since I wasn't starting fresh and Windows 7 was claiming ownership of the entire hard drive, I used Disk Partition that comes with Windows. Highly discourage using any other partitioning tool because of how windows files are configured. At least in windows, the shrink volume function stopped me from destroying the immovable files. You can try defragmenting, but it won't move the immovable clusters.

The solution:
1. Make a backup in case of data corruption, boot failure
2. Disable System Restore, delete past restore points
3. Disable Paging from Advanced System settings
4. Disable hibernation
5. Defragment your hard drive (this time it should move everything to the beginning)

Doing the above allowed me to shrink the volume.

Personally, this linux environment will be for development and nothing else so I gave it 20gb, 4gb for swap and the rest for /, /home. I'm sacrificing hibernation here since I have 16gb ram, I would have to give up ~18gb just for that feature. Not a worthy trade off in my case.

I kept most of the settings to default for my basic needs. I chose to install both GNOME and xfce to see which one I like more. I am favoring GNOME at this time.

Everything worked straight away except wireless and trackpoint scroll button.

Enabling Wireless
I decided to install the wireless firmware manually as axur-delmeria instructed. I did have to edit the sources.list:

Code: Select all

su nano /etc/apt/sources.list

Code: Select all

deb http://ftp.[your country mirror].debian.org/debian/ jessie main contrib non-free
By default, the above code won't have contrib and non-free. So all you have to do is just append it at the end of that line.

After that, follow axur-delmeria's guide on installing firmware-iwlwifi package.

Wireless should work without a problem :)

Enabling TrackPoint Middle Scroll Button
http://www.thinkwiki.org/wiki/How_to_co ... TrackPoint
I used the evdev driver and it worked perfectly.

Some recommended packages:
thinkfan - this monitors your sensors and adjusts the fan speed (installation is quite complicated but if anyone is interested, I can write a guide.)

laptop-mode-tools - power saving tools for when operating in battery

Special Thanks:
axur-delmeria,

You were a life saver in this installation. I'm updating this post via Debian! Thank you!

Re: Debian Install Help

Posted: Fri Sep 11, 2015 9:45 pm
by axur-delmeria
I'm glad to have been of assistance. :D

Sorry I forgot about adding contrib and non-free. :oops:

Re: Debian Install Help

Posted: Thu Oct 22, 2015 5:26 pm
by Madara-san
I'm interested in thinkfan, so if it's not a problem please write that guide. Currently working on a fully functional Debian installation on a T43.

Re: Debian Install Help

Posted: Fri Oct 23, 2015 1:13 am
by Sense
Madara-san wrote:I'm interested in thinkfan, so if it's not a problem please write that guide. Currently working on a fully functional Debian installation on a T43.
Debian is great! I will work on the guide this weekend.

Re: Debian Install Help

Posted: Thu Nov 05, 2015 5:24 pm
by jaspen-meyer
Madara-san wrote:I'm interested in thinkfan, so if it's not a problem please write that guide. Currently working on a fully functional Debian installation on a T43.
You can check my posts, I wrote something short about how to set up fan control. I am not using think fan though.

In Xubuntu (debian based) I run
sudo apt-get install lm-sensors fancontrol

then add this line 'options thinkpad_acpi fan_control=1' to the following two files:
/etc/modprobe.d/options
/etc/modprobe.d/thinkpad_acpi.conf

try loading the modules:
sudo modprobe -r thinkpad_acpi && sudo modprobe thinkpad_acpi

reboot

configure the fan's rules
sudo pwmconfig sudo

start fancontrol
service fancontrol restart