Ask Your Question

how do i regenerate my initramfs?

asked 2014-11-12 08:29:01 -0500

Sapa gravatar image

updated 2015-05-18 09:25:11 -0500

mether gravatar image

I recently downloaded and installed the iso for fedora 20.01 on a spare but small hdd and have run the updates and all was fine until I successfully retreived my data from a failed hard drive that had had ubuntu 14.04 on it. I have another (3rd) hard drive with fedora 14 which boots up fine.

I have removed all hdd's except this one with the new iso

When I boot this disk with the latest and updated fedora on it hangs and drops to a shell and I get this message:

Type "journalctl" to view system logs you might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot after mounting and attach to a bug report.

found device /dev/mapper/fedora-root

[2.535533]dracut-initque(290):In:failed to create symbolic link "dev/resume": File exists

[186.299148]dracut-initque(290):Warning: Could not boot

[186.312502]dracut-initque(290):Warning:/dev/ununtu-vg/swap_1 does not exist

Then it tells me to regenerate my initramfs

I'm self taught and learnt all my IT stuff by trial and error and I built this desktop-machine from some new/ some old bits but still there is loads and loads I don't know so please help me The BIOS is the latest as far as I can see, I'm on a M5A78L-M. I can't flash the BIOS because I don't have Windows. (I have a USB drive on it's way in the post) but the other disk with the old version of Fedora boots/works fine, unfortunately that old disk is full. I now have things on this disk from the failed ubuntu that I can't afford to lose until my replacement HDD arrives from the ppl who sold me a dud

FransiscoD I have seen your message on the other question I asked when I thought it was solved but have no idea if or how to start messing with grub2. I realise the boot is looking for the old disk. The other disk with earlier fedora on doesn't do that.

edit retag flag offensive close merge delete


I'm going to run grub2-mkconfig -o /boot/grub2/grub.cfg in terminal

Sapa gravatar imageSapa ( 2014-11-12 09:05:58 -0500 )edit

It's same after that command

Sapa gravatar imageSapa ( 2014-11-12 09:14:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-11-12 10:14:16 -0500

updated 2014-11-12 11:16:10 -0500

First, it looks like you have a swap partition configured that doesn't exist. You should fix that.

  1. Since you're in a barebones environment when failing to boot, scan for logical volumes first:
vgchange -ay
  1. Find swap partitions
blkid|grep swap
# and an example:
/dev/mapper/fedora-swap: UUID="28d71a2c-1b34-4115-aa19-083373ec4d8a"
  1. Edit /etc/fstab to use the swap partition, here's an example:
nano /etc/fstab
# do editing
grep swap /etc/fstab 
/dev/mapper/fedora-swap swap                    swap    defaults        0 0

The resume= line suggests you have hibernated; I suggest you make sure that normal reboots and shutdowns work before testing with hibernation further.

To regenerate all initramfs, do:

dracut --regenerate-all --force

edit flag offensive delete link more


If I use --force in addition to --regenerate-all is there a particular order i need to use? I tried dracut --regenerate-all it was the same then dracut --regenerate-all --force and it was the same

How do i fix the swap partition that doesn't exist? Apologies for my noobiness

Sapa gravatar imageSapa ( 2014-11-12 11:05:18 -0500 )edit

nope, they aren't positional arguments. Good job finding --force though, it probably needed that :)

randomuser gravatar imagerandomuser ( 2014-11-12 11:06:46 -0500 )edit

Answer updated for swap info.

randomuser gravatar imagerandomuser ( 2014-11-12 11:16:41 -0500 )edit

I hav found /dev/fedora and it contains home root swap

Is this the swap file that i need to get rid of?

I only have one hdd in with just fedora on it now

If so is it rm /swap in that folder in terminal

I tried the lv scan and got an error:

[root@localhost fedora]# cd /home [root@localhost home]# vgscan -ay vgscan: invalid option -- 'a' Found swap in terminal /dev/mapper/fedora-swap: UUID="d05301ce-2af3-4042-b219-eec8cb0ddd1e" TYPE="swap"

The one that it's looking for but doesn't exist is for ubuntu-vg so I need a way to stop it from looking for it. I'll try the initramfs again

Sapa gravatar imageSapa ( 2014-11-12 11:34:08 -0500 )edit

I'm still a little confused over how to stop it looking for the ubuntu swap file. Should I copy and paste what you wrote? not sure about if that's what I have to do nano /etc/fstab do editing (the hash is a command isn't it?) grep swap /etc/fstab /dev/mapper/fedora-swap swap swap defaults

Sapa gravatar imageSapa ( 2014-11-12 11:55:05 -0500 )edit

answered 2014-11-12 11:47:58 -0500

baoboa gravatar image

resume is failing because swap partition is missing ( swap from ubuntu14 lvm i guess )

the precedent response is correct but you need to use a livecd , then dracut will try by default to regenerate the initramfs for the livecd, there is way to do it but it's painful.

what i propose is when grub menu popup , edit one entry (type e) end add an option acpi_sleep=nonvs (for the line starting with linux) it should deactivate the resume. Then you can boot normally ( type F10 ), access your fedora OS , and check your disks.

link link2

i hope it help

edit flag offensive delete link more


after this

[2.535533]dracut-initque(290):In:failed to create symbolic link "dev/resume": File exists

[186.299148]dracut-initque(290):Warning: Could not boot

[186.312502]dracut-initque(290):Warning:/dev/ubuntu-vg/swap_1 does not exist

it says it's going to emergency boot then it says

Type "journalctl" to view system logs you might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot after mounting and attach to a bug report.

then it says drakut#

if i type exit it boots up after a bit of fuss

I want to tell it to ignore the swap for ubuntu-vg but as I'll have a new hdd in about a week, I may as well wait and do a fresh install onto that if I can't fix this. I'm not too bad with commands if I understand what I'm doing but haven't used ...(more)

Sapa gravatar imageSapa ( 2014-11-12 18:06:32 -0500 )edit

that's all the error messages ? it's mostly warning it should not drop you to the emergency console

baoboa gravatar imagebaoboa ( 2014-11-12 19:33:03 -0500 )edit

can you show the content of /etc/fstab and of the command blkid ?

baoboa gravatar imagebaoboa ( 2014-11-12 19:35:15 -0500 )edit

dracut command didn't solve the situatution ? did you try a previous kernel in the grub menu ?

baoboa gravatar imagebaoboa ( 2014-11-12 19:37:43 -0500 )edit

Question Tools

1 follower


Asked: 2014-11-12 08:29:01 -0500

Seen: 56,343 times

Last updated: May 18 '15