Today I installed Linux Mint 21 "Vanessa" Cinnamon edition on my Lenovo ThinkPad T460p. I purchased this T460p refurbished earlier this year and I had Linux Mint 20.3 MATE on this machine before the new installation today. I only had the MATE installation for evaluation and therefore no data to worry about before the installation. I have the Mint 20.3, Cinnamon and Xfce, respectively on other machines and wanted to explore MATE as well. I can use all three of them, but my decision now is to use Cinnamon as primary choice on a machine like this that can manage Cinnamon without ant problem. This machine is intended to be a daily driver, or almost daily driver.

Main characteristics of this machine:

  • Intel Core i7-6820HQ CPU @ 2.70 GHz, 4 cores, 8 logical threads
  • RAM 32 GB
  • SSD 1000 GB
  • Graphics Nvidia GeForce 940MX + Intel HD Graphics 530
  • Date code 16/12 (so manufactured 2016)

I prepared a 4 GB USB-stick as a bootable media already a few weeks ago. I had first downloaded the ISO image and verified the integrity and authenticity. All with Linux Mint web site as starting point.

I have installed Linux Mint several times before. However I am still uncertain when I do the installation process, although Linux Mint has a good step-by-step-installation.

I started the Live-USB-stick, in the Live-session and from there I went on to the installation. First time, I terminated the process. I thought I was stepping back before any installation had started. But apperently the old Linux Mint 20.3 MATE was already gone when I started again...

I preliminary want to have the entire SSD drive encrypted. Furthermore I want to have the home catalog on a separate partition. I plan to only have one operating system installed. It is here I get confused in the installation, how to both choose encryption and partitioning. I also consider the partition creation procedure in the installation is a unclear.

My installation today: I selected LVM (Logical Volume Management), a precondition to select encryption, which I also selected. Before this, I also selected to install multimedia codecs. In addition a couple of settings, like language.

This means that I installed without creating the separate partition for the home catalog. Nor did I create a swap partition.

In the installation process it looked to me as swap partition was going to be created automatically with my settings, but I cannot see any afterwards. Maybe swap was not created because system decided it was not necessary (32 GB RAM), or I have to look closer in eg GParted partition tool.

Is it possible to move /home to a separate partition post-installation? A swap-partition should be doable create post-installation. Now I will read and review what I want to do. Maybe I will run installation again, maybe not.

When Linux Mint boot, there are a lot of text scrolling before login, was so also with the 20.3 MATE installation. I wonder if any of this is important to fix, or possible to fix as it is annoying. Maybe I can figure out from forum discussions.

After installation and reboot, I installed all updates.

I also updated the grub-file (plus "sudo update-grub" command in the terminal), so the Grub menu is shown a few seconds at start up, due to my experience a few days ago: Login loop forever - how I break it.

The installation is fast, it takes only a few minutes on this machine. What take time is to decide what I want to do, and what alternative means. Also the update and upgrade of all packages after installation were completed within a few minutes.

Next is to review and ponder how I want to have my installation, like partitions and encryption. Maybe new installation Then it is time to configure drivers and change settings to be as I like them, etcetera. And let machine run to see how it works. When I am satisfied, it is time to install more software, copy data and use the machine more for real work.

The walk is ongoing.

Henrik Hemrin

28 August 2022

What happened

A few days ago, I started this machine. The Linux Mint login screen opened as usual. I typed my password, it was accepted. But instead of loading Linux Mint, I was black shortly before it went back to the login screen. I tried several times. It was not wrong password. I could not come further than the logon screen.

Equipment

  • Lenovo ThinkPad T460p
  • Intel HD Graphics 530 and Nvidia GM108M (GeForce 940MX) graphics
  • Linux Mint 20.3 MATE
  • Nvidia proprietary driver installed
  • Home directory encrypted
  • Grub menu hidden - now shown at start up

My work to solve the issue

First, I want to mention that I currently use this machine for testing how I like the MATE version of Linux Mint. It means I do not have any data to loose.

I started by reading Linux Mint forum and other sources. I am far from the first one having this eternal loop. I learned it can happen of several reasons: Memory full (hard drive/SSD), wrong Nvidia-driver, that it often goes wrong at updates etc. I recall I shifted from Xorg driver to Nvidia proprietary driver not so long time ago.

