LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-13-2011, 02:54 PM   #1
RimoniMnu
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Rep: Reputation: Disabled
Error: no such device grub rescue HELP!!!


So here's my situation:
I have two desktops. One is using Windows XP Media Center and my new desktop doesn't have an OS yet. I tried installing Ubuntu 11.04 on my new desktop but the dvd drive wasn't working. So I hooked up the harddrive via USB to my old desktop and installed Ubuntu on the new harddrive. I did that thinking I could then install the hdd in my new desktop and Ubuntu would work. When I removed the external harddrive and restarted my old desktop I got the following "error: no such device, grub rescue" I can connect the external harddrive and then grub will load and I can choose which OS to load. I have tried Windows recovery using fixboot and fixmbr; however, fixmbr does nothing and fixboot gives the following "FIXBOOT cannot find the system drive, or the drive specified is not valid". I have also tried copy e:\i386\ntldr c:\ but that gives me Access is denied. Can anyone please help me fix this. I am not wanting linux on my old desktop, and I would like it to load the OS automatically like before. Thanks
 
Old 09-13-2011, 06:58 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
When you installed Ubuntu on the external drive, you probably chose to install grub on the MBR of the internal drive. Now, the grub configuration files show the first stage of grub on the MBR of the internal drive, which points to the rest of grub in the external drive /boot directory, in which the menu files are in the /grub subdirectory.

When you try to boot without the external drive, the first stage of grub in the MBR throws the error.

To repair the situation, plug in the external drive long enough to boot the OS on the internal drive. Then unplug the external drive.

Open a terminal and su to root, then run update-grub to re-write the MBR of the internal drive so that it points to the /boot directory on the internal drive. Then you should able to boot normally without the external drive.
 
Old 09-13-2011, 09:29 PM   #3
RimoniMnu
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi bigrigdriver, thanks for the reply. I am a newb at ubuntu and command prompt. You want me to boot my windows xp, unplug the external(I'm guessing as windows is loading?) and then.... you lost me. Could you explain how to open a terminal and su to root, update grub and re write MBR.
 
Old 09-13-2011, 09:57 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
My apologies. I assumed you had more experience with GNU/Linux. I also apologize for misreading your post. So, I need to modify my suggestions, as well as be more detailed in the instructions so that you will understand what to do.

In re my first (erroneous) reading of your post, I make this revision to my response:
You probably installed grub to the MBR of the internal drive, which points to the rest of grub on the external drive. With the external drive unplugged, grub can't proceed because it can't find the rest of it's files on the external drive.
You should have installed grub to the MBR of the external drive.
For example:
Let's say the internal drive was shown as /dev/sda and the external drive was shown as /dev/sdb (it may have been shown as /dev/hd0 and /dev/hd1).
You should have chosen to have grub installed to the MBR of /dev/sdb so that when the external drive was re-installed in the older box, grub would then be in the proper location, with pointers to the rest of grub on that drive.

Quote:
You want me to boot my windows xp, unplug the external(I'm guessing as windows is loading
No. I want you to boot with the external drive plugged in, and boot into Ubuntu on the external drive.
Quote:
and then.... you lost me. Could you explain how to open a terminal and su to root, update grub and re write MBR.
In your gnome menu, look in the Utilities menu for terminal or console. Or, in your system tray, look for an icon that looks like a computer monitor (terminal). Click on the menu entry/icon to open a terminal. You will see the famous (infamous?) command line (with prompt). Su is the command to switch user (when the user name is given as a parameter to the command) and to switch to super user (root or sys admin) if no user name is given. You will then be prompted for the root password. Enter the password.
Once you are root, type the command grub-install /dev/sdb and press enter. That will install grub on the MBR of the external disk to point to the rest of grub on the external disk, then shut down.
Re-install the external disk in the old box and boot up. You should see a grub menu with both Ubuntu and Windows.

Last edited by bigrigdriver; 09-13-2011 at 10:22 PM.
 
Old 09-14-2011, 12:55 AM   #5
RimoniMnu
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
No apologies necessary. You are right that I installed the bootloader on my windows XP drive. I was able to do all that you mentioned, however; My external hdd that has ubuntu installed will be going into another desktop not the same one with my Windows XP. I am able to use the Ubuntu hdd in my new desktop now but my old desktop with windows XP still needs the Ubuntu hdd to boot from. Do you know how I can fix the boot loader for my Windows XP. I already tried fixmbr and fixboot but they don't work. Thanks again for the help.
 
Old 09-14-2011, 09:12 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
I already tried fixmbr and fixboot but they don't work
I've never used xp but, from what I have read on various forums you will need an installation CD as Recovery CDs apparently don't have the necessary files. If you don't have the installation CD, post back. Someone will be able to tell you how to dd the mbr as windows appears to have trouble if another bootloader has data in the mbr.
 
Old 09-14-2011, 12:01 PM   #7
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If you have a win98 installation cd around, you can also use that to repair the xp MBR. The procedure is slightly different however. You should google up the command syntax to use with a win98 disk.

Last edited by bigrigdriver; 09-14-2011 at 12:03 PM.
 
Old 09-14-2011, 12:16 PM   #8
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I am not sure but think I read that the microsoft site has a cd you can download to repair your xp mbr.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB error: unknown filesystem, grub rescue magnecticfield Linux - Newbie 28 07-30-2013 03:35 AM
Error Message: grub rescue Arjuna13 Linux - General 7 06-08-2011 05:41 AM
Error: No such Partition. Grub Rescue Nofgcs Linux - Newbie 6 03-14-2011 08:07 PM
[SOLVED] error: no such device ... grub rescue> ilaria Linux - Laptop and Netbook 5 01-04-2011 10:34 AM
[SOLVED] Error: No such device <hex number>, Grub Rescue> Aquarius_Girl Linux - Newbie 60 10-22-2010 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:09 AM.

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