4

I have unfortunately format drive /dev/sda2. So all the /root,/home,swap LVM no longer exists. Because of this my server is unable to work properly.

it shows only

dracut#>Dracut Error:




[ OK ] Reached target Paths.
[ OK ] Reached target Basic System.
dracut-initqueue[372]: Warning: Could not boot.
[ OK ] Started Show Plymouth Boot Screen.
[ OK ] Reached target Paths.
[ OK ] Reached target Basic System.
dracut-initqueue[372]: Warning: Could not boot.
dracut-initqueue[372]: Warning: /dev/centos/root does not exist.
dracut-initqueue[372]: Warning: /dev/centos/swap does not exist.
dracut-initqueue[372]: Warning: /dev/mapper/centos-root does not exist.
Starting Dracut Emergency Shell...
Warning: /dev/centos/root does not exist
Warning: /dev/centos/swap does not exist
Warning: /dev/mapper/centos-root does not exist

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.
  • i don't understand. are you saying for formatted a drive that already was in use? and overwrote the partition table, thereby wiping out your existing data? – Tim Kennedy Apr 22 '16 at 16:53
  • I try to format that disk /dev/sda2 by using fdisk – DILSHATH Apr 22 '16 at 16:54
  • 1
    welcome to U&L ! Have you any backup ? – Archemar Apr 22 '16 at 17:03
  • no..I am new to Linux platform. can you please explain me somewhat clearly – DILSHATH Apr 22 '16 at 17:12
4

In dracut emergency shell:

Dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell:

  1. Add the boot parameter ''rd.shell'' to your bootloader configuration file (e.g. /etc/grub.conf)

rhgb = redhat graphical boot - This is a GUI mode booting screen with most of the information hidden while the user sees a rotating activity icon spining and brief information as to what the computer is doing.

quiet = hides the majority of boot messages before rhgb starts. These are supposed to make the common user more comfortable. They get alarmed about seeing the kernel and initializing messages, so they hide them for their comfort.

rd.shell=This will present a shell should dracut be unable to locate your root device

  1. Remove the boot arguments ''rhgb'' and ''quiet'' A sample /etc/grub.conf bootloader configuration file is listed below.

default=0

timeout=5

serial --unit=0 --speed=9600

terminal --timeout=5 serial console

title Fedora (2.6.29.5-191.fc11.x86_64)

root (hd0,0)

kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell

initrd /dracut-2.6.29.5-191.fc11.x86_64.img

  1. If system boot fails, you will be dropped into a shell as seen in the example below.

    No root device found Dropping to debug shell. sh: can't access tty; job control turned off

  2. Use this shell prompt to gather the information requested above (see the section called “All bug reports”).

5.Accessing the root volume from the dracut shell From the dracut debug shell, you can manually perform the task of locating and preparing your root volume for boot. The required steps will depend on how your root volume is configured. Common scenarios include:

• A block device (e.g. /dev/sda7)

• A LVM logical volume (e.g. /dev/VolGroup00/LogVol00)

• An encrypted device (e.g. /dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83)

• A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all)

6.The exact method for locating and preparing will vary. However, to continue with a successful boot, the objective is to locate your root volume and create a symlink /dev/root which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted LVM Logical volume.

Inspect your partitions using parted
  1. You recall that your root volume was a LVM logical volume. Scan and activate any logical volumes

lvm vgscan

lvm vgchange -ay

  1. You should see any logical volumes now using the command blkid:

    blkid

    /dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"

    /dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"

    /dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"

    /dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"

    /dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"

9.With the root volume available, you may continue booting the system by exiting the dracut shell

exit

  • "locate your root volume and create a symlink /dev/root which points to the file system" I symlinked that (actually, I had a problem with /dev/mapper/live-rw), but 'A start job is running for (that device)' still shows and doesn't load. – Yaroslav Nikitenko Oct 21 '17 at 13:54
0

The sda2 partition was most likely the physical volume that made up your LVM's logical volumes 'root' and 'swap'. You might be able to recover the LVM metadata with https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/mdatarecover.html

  • It will work under dracut emergency shell? – DILSHATH Apr 25 '16 at 8:46
  • Maybe? You'd be better off booting off a LiveCD with LVM tools. – jsbillings Apr 25 '16 at 16:52
  • i just used this below two commands in:lvm vgscan and lvm vgchange -ay – DILSHATH Apr 27 '16 at 12:05
  • now its working normally. Thank you for your help :) – DILSHATH Apr 27 '16 at 12:06
0

EL7 Virtual Machines Imported from a VirtualBox Virtual Appliance May Not Start on Oracle VM or Xen with same error.

Virtual machines running EL7 exported from Oracle VirtualBox as a virtual appliance and then imported into Oracle VM may not boot correctly and may exit to an emergency shell. This is caused by a missing xen-blkfront driver in the initramfs image. Typically, output during boot, for affected systems, appears as follows:

[ OK ] Reached target Basic System.
dracut-initqueue[227]: Warning: Counld not boot.
dracut-initqueue[227]: Warning: /dev/mapper/ol-root does not exist
dracut-initqueue[227]: Warning: /dev/ol/root does not exist
dracut-initqueue[227]: Warning: /dev/ol/swap does not exist
             Starting Dracut Emergency Shell ...
Warning: /dev/mapper/ol-root does not exist
Warning: /dev/ol/root does not exist
Warning: /dev/ol/swap does not exist 

Workaround: There are two workarounds to this problem. The first involves adding the missing drivers prior to exporting the Oracle Linux 7 virtual machine from Oracle VirtualBox. To do this, run the following command as root before you perform the export:

# dracut --add-drivers "xen-blkfront xen-netfront" --force 

If you are unable to perform this step prior to the export, you can temporarily boot the virtual machine as an HVM and add the following boot option in GRUB prior to boot:

xen_emul_unplug=never

Once the virtual machine has booted, you can add the missing drivers by running the following command as root:

# dracut --add-drivers "xen-blkfront xen-netfront" --force 

Reboot the virtual machine once the drivers have been added to the initramfs.

Bug 21244825 Source : https://docs.oracle.com/cd/E64076_01/E64077/html/vmrns-bugs-3.4.1-virtualbox-export-ol7-does-not-start.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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