Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I did a fresh installation of Fedora 20 in the free space of my hard drive after failing to upgrade from the older version. Everything seems to be working fine until I deleted the partition containing the older version to free up some space. Upon restarting the computer, I got the following message after waiting for a long time:

Warning: Could not boot

Warning: /dev/fedora_old/swap does not exist

Starting Dracut Emergency Shell

I am still able to boot if I type exit on dracut prompt. But, that does not solve the root of the problem. There are a few suggestions on the web proposing:

dracut --force --regenerate-all

I am not sure what it does exactly and it doesn't seem to resolve the problem. What is the proper way to sort out the swap partition? It seems that the swap for the older OS was being used when the new OS is being installed despite it having its own swap partition.

And how could I avoid such a problem in the future?

This is what I have for /etc/fstab:

/dev/mapper/fedora_new-root00 /          ext4    defaults                   1 1
UUID=somehexdec               /boot      ext4    defaults                   1 2
UUID=someotherhexdec          /boot/efi  vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/fedora_new-home00 /home      ext4    defaults                   1 2
/dev/mapper/fedora_new-swap   swap       swap    defaults                   0 0
share|improve this question
    
did you edit your /etc/fstab? –  user55518 Jan 29 at 3:17
    
@bersch, no, I didn't edit that. –  Question Overflow Jan 29 at 3:57

1 Answer 1

up vote 0 down vote accepted

It seems that manually editing out the parameter containing rd.lvm.lv=fedora_old/swap in the grub configuration file does the trick. There is no need to run dracut or reinstall grub at all.

# vi /boot/efi/EFI/fedora/grub.cfg

Search for the following line under the menu entry which you will be booting from:

linuxefi /vmlinuz-3.12.x-xxx.fc20.x86_64 root=/dev/mapper/fedora_new-root00 ro rd.lvm.lv=fedora_old/swap rd.lvm.lv=fedora_new/swap vconsole.font=....

To make sure the above changes stick, do the same for /etc/default/grub:

GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora_old/swap rd.lvm.lv=fedora_new/swap vconsole.font=...

Please provide an answer or leave a comment if this method is wrong.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.