LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2015, 04:51 AM   #1
Total_Novice
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Rep: Reputation: Disabled
Deleted Partitions, cannot escape grub rescue mode


Hello everyone and thank you for any help you can offer.

I had a dual-boot setup with Windows XP and Fedora 19. I was attempting to reformat some USB drives using fdisk. It seems I might have formatted my OS partitions instead of the USB drives. I am confused about why that would happen, as I am certain I formatted only /dev/sdc1, albeit repeatedly. I had thought that sdc1 referenced my USB stick. In fdisk, I entered 'd' to delete the partition, then 'n', 'w'.

Now every time I try to boot, I see this:

Quote:
GRUB loading...
Welcome to GRUB! error: no such partition.
Entering rescue mode...
grub rescue>
Then

Quote:
grub rescue>ls
(hd0) (hd0,msdos1) (hd1) (hd1,msdos1)
grub rescue>ls (hd0)/
error: unknown filesystem
grub rescue>ls (hd1)/
error: unknown filesystem
grub rescue>ls (hd1,msdos1)/
error: unknown filesystem
But

Quote:
grub rescue>ls (hd0,msdos1)
./ ../ tboot.gz .vmlinuz-3.13.11-100.fc19.i686.hmac config-3.13.9-100.fc19.i686 initramfs-3.13.9-100.fc19.i686.img vmlinuz-0-rescue-21afb75042b94a0aa840bf1b2cc4d914 vmlinuz-3.13.11-100.fc19.i686 memtest86+-4.20 initramfs-3.14.4-100.fc19.i686.img System.map-3.13.9-100.fc19.i686 grub2/ System.map-3.13.11-100.fc19.i686 .vmlinuz-3.14.4-100.fc19.i686.hmac initramfs-0-rescue-21afb75042b94a0aa840bf1b2cc4d914.img initramfs-3.13.11-100.fc19.i686.img efi/ tboot-syms config-3.14.4-100.fc19.i686 vmlinuz-3.14.4-100.fc19.i686 initramfs-3.11.8-200.fc19.i686-compat-drivers.img vmlinuz-3.13.9-100.fc19.i686 config-3.13.11-100.fc19.i686 extlinux/ lost+found/ System.map-3.14.4-100.fc19.i686 elf-memtest86+-4.20 initrd-plymouth.img .vmlinuz-3.13.9-100.fc19.i686.hmac
I'm guessing this is the F19 recovery partition from my previous f19 install?

I made a bootable F21 USB stick and tried it out. I got the Fedora Live menu, a bit of a pause, a very brief Fedora logo and then a huge amount of text. I cannot find a feature on this forum to post an image of the text. Here is a sample, with "..." used to indicate something that looks unimportant:

Quote:
dracut-initqueue[376]: missing codepage or helper program, or other error
...
dracut-initqueue[376]: umount: /run/initramfs/squashfs: not mounted
[OK] Started dracut initqueue hook
[OK] Reached target Remote File Systems (Pre).
[OK]Reached target Remote File Systems.
Starting dracut pre-mount hook...
[OK] Started dracut pre-mount hook.
[OK] Reached target Initrd Root File System
Starting Reload Configuration from the Real Root...
[OK] Started Reload Configuration from the Real Root.
[OK] Reached target Initrd File Systems.
Starting dracut mount hook...
dracut-mount[581]: mount: unknown filesystem type 'DM_snapshot_cow'
... (same message over 20 times)
dracut-mount[581]: Warning: Can't mount root filesystem
Starting Dracut Emergency Shell...

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.

dracut:/#
I am stuck. I tried looking into TestDisk, but couldn't figure it out. Any help much appreciated!

UPDATE:

I realized I was never running F20 but actually just F19. I entered the following commands:

Quote:
Quote:
grub rescue> set prefix=(hd0,msdos1)/grub2
grub rescue> set root=(hd0,msdos1)/
grub rescue> insmod normal
grub rescue> normal
and was taken to my usual GRUB boot menu. Three different versions of Fedora 19 were listed, plus Fedora 19 Rescue and Windows NT/2000/XP (loader) (on /dev/sda1). I chose Fedora 19 Rescue and waited a long time at the Fedora load screen before being taken back to

Quote:
[OK]Started Show Plymouth Boot Screen.
[OK] Reached target Paths.
dracut-initqueue[240]: Warning: Could not boot.
dracut-initqueue[240] : Warning: /dev/fedora/root does not exist
dracut-initqueue[240] : Warning: /dev/fedora/swap does not exist
dracut-initqueue[240] : Warning: /dev/mapper/fedora-root does not exist
dracut-initqueue[240] : Warning: crypto LUKS UUID 3e524310-c90b-45cc-a880-69f43e6bee2c not found
Starting Dracut Emergency Shell. . .
Warning: /dev/fedora/root does not exist
Warning: /dev/fedora/swap does not exist
Warning: /dev/mapper/fedora-root does not exist
Warning: crypto LUKS UUID 3e524310-c90b-45cc-a880-69f43e6bee2c not found

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.

dracut:/#



The same messages appear when I choose any of the other three Fedora options from the GRUB menu. When I choose Windows , GRUB reports
Quote:
error: no such device: F0500948500916CE
error: invalid signature.

Press any key to continue…
UPDATE 2:
Since I guess I destroyed /root, I’m going the Fedora Live boot route. This time I chose /Troubleshooting/Test this media & start Fedora Live from the Fedora Live menu. Here is the result:

Quote:
sd 6:0:0:0 [sdc] No Caching mode page found
sd 6:0:0:0 [sdc] Assuming drive cache: write through
Mounting Configuration File System. . .
[OK] Mounted Configuration File System.
[OK] Started Show Plymouth Boot Screen.
[OK] Reached target Paths.
[OK] Reached target Basic System.
[OK] Created slice system-checkisomd5.slice.
Starting Media check on /dev/sdc1. . .
/dev/sdc1: f0a547a11b2cf46d6b532a54940b9e8f
Fragment sums: f23713c966ab6edc24c6253d2d633a83cc8f6d31f4c1aeecb28f4694edc4
Fragment count: 20
Supported ISO: no
Press [ESC] to abort check.
Checking: 004.8%

The media check is complete, the result is: FAIL.

It is not recommended to use this media.
[FAILED] Failed to start Media check on /dev/sdc1/
See “systemctl status checkisomd5@-dev-sdc1.service” for details.
dracut-initqueue[378]: Job for checkisomd5@-dev-sdc1.service failed. See “systemctl status checkisomd5@-dev-sdc1.service” and “journalctl -xe” for details.

dracut: FATAL: CD check failed!
dracut: Refusing to continue

reboot: System halted
_

UPDATE 3:

This problem is killing me. Now the USB drives are no longer booting at all. Cannot reach Fedora Live menu. I tried three different drives and exFAT, FAT and Mac OS Extended filesystems. I am stuck using a Mac to format the sticks so maybe I should borrow a PC. grub rescue is showing the USB as two extra, unusable partitions (hd2) and (hd2,msdos1).

Last edited by Total_Novice; 02-04-2015 at 10:22 AM. Reason: update
 
Old 02-03-2015, 11:58 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,827

Rep: Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964
Welcome to linuxQuestions.

With the latest distributions device Ids i.e. /dev/sdxy can be assigned to any disk since the filesystems are typically referenced by their UUID or label. So before using any command that requires /dev/sdxy verify that it is indeed the correct drive and partition.

It appears that you deleted the /boot partition which contains all the kernel and bootloader files which is why you see just the grub-rescue prompt. If all you did was delete the /boot partition then recreating it via fdisk should fix the problem since the filesystem is still intact. If you reformatted after deleting the partition then some files may be lost and it might be easier to reinstall. You should still be able to access /(root) in rescue mode assuming its partition is still intact to save data and configuration files.
 
Old 02-03-2015, 04:36 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,161

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Which F21 image did you download ?. How did you download/burn it ?. Did you verify it after download ?.
Detailed answers.
You need to get that sorted so you can work on the machine, and see what can be salvaged.
 
Old 02-03-2015, 05:54 PM   #4
Total_Novice
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
syg00,

I downloaded the 64-bit version, verified the checksum as recommended on getfedora.org, and used dd on a Mac to create a bootable USB.
 
Old 02-03-2015, 06:00 PM   #5
Total_Novice
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
michaelk,

Each time I tried to reformat through fdisk with 'd' 'n' 'w'. Then I unmounted the USB drive and did mkfs.vfat -F 32 /dev/sdc1 .

I'm guessing the "unknown filesystem" indicates the /root partition was indeed destroyed?
 
Old 02-03-2015, 08:47 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,161

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
I use similar method (dd on Linux though), and never had a problem - including F21.
The reason I asked is that the F19 files indicate a 32-bit version was installed, so it was possible you have non-64-bit hardware. I just tested, and the 64-bit download still complains about invalid architecture if booted on 32-bit, so you are obviously ok.

Did you download the Workstation iso ?.

*Edit:* problem is apparently not common, but not unknown - see this

Last edited by syg00; 02-03-2015 at 08:51 PM.
 
Old 02-03-2015, 09:33 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,827

Rep: Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964
It isn't necessary to delete / recreate the partition in order to format the filesystem.
We know your /boot partition has been destroyed not sure about the /(root) just yet.
 
Old 02-03-2015, 10:51 PM   #8
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Just my paisa of advice.

Always check the uuid of device before using a block device.

Code:
blkid
Always triple check block devices before using a command that writes to it.

If you are unsure which device represents which block device. You can atleast check it's size with command 'blockdev'.
 
1 members found this post helpful.
Old 02-04-2015, 02:53 AM   #9
Total_Novice
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
UPDATE:

I realized I was never running F20 but actually just F19. I entered the following commands:

Quote:
Quote:
grub rescue> set prefix=(hd0,msdos1)/grub2
grub rescue> set root=(hd0,msdos1)/
grub rescue> insmod normal
grub rescue> normal
and was taken to my usual GRUB boot menu. Three different versions of Fedora 19 were listed, plus Fedora 19 Rescue and Windows NT/2000/XP (loader) (on /dev/sda1). I chose Fedora 19 Rescue and waited a long time at the Fedora load screen before being taken back to

Quote:
[OK]Started Show Plymouth Boot Screen.
[OK] Reached target Paths.
dracut-initqueue[240]: Warning: Could not boot.
dracut-initqueue[240] : Warning: /dev/fedora/root does not exist
dracut-initqueue[240] : Warning: /dev/fedora/swap does not exist
dracut-initqueue[240] : Warning: /dev/mapper/fedora-root does not exist
dracut-initqueue[240] : Warning: crypto LUKS UUID 3e524310-c90b-45cc-a880-69f43e6bee2c not found
Starting Dracut Emergency Shell. . .
Warning: /dev/fedora/root does not exist
Warning: /dev/fedora/swap does not exist
Warning: /dev/mapper/fedora-root does not exist
Warning: crypto LUKS UUID 3e524310-c90b-45cc-a880-69f43e6bee2c not found

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.

dracut:/#



The same messages appear when I choose any of the other three Fedora options from the GRUB menu. When I choose Windows , GRUB reports
Quote:
error: no such device: F0500948500916CE
error: invalid signature.

Press any key to continue…
More to come…hope this can help someone one day.

Last edited by Total_Novice; 02-04-2015 at 02:54 AM.
 
Old 02-04-2015, 03:12 AM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
If you created usb boot device, enter bios change the boot priority to the usb device. It's most likely listed under hdd's in bios.
bios>>Boot>>hdd's
 
Old 02-04-2015, 03:21 AM   #11
Total_Novice
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
EDDY1,

Thank you for your reply. Although boot priority is not the issue (I have indeed already set priority 1 to USB), I just came across something interesting. I will update the original post with my finding.
 
Old 02-04-2015, 11:24 AM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Most new usb Devices are listed as hdd's not usb devices.
 
Old 02-04-2015, 12:18 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,827

Rep: Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964Reputation: 5964
It is much easier to understand the chain of events if you add a reply with your findings vs updating the original post.

In a nutshell using dd will create the same filesystem as in the file itself so formatting prior will have no affect. What is the exact command you are using?
 
1 members found this post helpful.
Old 02-04-2015, 06:01 PM   #14
Total_Novice
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Here is the command I am running to create the bootable media:
Quote:
sudo dd if=/Users/lucy/Downloads/Fedora-Live-Workstation-x86_64-21-5.iso of=/dev/disk2s2 bs=1m
 
Old 02-04-2015, 06:23 PM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,161

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
That will be fairly slow - and you have to make sure you don't pull the USB out before it is finished writing. I always use "oflag=sync" to force write to actual physical media. Makes things even (a little) slower, but safer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleted libraries; need to boot in rescue mode (Fedora 20) mackissack Linux - Software 1 10-15-2014 07:21 AM
GRUB rescue mode AN28 Linux - Newbie 2 10-31-2013 04:18 AM
How to escape from grub rescue mode?? Biswajit Das Linux - Desktop 2 11-19-2012 10:04 AM
[SOLVED] Recurring Grub rescue mode after update-grub harris4got Linux - Software 6 04-23-2012 09:30 AM
reinstalling grub in rescue mode ELconkestador Linux - Newbie 5 02-13-2005 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration