Ask Your Question
1

Fedora boots in emergency mode after I changed the root partition filesystem

asked 2014-08-16 15:21:20 -0500

SuperCarlitos gravatar image

updated 2015-03-28 10:31:05 -0500

Because I have some problems with btrfs I changed the root filesystem for xfs. I copied the root partition in another disk and after that I copied the contents over to the new xfs formatted disk.

I put the new UUID of / in /boot/grub/grub.cfg and /etc/fstab. And in those files, I stated the new mount options and the xfs format.

Fedora now always boots in emergency mode and when I try exit the shell for continue normal boot, the shell says

can't stat /lib/dracut/resume.sh No such file or directory

I also try the command systemctl default and it doesn't work.

xfsprogs and xfsdump are installed.

What I could do to avoid the emergency boot each time?

edit retag flag offensive close merge delete

Comments

You should have a 'rescue' entry in your grub menu. Does it boot? You probably need to generate a new initrd to be able to boot normally. If you can boot with Fedora rescue menu entry, then all you need to do is to run dracut --force to re-generate initramfs image for your regular boot entries. (You might need to add your default kernel version to dracut command if it differs from the rescue kernel version).

hedayat gravatar imagehedayat ( 2014-08-16 15:41:00 -0500 )edit

I can't boot in rescue mode. Only in emergency mode. I try to do that you said with chroot, but it doesn't work.

SuperCarlitos gravatar imageSuperCarlitos ( 2014-08-16 16:08:43 -0500 )edit

But I'm sure that I didn't do the before wells. The manuals for doing it are a bit confusing.

SuperCarlitos gravatar imageSuperCarlitos ( 2014-08-16 16:31:18 -0500 )edit

If rescue entry doesn't work, I'm not sure if generating a new initramfs would help.

hedayat gravatar imagehedayat ( 2014-08-16 18:11:46 -0500 )edit
1

Did you preserve permissions and Selinux stuff when copying?

abadrinath gravatar imageabadrinath ( 2014-08-16 19:22:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-17 03:07:21 -0500

SuperCarlitos gravatar image

updated 2014-08-18 01:24:31 -0500

abadrinath gravatar image

I solved the problem for my own. The solution that worked:

I have written a howto in spanish here: http://foro.desdelinux.net/viewtopic.php?pid=21941#p21941 But in summary: I made this from a livecd, in order:

mount /dev/sdb3 /mnt
mount --bind /dev /mnt/dev
mount /dev/sdb2 /mnt/boot
mount /dev/sdb3 /mnt/boot/efi
chroot /mnt
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
mount -t tmpfs tmpfs /run
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
dracut --force /boot/initramfs-3.xx.x-200.fc20.x86_64.img

And I rebooted, but X session didn't started and I couldn't login as user

Then, set selinux=0 on kernel parameters. Reboot.

Remove the selinux=0 from the kernel parameters. Reboot and the problem should be fixed.

EDIT by @hello: Just to add the comment to the answer. Then, you can accept it.

edit flag offensive delete link more

Comments

Would you please describe how?

hedayat gravatar imagehedayat ( 2014-08-17 03:28:38 -0500 )edit

Yeah, so that if we come to the same problem, we can fix it using your method. On the upside, you will get some karma if your answer works!

abadrinath gravatar imageabadrinath ( 2014-08-17 04:51:15 -0500 )edit

I have written a howto in spanish here: http://foro.desdelinux.net/viewtopic.php?pid=21941#p21941

But in summary: I made this from a livecd, in order:

mount /dev/sdb3 /mnt
mount --bind /dev /mnt/dev
mount /dev/sdb2 /mnt/boot
mount /dev/sdb3 /mnt/boot/efi
chroot /mnt
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
mount -t tmpfs tmpfs /run
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
dracut --force /boot/initramfs-3.15.9-200.fc20.x86_64.img

And I rebooted, but X session didn't started and I couldn't login as user

SuperCarlitos gravatar imageSuperCarlitos ( 2014-08-17 16:09:25 -0500 )edit

or root, so I put selinux=0 in the menu entry of grub.cfg, I rebooted and then I could enter to graphic session. For last, I undid the last editing in grub.cfg and I rebooted again. Then, SELinux created a new policy and following system started normally in graphic session.

SuperCarlitos gravatar imageSuperCarlitos ( 2014-08-17 16:16:24 -0500 )edit

Thanks for that! I added it to your answer! :)

abadrinath gravatar imageabadrinath ( 2014-08-18 01:18:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-16 15:21:20 -0500

Seen: 2,487 times

Last updated: Aug 18 '14