Initramfs problems ...

8 respuestas [Último envío]
Time4Tea
Desconectado/a
se unió: 07/16/2017

I seem to be having some problems with automatic initramfs updates when I install/upgrade certain packages via Synaptic.

Firstly: I have a newer 4.8.0 Trisquel 8 kernel installed, but I didn't like it (the trackpad driver seems worse), so I've gone back to using the 3.13.0 kernel from Trisquel 8. However, when Synaptic runs update-initramfs, it is trying to update the newest version (4.8.0), which I am not using.

Secondly: My /boot partition is only 100MB and fairly full up. So, when update-initramfs runs, it inevitably fails, because there isn't enough space to create a new initrd image. I can run it myself, if I delete the old initrd image first, to make space.

So, is it possible to customize the way that Synaptic is updating the initramfs, or failing that, just stop it from trying to update it completely, so I can update it myself?

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

Nowadays, 100MB is not enough for /boot. Do not bypass the problem: solve it. I would try to boot a live system, copy (with 'cp -a') the content of the /boot partition on the respective directory on the root partition. You can then delete the small /boot partition (e.g., using GParted) and extend the root partition (or any other adjacent partition) to not lose the freed space. Then you would have to remove the respective line in /etc/fstab. Finally, you need to 'chroot' (see https://help.ubuntu.com/community/Grub2/Installing#via_ChRoot) the root partition to then 'update-grub'.

Reinstalling is an option too...

And, of course, always backup your data before repartitioning.

Time4Tea
Desconectado/a
se unió: 07/16/2017

Well, I have some complications, because I have Trisquel 8 and a Linux From Scratch system that I am booting on the same laptop, so I want to have a separate /boot partition.

I don't like grub-mkconfig either ... it usually just makes a mess of everything :-(

(btw, yes I do wish I had made the /boot partition bigger ..)

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

I do not understand why having another system would prevent you from having /boot on the root partition.

Anyway, it probably is easy to expand the /boot partition. It depends on the types of filesystems on the adjacent partitions (in particular, XFS cannot be shrunk) and on whether they are full as well (they probably are not). You can use GParted (or a CLI: 'parted' or 'fdisk' or ...).

Time4Tea
Desconectado/a
se unió: 07/16/2017

I had originally intended to use the shared /boot partition to simplify things, so I could use the same kernel and grub.cfg to boot up both systems. But, that doesn't seem to work, because Trisquel uses an initramfs and LFS doesn't. So, my /boot partition is becoming a bit of a mess of different kernel versions. I guess I could look at giving each system its own /boot folder on their /root partitions and see if that is easier to manage.

However, it's not just about the lack of space on /root - the fact that Synaptic is updating the initram image for the newest installed kernel, rather than the one that is running, is annoying. Although, the root cause of that is the fact that the trackpad driver with the newer Trisquel 8 kernel is bad. So, to solve that, I would probably need to send a bug report to the kernel devs ... problems, more problems ... :)

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

So you are actually running the same kernel images in both distributions. Interesting. But, yes, as soon as at least one of the distributions uses a package manager, it must become a mess.

About the driver, you should try the latest Linux-libre kernel: http://jxself.org/linux-libre/

However:
$ du -h /boot/*4.14.7*
212K /boot/config-4.14.7-gnu
29M /boot/initrd.img-4.14.7-gnu
3,8M /boot/System.map-4.14.7-gnu
5,6M /boot/vmlinuz-4.14.7-gnu

Time4Tea
Desconectado/a
se unió: 07/16/2017

Ok, thanks for your advice, Magic Banana. I will try the latest kernel and see if that trackpad driver is any better. Failing that, is it possible to 'transplant' a kernel module from an earlier kernel version into a newer one?

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

I do not know.

Time4Tea
Desconectado/a
se unió: 07/16/2017

I renamed and moved the update-initramfs binary, then replaced it with a short script that removes the old image first and then runs the relocated tool for the running kernel version. Seems to do the trick! :)