If I could reach the Grub menu at start, I could start via the Advanced options and possible solve it from that way. Because I only have one operating system installed, the Grub menu is hidden by default. I read Grub can be started by hold down Shift at start up. I could not get that work. There was also another suggestion with CTRL + ALT + Delete that also did not work for me.

I also read about login via a termial screen: at the normal login screen, press CTRL + ALT + F1. Or, as it is needed on my machine, press CTRL + ALT + Fn + F1, at the same time. And this works, I come to a terminal screen with login.

After a few trials, I recall my username in not the same as display name. Eg on the Mint login screen, I see user "Henrik Hemrin", while I had "henrik" as my user name on this machine. With the correct user name, I can login. I try commands such as ls and cd, I can list directories and files. Note - I only have this terminal window, it will not start the desktop. Maybe there is a possibility to start and launch the ordinary desktop with a command that I am not aware of.

I decide to update and upgrade all software, hoping this will solve it.

So in this login-terminal window I type the commands "sudo apt update && sudo apt upgrade", and after entering my password are many updates and upgrades executed. After this, I turn off the computer with the "poweroff" command.

Then I try a normal login, only to find out the problem is not solved; the login screen is still in the loop.

I have a USB-stick with Linux Mint 20.3 MATE iso on it and start the live session. It's good to always have a Live-usb at hand. This means, instead of running the operating system I have installed, I ran the operating system I have on the USB-stick.

I start the GParted software to check if the EFI System Partition is full, but it has a lot of space. And no overflow in any other partition.

I do really suspect the NVidia graphics.

From the Live-USB I run the Boot-repair tool. I try again to do a normal login, but the login loop is not solved.

I read more, test some more things. But I am more and more convinced I want to launch the Grub menu. If I edit the Grub file, I can get it to launch. But how to edit the Grub file - how can I access it under these circumstances?

The "terminal login" to laptop via CTRL + ALT + Fn + F1, cannot really start any tool, it seems. I install Gedit, I can install it, but I cannot start it. Gedit is a text editor. Maybe there is a way to get a text editor working here, but I did not find out.

Instead I start the Live-USB again. I mount the ordinary SSD in the file manager. In the file manager I go to the file /etc/default/grub. After login as superuser in the file manager, I edit the file grub in text editor:
I write "# " at the beginning of the row for the command GRUB_TIMEOUT_STYLE=hidden and Save. This means that the command on this row is neglected.

In the terminal I execute the command "sudo update-grub".

I restart the machine, and finally, the Grub menu is displayed before login!

One remark: Instead of editing the file as above, I could probably have done it with the tool Grub customizer. I did not have it installed on my Live-USB, but it should have been possible to install.

In the advanced Grub menu, I have three Linux kernels to choose between:

  • 5.4.0-124
  • 5.4.0-121
  • 5.4.0-91

I start with them, one by one, in normal mode. 124 is the normal kernel that gave the loop issue. 121 gives same loop issue. But with 91, my login works and the desktop starts as normal!

In Linux installation guide and other soruces, I read about how to solve issues with NVidia at login. For the Grub file, there are suggestions to change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="nomodeset". I do the change, execute in terminal window the "sudo update-grub" and try again to login with the latest kernel 5.4.0-124, but it does not help.

I also try "Try nouveau.noaccel=1 instead of nomodeset.
After the installation, use Advanced Options ‣ Recovery mode from the boot menu and choose resume." But it does not solve the problem.

I later find also a third one suggestion how to edit the Grub file, suggested in the Linux 21 release notes, still to be tested.

But for now, I change back to normal Grub commands. Instead I login with the older Linux kernel 5.4.0-91 and open the Driver manager. I test to change from Nvidia-driver 515.65-01 to Nvidia-driver 510.85.02.

With this change, I can start the machine with the latest kernel! It clearly indicates my trouble is related to the Nvidia-driver in combination with the Linux-kernel.

However, a quick look with the Intel graphics tool, maybe this different Nvidia driver is not working properly. I do not dig into this further. Instead I switch to the open driver xserver-xorg-video-nouveau version 1:1.0.16-1 for Nvidia graphics card.

