Fix broken initramfs after partitioning and installing another distro

I’ve partitioned my disk, e.g. I decreased the size of my home and installed another distro onto the free space. Everything went fine but after this, I cannot boot into my “normal” kernel (I get only the logo of the laptop company, no tty, no nothing) but I can boot into the fallback kernel (that’s what I’m on now currently). Both are the same latest LTS kernel.

My question: Is there a way to fix the normal one? Like reinstalling it or using some GRUB magic? Otherwise I always have choose the fallback one while booting and I wish to spare me this extra step.

Altering the size of the /home partition should not cause the problem you’re having.
Are you sure you did nothing else?

You can try to boot into fallback kernel and issue:

$ sudo mkinitcpio -P

to rebuild all initramfs images.

1 Like

If @freggel.doe’s suggestion is not enough, you can install a new kernel from the terminal. To see the installed kernels:

mhwd-kernel -li

To see the available kernels:

mhwd-kernel -l

To install a specific kernel:

mhwd-kernel -i linuxYYY

Where YYY is the kernel version.

That’s correct. I shrinked /home and installed another distro onto the free space.

Let’s say the latest LTS kernel is called linuxXYZ, this is the one I used before the partitioning. Does mhwd-kernel -i linuxXYZ REINSTALL the latest LTS if I execute this on the fallback kernel of linuxXYZ?

The difference between fallback image and normal image is the modules included in the image.

As I remember it the fallback image uses udev for the modules whereas the normal image may include predefined modules.

So if the fallback image works then a module included in the normal image is dysfunctional.

There is no one-size-fits-all answer but if you rebuild the images as suggested by @freggel.doe and rebuild your grub config your issue should go away.

But as you have added another Linux to the equation - not mentioned in the OT - it is next to impossible to deduct what may have caused this. E.g. what other changes have you not mentioned?

I am afraid this is going to be a circular issue - a socalled xy problem.

This didn’t help, I still can’t boot into the “normal” kernel.

But can’t I just… reinstall the faulty kernel while using the fallback one? I executed sudo mkinitcpio -P and nothing changed.

sudo grub-mkconfig -o /boot/grub/grub.cfg

The kernel is not faulty - the normal initramfs is.

That didn’t help either. Or do I have to execute sudo mkinitcpio -P and sudo grub-mkconfig -o /boot/grub/grub.cfg during the same boot? Now I executed the first one in 1 boot and the second in the next one.

Does mhwd-kernel -i linuxXYZ REINSTALL the latest LTS if I execute this on the fallback kernel of linuxXYZ?

I don’t know, but you can to install a older kernel, boot Manjaro normaly from it and then uninstal/install the actual one. You can try it anyway.

I stands to reason that the incident is connected to the other Linux install somehow - but I cannot deduct what it is or how.

I am backing out.

Did you - or did you not - reinstall the kernel or install a second kernel as suggested earlier?

sudo mhwd-kernel -i linux513



Then remove

sudo mhwd-kernel -r linux510

You can reinstall the LTS kernel or just use the newer kernel.

I installed linux504 via GUI but it doesn’t show up in the grub, even after executing sudo grub-mkconfig -o /boot/grub/grub.cfg and rebooting.

Hmm, this makes me think, you don’t use Manjaros grub at all, but the grub of the other linux installation you mentioned.
Make Manjaros grub the primary grub (reinstall/restore grub when booted into fallback) and only use that one to boot up your system.


That’s true!

Can you please tell me, how do I do that?
But since you are able to boot the fallback kernel try issuing a simple reinstall first:

$ sudo grub-install --recheck
1 Like

This did it! I could directly boot into my “normal kernel”. Thanks a lot!

To sum it up, I did the following (while being in the fallback kernel):

$ sudo mkinitcpio -P && sudo grub-mkconfig -o /boot/grub/grub.cfg

then reboot into the backup kernel and:

$ sudo grub-install --recheck

then I was able to boot into my normal kernel.
Thanks @freggel.doe and @linux-aarhus !


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.