惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
Y
Y Combinator Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
博客园_首页
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
宝玉的分享
宝玉的分享

Posts on Noah Bailey

How to turn anything into a router Deploy to Cloudfront from GitHub using OpenID Connect Backup Postgres databases with Kubernetes CronJobs The spelling error made 200 billion times a day Restarting Kubernetes pods using a CronJob You've just bought a new domain. Now what? Who Sawed My Motherboard??? Linux on the P8 Aliexpress Mini Laptop Recovering Mysql/Mariadb after a nasty crash Using EXIF data to pick my next lens Converting and developing RAW photos on Linux automatically Thank you, 2016 iPhone Don't Make It Work Self-hosted Surveillance with ZoneMinder Backups, Monitoring, and Security for small Mastodon servers Block web scanners with ipset & iptables Executing commands over SSH with GitHub Actions Debian Sid on encrypted ZFS Protect your dangerously insecure redis server Debian: the luxurious boring lifestyle Monitor radiation with a Raspberry Pi Simple Linux server alerts: Know your performance, errors, security, syslog, and security NUC crashes on debian 11 - How I fixed it Basic Linux server security with fail2ban, ossec, and firewall Windows 11 will create heaps of needless trash Domesticated Kubernetes Networking The Cursed Certificate Our mostly disposable and entirely stupid world Trying out OpenBSD (as a Linux geek) Making VoIP Calls with Antique Rotary Phones
Installing Gentoo on a vintage Thinkpad T60
2020-11-13 · via Posts on Noah Bailey

I installed Gentoo Linux on my vintage Thinkpad. This particular device has a rather colourful history. In mid 2015 I recovered it from an e-waste pile at my workplace and brought it back to life. In the years since, it’s been a playground of sorts. In five years it’s had four editions of Windows, three versions of BSD, exotic operating systems like Redox and ReactOS, and of course dozens of different Linux distributions. For the last couple weeks I have been using the system to experiment with Gentoo on a lower powered system.

Now, typicaly people use Gentoo on systems where power is in abundance. It seems like a natural fit, since compiling all the software yourself requires a fast computer to finish the buidl in a reasonable time. On the other side of the coin, slower computers can also benefit from natively built software. If you have the patience, there are some benefits to installing only what you need and removing unneeded features at build time.

To keep some sanity, I opted to use binary versions of some packages:

  • sys-kernel/gentoo-kernel-bin
  • www-client/firefox-bin

Between the two, I could save about 10 hours of compile time! And, frankly… I suck at compiling kernels. I seem to frequently get lost in menuconfig and miss important items. That’s one thing I’m happy to leave to the experts.

And of course, just for fun I decided to install chromium from source. Chromium (the open-source core of the Google Chrome browser) is absolutely massive, being quite possibly one of the most complex pieces of software ever made. Compiling Chromium is no small feat. Just look at Chromium’s build infrastructure, https://www.chromium.org/developers/testing/chromium-build-infrastructure/tour-of-the-chromium-buildbot

The specs of my trusty rusty T60 are quite palty. With a meager 3 GB of memory (4G installed, but the BIOS only uses 3!) and a once mighty Intel Centrino T5600 (1.83 GHz) dual core processor, nothing comes easily. My first attempt at building chromium had only the 3 GB of system memory and a small 1G swap file, and after about 8 hours ran out of memory invoking OOMKiller and failing to build.

Not to be bested, I dd’d the drive to an SSD and carved off some drive space for a larger swap partition rather than a small swap file. With 10Gi, I felt prepared.

$ free -h
              total        used        free      shared  buff/cache   available
Mem:          2.9Gi       112Mi       1.8Gi        14Mi       997Mi       2.5Gi
Swap:          10Gi        63Mi        10Gi

After more than 72 hours, this build failed as well. After grokking some of the compile output I opted to disable some of the chromium features using USE flags:

/etc/portage/package.use/chromium.conf

    www-client/chromium -hangouts -proprietary-codecs -widevine -official

By disabling some proprietary codecs & DRM and google integration, the build should be substantially shorter and less likely to fail. And indeed, the next attempt was successful!

$ sudo genlop -t chromium                                                                            
 * www-client/chromium

     Thu Nov  5 06:56:54 2020 >>> www-client/chromium-86.0.4240.111-r1
       merge time: 2 days, 17 hours, 31 minutes and 12 seconds.

After the install was complete, I can say that chromium felt much snappier than the binary packaged version and appeared to use much less memory. Of course, I did end up using the binary package for Firefox instead of chromium as it fit nicely in the 3G of system memory.

So, while this wasn’t exactly a groundbreaking project, it was interesting to see just how important swap space is. And of course, the zen of installing massive software products.