I will probably not trouble shoot this any further. I have found out ways to solve this issue, if it occurs again. The reason I will not investigate further is that I will soon make a fresh install of Linux Mint 21 Cinnamon. Linux Mint 21 uses the Linux kernel 5.15-series as default instead of the 5.4-series that Linux Mint 20.3 uses. So, I will save my efforts to get the new installation up and running instead. But first, one more thing about encryption.

Encryption

In the current installation I have the home-folder encrypted. The home-folder encryption has a known issue that it will not encrypt again. Linux Mint writes: The move to systemd caused a regression in ecrypts which is responsible for mounting/unmounting encrypted home directories when you login and logout. Because of this issue, please be aware that in Mint 20 and newer releases, your encrypted home directory is no longer unmounted on logout: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1734541.

My preliminary plan is to use full disc encryption when I install Linux Mint 21 Cinnamon.

But how does it work to decrypt from a Live-USB? I have a Linux Mint 20.3 Xfce installed with full disc encryption. I start that machine with the same Live-USB as before. The disc is password protected. I can login to the disc, and open files. So, it seems as it is possible to open an encrypted disc via Live-USB. Good to know.

Wrap-up

Always keep fresh back-up of data you do not want to loose.

Keep a Live-USB at hand so you can come into the computer that way.

It can also be useful to be able to connect any device to internet. To keep a wifi-password available one way or another can be helpful. I often keep a relatively simple password I can remember for my guest network that I use at these occasions.

Keep the Grub-menu active at start-up, or learn how to open it via eg some key combination. The Grub-meny can be set to only a few seconds. So Grub will only delay start-up a little.

 

Henrik Hemrin

24 August 2022

Walking to Linux is about computers, how they operate, how to use them and in particular under a GNU/Linux operating system. It is egocentric about my own findings and escapades.

But before we start the walk, I want to tell you about what I have done in my computer days. If you are curious, please join me on my memory lane walk when I retrace my experiences of computers over the years. Bear in mind that facts may not be complete or correct, as memory tend to be more selective than we often believe.

I must establish I am not a professional nor a hobby expert on computers in any way. I have "always" been interested in computers but I have never been spending a lot of time nor been one that dare to test everything possible with computers. I have spent time with computers, but never dedicated all of my time to understand them. Having said that, I have probably learned one or two things over the years.

When I was born, computers had existed for many years. But not to be used at home. As a reference on the time line, we had one TV-channel when I was born. I remember when we later, I was about five years old, got the second TV channel and for the additional channel we had a grey box so the TV set could manage the two channels on two separate frequency bands - which also required a second antenna on the roof top.

Maybe my first electronic calculator, a Citizen 800D, should be counted as my first computer.

Citizen 800D calculator [photo: Henrik Hemrin]

The machine that definitely was a computer was my Sinclair ZX80. It was launched to the market 1980, and most likely it was during that year I bought it. I bought it as a kit to solder together myself. I was not at all new to soldering, but I had never soldered anything this complex or with so narrow lines. Maybe I should have had better soldering equipment, like a smaller tip for the soldering iron, than I had. By the way, this was at the time when components were hole mounted, surface mounted components were still to come, at least in any volume. However, the computer did not work when I was ready. I had to hand it in for repair, the repair shop fixed it and I could use it. It was some sort of soldering issue, whether shortcut or disconnection I do not recall.

The ZX80 came with 1 k RAM (I do not remember how many bites). This memory was shared between the program code and the graphics. The screen to use was the ordinary TV-set, the ZX80 had a TV tuner built in and the TV-set had to be tuned to this specific channel (frequency). Manual frequency tuning was the normal way to tune in ordinary TV channels as well. This shared memory was a clever solution to reduce cost. But a drawback was that when the code became longer, and longer, the presentation on the display became shorter and shorter. And finally when adding more code, the screen became black because there was no memory left for the presentation. It meant I had to delete rows of code in blindness, and if successful, memory became free so there was something visible on the screen again.

