regenerate initramfs after moving boot partition
Solution 1
Do you still have a F21 install media?
If so do the following:
boot to "troubleshooting" > Rescue a Fedora System
Allow for mounting (normally not r/o)
chroot /mnt/sysimage
dracut --regenerate-all -f && grub2-mkconfig -o /boot/grub2/grub.cfg
If you are sure it is not throwing errors on the dracut --regenerate-all
previous made (i.e. ls /boot
shows them but won't boot) just rebuild grub with the second command.
~ Sent from a Fedora 22 box
Solution 2
try the following link instructions:
https://ask.fedoraproject.org/en/question/57752/how-do-i-regenerate-my-initramfs/
scan for logical volumes first:
vgscan vgchange -ay
Find swap partitions:
blkid|grep swap
and an example:
/dev/mapper/fedora-swap: UUID="28d71a2c-1b34-4115-aa19-083373ec4d8a" TYPE="swap"
Edit /etc/fstab to use the swap partition, here's an example: nano /etc/fstab
/dev/mapper/fedora-swap swap swap defaults 0 0
To regenerate all initramfs, do:
dracut --regenerate-all --force
Solution 3
I had fixed everything in fstab and grub entries and all, but still I was getting into maintenance mode at boot time with dracut time out errors:
dracut --regenerate-all -f && grub2-mkconfig -o /boot/grub2/grub.cfg
This fixed my problem. (CentOS7 Dedicated Server)
Related videos on Youtube
user437209
Updated on September 18, 2022Comments
-
user437209 almost 2 years
I've recently moved my linux system from hdd to ssd. I managed to get it booting and everything was fine until I deleted old boot partitions from hdd. Now when I try to boot I end up in dracut shell with
/dev/disk/by-uuid/xxxxx doesn't exist
error, wherexxxxx
is UUID of my former/boot
or/boot/efi
partition (I'm not exactly sure which one is it since I no longer have them).Now I need to regenerate initramfs to use the new partitions I cloned from hdd to ssd. I tried running
dracut --regenerate-all --force
from rescue boot but it didn't help.I'm using Fedora 21, so how can I do it? Or is there problem in something else?
-
user437209 about 9 yearsThat's basically what I did (although I ran dracut --regenerate-all -f from the rescue boot option that was installed), however it didn't help. I reinstalled now anyway as I realized that it's just not possible to ensure 100% compatibility when virtually anything could be relying on properties of the hdd (eg, UUIDs, partition names, partion sizes, ...) that's just not possible to reliably handle without deeper understaning.