LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Grub error 18 on dual boot (http://www.linuxquestions.org/questions/ubuntu-63/grub-error-18-on-dual-boot-562020/)

SpartacusJones 06-15-2007 08:02 AM

Grub error 18 on dual boot
 
Hey everyone-

I was attempting to get my mom's computer set up as a dual boot. I bought an 80 GB WD external HD and ran the Ubuntu installer to load onto it. Everything ran and when I tried to restart I see Grub Error 18.

The worst thing that can happen is to lose the Windows partition, so my primary concern is to make sure I can still get into it.

I see what the error means, but I have no idea how to fix is- any suggestions?

pixellany 06-15-2007 08:24 AM

I assume that you put Ubuntu at the beginning of the drive, and the bootloader on the MBR of the internal. If so, I don't understand error #18--especially if the installer saw the external drive.

Can you boot from the live CD, get into a terminal, and run "fdisk -l"? (post results here)

To restore the Windows bootloader, boot from the Windows CD--rescue mode--and enter "fixmbr".

To install Linux on the external drive without disturbing Windows, put GRUB on a floppy.

SpartacusJones 06-15-2007 09:01 AM

Thanks- I'll try it when I get off.

Incidentally, the only Windows disk I saw at my mom's was a Windows 2000 disk- will repairing the MBR with it work if the installed OS was XP?

I didn't realize it was possible to put GRUB on a floppy, but I guess the good and bad thing about the Ububtu installer is it doesn't ask too many quuestions. All I told it is to install on the external, I didn't specify anything about the boot loader.

Digital Surgeon 06-15-2007 10:58 AM

Hi,
I am fairly new to ubuntu. I am used to Fedora Core linux. But I had a similiar experience with Fedora in a dual boot architecture with windows as well. I had grub errors lioke what your describing. Your windows partition is there dont worry. It just overwrote your mbr, your comp wont boot into windows. You need to use a startup disk and run
fdisk/mbr
to rewrite the mbr to windows standards

this will revert your computer to just windows.

Now I did Windows 2000 and ubuntu as dual boot on the same hard drive
/hda
as auto detect. On grub it added an entry for windows. Just look for howto's first before you try going to modifying important files such as the mbr.

SpartacusJones 06-15-2007 09:30 PM

Ok, I first tried to run FIXMBR, but no one can remember the admin password on this box, so I am going with plan B, which is to change the GRUB conf file so it defaults to windows. Here is the text of the file:

grub_kernel_partition=""
grub_root_partition="(hd0,3)"
kernel_boot_options="root=/dev/hda2"
grub_menu_lst="/boot/grub/menu.lst"

I have found a lot of sites explaining how to alter the file for Linux distros, but how should I change it for windows?

pixellany 06-16-2007 07:07 AM

That is not the GRUB config file---what you need to edit is /boot/grub/menu.lst

But first, you need to show us the disk and partition layout (fdisk -l) as requested in my other post.

My site (link below) has an article on booting which may be helpful.

SpartacusJones 06-16-2007 07:50 PM

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9542 76646083+ 83 Linux
/dev/sdb2 9543 9729 1502077+ 5 Extended
/dev/sdb5 9543 9729 1502046 82 Linux swap / Solaris

Bob Newbie 06-28-2007 07:48 PM

GRUB error 2
 
I am a complete newbie to linux but have installed Ubuntu dual-boot on a Dell desktop with 2 HDs: (1) Win/XP (2) Ubuntu Linux.

Occasionally when booting 'GRUB err 2' appears with no explanation of its cause. The only recovery is reinstall Ubuntu (i'm getting very good at it but would like to learn some new tricks).
> (1) why is there no explanation of err msg (GRUB err 2)?
> (2) is there any easier way to circumvent (rather than reinstall)
> (3) if err persists how can GRUB and/or Ubuntu be completely removed ?

Thanx.

syg00 06-28-2007 09:50 PM

Quote:

Originally Posted by SpartacusJones
Ok, I first tried to run FIXMBR, but no one can remember the admin password on this box,

Shouldn't need one - just hit <Enter>.
Playing with the menu.lst (probably) won't work, as it is on the external - which grub can't find. This is a most likely a BIOS issue.

To get a choice of where to place the loader during the Ubuntu install you have to hit the "Advanced" button during the partitioning phase - f*cking stupid design IMHO.

syg00 06-28-2007 09:56 PM

@Bob Newbie, hijacking threads is considered bad form - best to start your own.
The grub manual is online here. I'd be worried about the hard-disk if that keeps happening. Shouldn't happen.
As for removal, use fixmbr as per above, and just reformat the space (from Windoze).


All times are GMT -5. The time now is 08:58 PM.