The programming language was Basic, a very popular language at the time, and I learned it decently well on a very hobbyist level.
When power was turned off, the code that had been written in the RAM also disappeared. An external memory was needed if I wanted to store the code. Most commonly storage device was with a normal analog cassette tape saved in a normal cassette tape recorder/player. It was somewhat complex to save and also to load, but I think I managed to get it working. It was important to have a backup - write down the code on paper. As far as I recall, Sinclair had a printer, but I never bought it. But I did extend the memory. The 1 k memory could be extended with another 16 k, a bulky extension connected at the I/O interface on the back side. 16 k was so much more! I also upgraded my Sinclair ZX80 with a new processor, so it became a Sinclair ZX81. With the upgrade a new "keyboard" was included.

Sinclair ZX80, upgraded to ZX81 (incl new keyboard plate) and extended with 16 k RAM at the back end [photo: Henrik Hemrin]

When I bought my Sinclair ZX80 I was a student at Teknikum, the technical "gymnasium" school. At Teknikum we had some lectures with the Swedish Luxor ABC 80 computer, also using the BASIC language. I think I bought my ZX80 in order to help myself to test and understand so I could follow the lectures beside general interest in electronics and computers. ABC 80 was an extremely successful computer, of course a dream to buy, but far too expensive. It had a real keyboard and a dedicated monitor. Like the ZX80, only black and white graphics. And graphics, that means the ASCII-symbols, I do not remember how many. ABC 80 was not the smartest computer for calculations, it could only count with a few decimals. We learned the trick to multiply first and then divide to get more decimals in the result. We learned to make the entire calcualtion at once, and I think also to consider in which order each calculation step was executed, all to get as good accuracy as possible.

Those my early days with computers gave me a basic knowledge of coding, how to think, write and think the steps in a flow chart. I think I learned to understand to have sub processes for tasks you needed repeatedly, a string that the main code could call when needed. The very limited memory also gave me an understanding it is useful to code smart, with so little code as possible to reach the goal.

Next in my computer history must have been when I joined Ericsson 1985. At my office, we had a 3270 (I think) main frame terminal, an Alfaskop terminal, in our room. We had one Alfaskop terminal for about five persons. Here we could access several internal data bases. We also had an internal mail system named Memo when I joined or soon after, also accessed from the Alfaskop. Ericsson was a big international company also at that time, so with Memo I could reach people world wide. I also remember I used Memo as a kind of word processor to store a project work digitally. My manager suggested we should login to Memo and check once a day. The secretary had a big Xerox machine with those big floppy discs in size like an LP record where she could write documents. She could also send Telex, the Telefax machine did not arrive to our office until some years later. We also upgraded our classic type writer in my office room to an electrical Ericsson type writer with built-in memory.

Already when I started at Ericsson we also had computers in our labs for measurements and calculations. The Hewlett Packard HP 85 was a popular computer in the lab. It also used the Basic language; the HP-Basic dialect. HP 85 was a very compact computer - a keyboard, a small screen, a tape recorder for storage (with special very expensive cassettes) and also a thermal printer were included in this compact computer in size of a bigger type writer. Peripherials, like instruments, were connected via HP-IB bus cable.

At Ericsson we also had some bigger more advanced computers in the labs. I learned a little about them, but never really used them. Now I am uncertain if it was Cobol, C, Basic or what language they used. I vaguely recall I had some studies in one non-Basic language. But maybe it was only Basic I used and studied at work, including a course at Hewlett Packard at their Kista-Stockholm office.

Some years later we get a PC at the office, some time after the managers first got one. I do not recall brand, but probably it was a Nokia or Ericsson. First we had one common at the office, placed I think at the side of the Alfaskop. At some stage I got a PC on my desk, maybe without any network connection. I think the PC at the beginning was mostly for word processing, replacing the type writer. We used WordPerfect when I started processing words.

I also remember we later got a Sun workstation, ie Unix based language. And I remember when we at the office got a first Sun with colour screen.

My first PC at home was, I am almost sure, a Nokia (or Ericsson) beige white-skin-colour PC that was no longer needed at work. It had DOS operating system with a b/w screen, and no internet connection.

My second PC at home was also, as far as I remember, a left over from Ericsson. But this time maybe with a colour monitor and likely Windows 3.0 or 3.1 operating system.

