Skip to content

Instantly share code, notes, and snippets.

@PC-02

PC-02/blog.md Secret

Created June 23, 2021 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PC-02/9720230ea9159a5b16d4f0af18a0df47 to your computer and use it in GitHub Desktop.
Save PC-02/9720230ea9159a5b16d4f0af18a0df47 to your computer and use it in GitHub Desktop.
title subtitle date lastmod draft author description page upd authorComment tags categories hiddenFromHomePage hiddenFromSearch resources featuredImage featuredImagePreview toc math license
Debian on a Thinkpad
2021-06-20 16:30:07 +0400
2021-20-06T16:30:07+04:00
false
Pranav C
Going over setting up Debian & useful software
theme
wide
Linux
false
false
name src
featured-image
featured-image.png
featured-image
featured-image
enable
true
enable

Why ThinkPad?

I recently picked up a new laptop, after much consideration and specs comparing I decided to go in for a ThinkPad. The biggest reasons I opted to go in for a ThinkPad are because of reliability, well taken care of ThinkPads are known to last extremely long. ThinkPads are also well suited devices to run Linux distros on.

This guide will specifically go over my experience setting up Debian on a ThinkPad e14. The basic specs of the model I will be using are,

  • Intel Processor
  • AMD GPU
  • 1 TB HDD
  • 256 GB SSD

Why Debian?

I personally believe Debian brings about a certain level of stability to it not found in a lot of other linux distros, which to me is the most important for a daily driver, even if it means extra configuration. I also am familiar with Debian as my older laptop ran a Debian based distro primarily.

Setting Up

Installing

Firstly we will be needing a USB, make sure you clear out any important data as this USB will be flashed, ie, turned into an installer for Debian. I recommended using this software to flash the usb, its very straightforward.

We can now download the OS iso file, the link can be found here. After the download is done with you can flash the iso image onto the USB. Before you start the installation make sure all important data is saved on a cloud or separate disk, changing an OS wipes all data off of a computer.

Reboot your computer and head to the boot menu (should show up after pressing the F11 key during startup), select the option to boot from the USB drive.

Partitioning

The installation is pretty simple up until here. Having 2 drives makes things not as simple, for partitioning select the manual option, I have personally opted to use the SSD for / and the HDD for /home, for the SSD the partitioning would look something like this

SSD

Mount Size
EFI 512M
SWAP 32G
/ Remaining

HDD

Mount Size
/home Entire Disk

The EFI is needed for booting, the recommended swap space is double the RAM, I opted for an easier partition by giving '/' the remaining under the SSD and letting '/home' take the entire HDD disk.

Driver Fixes

Before attempting these fixes make sure you have an ethernet connection, WiFi doesn't seem to work out of the box for this model, it will be fixed later in the tutorial.

On booting up after installation one would see nothing but a cli, this is because Debian while bringing along stability is more suited towards older hardware, to make sure we have the right drivers for the hardware we're using we need to opt for debian bullseye & its backports. Initially I used debian buster backports here which does work well enough however I ran into an issue with my CPU and GPU not using the right rendering drivers, this is because of the outdated mesa library in debian 10, which is not compatible with a 10th gen Intel CPU, so we will be using debian 11, add the below sources to /etc/apt/sources.list and you may comment out the other sources.

https://gist.github.com/1bb826af1fc726a88e98999c506cf4d1

Now just run

https://gist.github.com/996e688c8729e67dcdf2ed8b3ff3cc37

These should give you a working desktop environment as it upgrades to a newer kernel, however we still need to fix a few things, namely the WiFi and Bluetooth, we also have the finger printer reader not working, however I could not find reliable trusted sources to provide drivers for it and personally to me, I don't mind not having a finger print reader.

{{< admonition >}} WiFi {{}}

The fix for the WiFi drivers online recommends downloading the drivers via an apt get install, however none of those solutions worked for me, what did work was manually downloading a driver, they can be downloaded from here, to find which version would be best for you in the terminal run,

https://gist.github.com/44cbdb3072178a6a80f5d499e73dc6de

scan the output for errors regarding iwlwifi, it should tell you which version it's specifically looking for, after downloading the required version place the file under /lib/firmware/.

{{< admonition >}} Bluetooth {{}}

The fix for bluetooth is similar to wifi, you'd be looking for errors regarding ibt after running dmesg, the download links can be found here, make sure both the .sfi and .ddc files are downloaded, then place the files under /lib/firmware/intel/.

After doing both of the above restart the system and both Wifi and Bluetooth should now be working.

Recommended Software

These are optional software that I recommend using, I've personally found these to be helpful with overcoming some of the shortcomings with using Debian as a daily driver,

  • LibreOffice, essentially the open source version of the Microsoft Suite, very useful for report/ presentation making.

  • QEMU/KVM, virtualisation software that is very useful if one would want to run Windows specific software, also helpful to test out experimental/ unstable Linux distros.

  • Brave, a web browser that I personally like, simply because I'm the kind of person to never close tabs and I've found Brave to not hurt my computer as much when I do so.

  • Timeshift, backup software for linux, the last thing someone ever wants is needing a backup when its too late to make one.

There are a lot of appearance customisation options that can be done which I will leave for you to decide.

Conclusion

So far my experience with the OS has been quite good, I have found a few issues with headphone mics that seem to be quite random but am not sure whether that is a software issue or a driver issue. I do recommend using this as a daily driver only if you don't mind tinkering with your computer's software to get things fixed. Regardless being a linux distro I highly recommend uploading backups of the system to an external device due to the unpredictable nature of the OS, I may later on cover setting up a storage system on a local network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment