Ask Your Question
0

trying to create xphe Fedora dual boot system, but always get "grub rescue" message on boot

asked 2013-08-31 07:35:22 -0500

elwood gravatar image

updated 2013-08-31 09:02:01 -0500

FranciscoD_ gravatar image

Hello,

I am new to Linux, but have read great things about Fedora so I wanted to try it and liked it so I installed it on the third hard drive I installed in my computer. It is an nVidia based motherboard with AMD 5000+ dual core processor and two gigabytes RAM, GTX 550 Ti graphics card.

I "successfully" installed Fedora 19 on the PATA 160GB HDD, my other two drives are SATA, XP HE SP3 is on drive 0, 250GB and I have a second (drive 1) SATA 500GB that I use for backup and storage.

Whenever I try to boot up, I get "grub rescue" and I don't know what to do. I tried using this solution:

Your grub is (by default) installed on the same disk as fedora, during the installation there was an option to change this, but I agree, this is a bit hidden (deliberately).

Possible solutions are:

change the HDD boot order in your BIOS,
install grub on the other disk.

The grub fix depends a bit on the partition layout of (both) your disks. You can boot the live-dvd in rescue mode and then fix grub using:

chroot /mnt/sysimage grub2-install /dev/sda grub2-mkconfig -o /boot/grub2/grub.cfg

please be careful not to DESTROY your winXP installation

But, I don't know how to get into Fedora rescue mode via the live DVD. Anyway, everything I've tried has not worked and the only way I can get into Windows (which I'm using now) is to use Rescatux Live CD and have it detect any operating system via the Super Grub2 button choice. I can also use it to boot into Fedora by another route, but my memory isn't that great so I don't know how to describe the process here.

Anyway, I would really like to be able to choose between OSes on boot, but I don't know what to do.

Thanks for any help that you may provide.

edit retag flag offensive close merge delete

Comments

I guess that the problems you have come from a badly installed grub2, which is (more-or-less) cause by some confusion regarding drive names/numbers. Grub(2) has a different naming scheme as fedora, and as windows, and the drive numbers may even change according to BIOS settings, or connected USB drives.

Some questions:

  1. which harddrive is booted by the BIOS? the 160GB or the 250GB?
  2. from the grub2 prompt which drives are listed there (use @FranciscoD_ 's answer)
  3. from fedora, which drives are listed there (use lsblk or sudo blkid)
Jann5s gravatar imageJann5s ( 2013-08-31 10:46:09 -0500 )edit

The rescue mode is better explained here: http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/sn-mode-rescue.html

Be careful though not to blindly follow the suggestion you quoted from the other topic, especially the grub2-intall /dev/sda should probably be modified

Jann5s gravatar imageJann5s ( 2013-08-31 11:01:52 -0500 )edit

Well, the 250GB is booted first, I guess, there is no boot order listed in the bios. I have it set up so that the first thing looked at is the CDROM (DVD-RAM) drive, then I have Hard Disk listed second three times. I have no usb drives connected at all. Nothing but a printer and it's turned off and shouldn't be looked at at all. I used Rescatux to restore my MBR, so now, I guess Grub is gone for the time being. I'm in Windows XP posting now. Should I disable the floppy disk drive in the bios?

elwood gravatar imageelwood ( 2013-08-31 13:37:20 -0500 )edit

no need for disabling de floppy drive, what you need is a reinstall of grub2 to the mbr of the disk booted by the bios (i.e. the 250Gb disk). However the tricky bit for us is to give you the proper command to do it. The specifics of the command depend on the situation.

Can you see if you can boot from your live-media (e.g. DVD) and start the rescue mode? Then use commands like lsblk or blkid to figure out what the device name is of your 250GB disk (something like /dev/sda or /dev/sdb). Then fix your grub with the steps you posted in your question, or report back here for help.

Jann5s gravatar imageJann5s ( 2013-09-01 04:28:26 -0500 )edit

4 Answers

Sort by » oldest newest most voted
1

answered 2013-08-31 09:01:12 -0500

FranciscoD_ gravatar image
edit flag offensive delete link more
0

answered 2013-09-01 10:43:14 -0500

elwood gravatar image

updated 2013-09-01 10:46:21 -0500

Jann5s gravatar image

I think I finally got the info y'all need to help me, I entered lsblk into the terminal after using Rescatux to boot into Fedora rescue mode:

[rrussell@localhost ~]$ lsblk
NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda               8:0    0 149.1G  0 disk 
├─sda1            8:1    0   500M  0 part /boot
└─sda2            8:2    0 148.6G  0 part 
  ├─fedora-swap 253:0    0     2G  0 lvm  [SWAP]
  ├─fedora-root 253:1    0    50G  0 lvm  /
  └─fedora-home 253:2    0  96.6G  0 lvm  /home
sdb               8:16   0 232.9G  0 disk 
├─sdb1            8:17   0 164.6G  0 part 
├─sdb2            8:18   0     1K  0 part 
└─sdb5            8:21   0  68.3G  0 part 
sdc               8:32   0 465.8G  0 disk 
├─sdc1            8:33   0    12G  0 part 
├─sdc2            8:34   0   140G  0 part 
├─sdc3            8:35   0   140G  0 part /run/media/rrussell/Misc
└─sdc4            8:36   0 173.8G  0 part 
sr0              11:0    1 371.5M  0 rom  /run/media/rrussell/ISOIMAGE

I'm almost positive that sdb1 is my Windows partition.

Thanks again for any more help you may provide.

edit flag offensive delete link more

Comments

Ok, now it is possible to fix your grub2 from the Rescatux boot, it is far easier to use the fedora rescue mode from the liveCD, listed under the troubelshooting option in the boot menu of the CD (see also here)

Please, give the output of the same command from the fedora liveCD (put the output in your question instead of giving it as an answer)

Jann5s gravatar imageJann5s ( 2013-09-01 11:05:57 -0500 )edit

I can't get into rescue mode from the Fedora Live DVD. I can only choose it as an option from Rescatux when I invoke the Super Grub2 function (or similar). I tried several times to do something under the troubleshooting menu, but nothing happens except to boot into a live DVD session in which I can save nothing, nor do I know my passwords because I use a LastPass to remember those for me.

elwood gravatar imageelwood ( 2013-09-01 12:00:48 -0500 )edit

I think I finally got grub installed to the mbr of my boot drive by using this command: grub2-install --root-directory=/mnt/sda1 /dev/sda Installation finished. No error reported. Now I'm having trouble getting the config file saved to the same directory. I get errors like this: nano /mnt/sda1/boot/grub/grub.cfg bash: nano: command not found... And this: gedit /mnt/sda1/boot/grub/grub.cfg

(gedit:2809): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

elwood gravatar imageelwood ( 2013-09-01 13:22:53 -0500 )edit

I'm sorry that I cannot explain it to you in a way you understand. But what you are dong with the grub2-install command is not correct, you are installing grub2 to the wrong disk. Moreover, it is unwise to manually move the grub.cfg file, that is the job of the grub2-mkconfig command. The reason I keep urging you to the fedora rescue cd, is that it already mounts your installation correctly, and you need to chroot to your installation in order to get this working. I was hoping not to also have to take you through the mounting part.

I could explain the errors but I feel this is off-topic

Jann5s gravatar imageJann5s ( 2013-09-02 03:48:49 -0500 )edit

Finally fixed it, I think. I downloaded the new beta of Rescatux with better Fedora support and clicked my way through and now I have a dual boot system. Thanks to all who responded to my inquiries for assistance. I appreciate you all very much.

elwood gravatar imageelwood ( 2013-09-02 04:41:21 -0500 )edit
0

answered 2013-08-31 10:16:12 -0500

elwood gravatar image

Thanks for your reply.

After entering the ls command, I find that my Fedora is installed in fd0 and after entering the second command I get:

failure reading sector 0x2 from 'fd0'

Thanks for any more help you may provide.

edit flag offensive delete link more

Comments

fd0 is your floppy-disk drive, which is probably not where fedora is installed

Jann5s gravatar imageJann5s ( 2013-08-31 10:53:30 -0500 )edit

Well, I restored my mbr using Rescatux, then reinstalled Fedora. Now I don't even get a grub rescue message, it just boots directly into Windows XP.

elwood gravatar imageelwood ( 2013-09-01 08:26:19 -0500 )edit

During the installation process, there is an option where to install grub. By default it will install grub on the same drive as fedora, which is your 160GB drive. Since your BIOS boots the 250GB drive, grub is never started, and you directly get WinXP.

To fix this, use the solution you copied in your own question.

P.S. the re-install was not necessary, and in general is not the solution for linux distributions, usually it is much easier to directly fix the problem.

Jann5s gravatar imageJann5s ( 2013-09-01 09:11:31 -0500 )edit

I tried logging in as root and tried the command and got this:[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.9.5-301.fc19.x86_64 Found initrd image: /boot/initramfs-3.9.5-301.fc19.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-7725dfc225d14958a625ddaaaea5962b Found initrd image: /boot/initramfs-0-rescue-7725dfc225d14958a625ddaaaea5962b.img Found Microsoft Windows XP Home Edition on /dev/sdb1 done [root@localhost ~]# grub2-install --boot-directory=/boot /dev/sdb1 /usr/sbin/grub2-bios-setup: warning: File system ‘ntfs’

elwood gravatar imageelwood ( 2013-09-01 10:52:19 -0500 )edit

doesn't support embedding. /usr/sbin/grub2-bios-setup: error: embedding is not possible, but this is required for cross-disk install.

elwood gravatar imageelwood ( 2013-09-01 10:53:32 -0500 )edit
0

answered 2013-09-02 04:04:34 -0500

Jann5s gravatar image

As I see it you have three options:

  1. change the boot order of your drives in the BIOS such that the (160GB) fedora disk is booted (easiest option)
  2. install grub2 to the (250GB) winXP disk, using the rescue option of the fedora liveCD. (learning experience)
  3. reinstall fedora, but correctly select the winXP drive as the target for the grub2 installation (lame option)

The steps required for option 2 are:

  • boot your liveCD/DVD
  • select Troubelshooting --> Rescue a Fedora system (see manual, optionally the same is accomplished by pressing the ESC key and typing linux rescue)
  • figure out which drive is the one booted by the BIOS, in your case the 250GB disk, using lsblk or sudo blkid, for example /dev/sdx
  • load the installed fedora: chroot /mnt/sysimage
  • install grub2 to the correct drive: grub2-install /dev/sdx
  • reconfigure grub2: grub2-mkconfig -o /boot/grub2/grub.cfg
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-08-31 07:35:22 -0500

Seen: 867 times

Last updated: Sep 02 '13