So, as mentioned before, time to fix the ArchLinux installation on my desktop “Blaatkonijn”. The problem is a broken initramfs, so it doesn’t boot up. As the initramfs is system-specific, just copying a working initramfs from a different machine doesn’t work. Therefore, my idea is to install another ArchLinux on the same machine, and use its initramfs to boot my old installation.
I have tried that approach a while ago. Back then I did not succeed. Well… the installation of ArchLinux did not succeed. There were some problems upgrading the installation. ArchLinux has gone through a couple of changes lately. The guide I wrote for installing ArchLinux on my laptop… well… none of it applied anymore, that I can tell you. I guess, I have used that same cd for that attempt, but I am not sure. Anyhow…. it appears the cd was old compared to the repository, requiring some manual action to let it upgrade. For just creating an initramfs… too much touble.
So… today I downloaded and burned the current installation image. It was fresh, released this month. Cool! But everything has changed. No more installer! Just a tool to create a root fs. So, the installation is just, install root fs, install boot loader, done! (ok, over-simplified…. you do have to set passwords etc.)
There is also a command arch-chroot. Which does a chroot, but also automatically mounts the API file systems. This is to be used during the installation. However, it appeared my old installation was too old for this tool to work with. Creating the initramfs is also a part of the installation procedure. So, I just created the initramfs, and copied the content of /boot over to my old installation, and ran grub-install on the partition of the old installation. (The old installation did not have a separate /boot partition) Also, I copied the content of /usr/lib/modules to the old installation, as the new kernel of course needs the corresponding modules.
Please note, grub2 is now the default boot loader, no longer grub1. It even appears grub1 has been removed from the repository. I am used to grub1 installations. Also note the previous attempt used grub1 in a dedicated boot partition. It seems, a dedicated boot partition is no longer an option in the current ArchLinux installation procedure. With the installer, one could define a separate boot partition. Of course this can be done manually, but that’s now out of scope of this post.
So, on the new installation, after installing the root fs, I had to install the boot loader, so, grub2. This installer created an example config file. As I am copying it over to the old installation I have to change the partition to boot. The config file uses the parition UUID to identify the partition. using the command blkid one can determine the UUIDs for the partitions. Changing this made the system boot.
Upgrading the system…. as the system was out of operating for a few months, there are off course many many updates available. Please note, removing the copied modules again, otherwise the kernel upgrade will fail over the file conflict, as it will attempt to install those. Other errors, which I have met the recent months, such as the /etc/font/conf.d/* exists, resolved my renaming that directory, also appeared again.
Another problem appeared when trying to upgrade glibc. As I have been attempting to resolve the problem, I do not have the exact error message anymore. Something like not overwriting dir lib with file. Therefore, I figure this is caused by the changed in the filesystem, changing the directory /lib to a symlink /usr/lib. Doing this on a live system required calling ld-2.16.so manually, as, after renaming the /lib, running dynamically linked binaries, of course, fail.
[root@blaatkonijn /]# mv lib lib_
[root@blaatkonijn /]# /usr/lib/ld-2.16.so /bin/ln -s /usr/lib /lib
After this, the glibc package installs…. and after waiting for over 500 packages to install, we’re done. Rebooting the system… which succeeds… however, I see a text login, my graphical login doesn’t start. But this is another known issue, which I was still to report about.
The problem is rather simple… and if one would read all the messages during the upgrades, one would have noticed. However… when a lot of packages are being installed, such a notice is snowed under quickly. As mentioned, many things have changed in the ArchLinux world. The sysvinit has been replaced by systemd. To boot correctly, one is supposed to add systemd to the init= kernel parameter. From the pacman logs on my laptop:
[2012-09-04 18:09] :: Append 'init=/bin/systemd' to your kernel command line in your
[2012-09-04 18:09] bootloader to replace sysvinit with systemd
So… now, the system is working correctly again. I should add that sound card again and verify it works with ArchLinux, so I can say for sure Windows sucks!.