Maybe my third PC at home was one I bought myself. The first PC I bought was an IBM Aptiva with Windows 95 operating system. And now, internet connection had arrived! The IBM Aptiva had a built in telephone modem - I think 14.4 kbaud transmission rate, but it could have been 28.8 kbaud. I soon bought an external of double speed, whether it was 28.8 kbaud or 56.6 kbaud. At the end it was 56.6 kbaud. These were the days when the internet connection was using the same line as the normal land line phone and it could be hard to reach some people on phone, as they were connected to internet for such a long time every day. This was also long before any ordinary person (or in business) had a mobile phone.

At work I used a Sun Unix Solaris work station for several years as my daily driver. I learned some about Unix, but never deeply. Sun Unix workstations were built to be used in a network, but Windows was not really designed to work in a network. Some years later PC came to dominate at my work and eventually I had to stop using Unix.

And myself, at home, upgraded with new PCs, when needed.

I also bought a Psion Series 5 handheld PC using Symbian operating system. It was a smart, great small PC. Symbian was clever, it started in no time in comparison to Windows and when using eg the word processor it saved automatically. Psion with Symbian was stable and did not crash like Windows tended to do.

Psion Series 5 [photo: Henrik Hemrin]

I heard about Linux very early at office, more or less when Linus invented it. It was at the time when I was using Unix. I vaguely recall a colleague started to play with it. I came as far as I bought a book on sale about Linux; about Red Hat Linux and it included a CD I believe. I never installed it, but curiosity for Linux was born. At the same time I bought a book about StarOffice, which had become a free office suite after Sun had acquired the German company/software. I started to use StarOffice at home, I believe when it still was StarOffice, but even more when the free version became OpenOffice. I still use OpenOffice more or less daily, and its fork LibreOffice.

For several years I had a Dell Inspiron desktop with Windows Vista operating system at home. I had some hardware problems early, I think I got a new motherboard from Dell. If it was the hardware, or the Windows Vista, that was most troublesome I do not know. But I heard that Apple computers were much more reliable. So in April 2015 I bought an Apple MacMini to replace my Dell, which is my daily driver today. My MacMini still works well. Apple products are indeed very good both regarding hardware and software, and different devices interact very well with each other.

Dell Inspiron 530 [photo: Henrik Hemrin]

I also bought a cheap Windows 10 laptop after I bought my MacMini because I wanted to use a few Windows software. But this laptop was too cheap, too soon it was very difficult to update Windows and it finally became impossible to update. It became hard or impossible to update because it only had 32 GB of RAM. See my articles Short life time for my cheap laptop (April 2018) and Cheap laptop reborn (November 2018).

The laptop was reborned with Linux! Linux Mint 19 to be precise. The laptop was reborn with an operating system that the laptop could handle without any issue. Applications are still limited due to the PC characteristics, but simple operations works well.

Over the last years a friend of mine at Ericsson had repeatedly told me the good things with Linux and he handed now and then over DVDs with Linux operating systems to me. His advocacy for Linux, my ownpositive experience of Unix and curiosity of Linux since it was invented, was behind the decision and even awareness to change operating system on my cheap laptop.

After I installed Linux on that cheap laptop I have installed Linux also on a refurbished laptop I purchased, a Lenovo ThinkPad T430s. Much of this article is written on the T430s. Although my Apple macOS works very well, I have more and more got a desire I want to use Linux more, especially considering if I should buy a new Apple computer or not when my macMini becomes outdated.

So I have been using Linux to some extent for almost four years. I have tested a couple of different Linux operating systems (aka distributions, distros). I have installed Linux Mint, Debian, elementary and Ubunto studio and maybe something more on the laptop. I have tested more distros as live-USB. I have read about Linux, listened to podcasts and so on to learn some about Linux. Although Linux Mint is as user friendly as Microsoft Windows 10 is, I want to understand more to get out even more from the computer. That said, I want my computer foremost to be a machine that simply works and can manage my needs.

For a while, I have been pondering, if my daily driver can become Linux Mint. I started my home personal computer ride with Microsoft DOS and Windows (and I still have Windows), for some years my main machine has been on macOS, and now eventually Linux will become my daily driver.

This is what Walking to Linux is about. I do not know if I will reach Linux, or which parts (distro) of Linux I will arrive at. Nor how much I will use Windows, macOS and eventually other different systems, in addition. But for time being, my direction is to Linux Mint.

Henrik Hemrin

17 August 2022