LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-15-2006, 02:18 PM   #1
killiansdlight
Member
 
Registered: Nov 2005
Posts: 30

Rep: Reputation: 15
Grub Issues in Edgy Eft


Hey Everyone,

I've just done a fresh install on my system and am having some major grub issues.

Let me start by describing my system, I have two seperate hard drives, one that is dedicated to linux and the other is dedicated to windows. The thing that is a little weird is that the windows drive is the master on ide1 and the linux drive is the slave on ide2. I had to do this because of case contstraints and cable length,etc. I don't think this should have been an issue, because my previous install of suse worked just fine with this setup.

So here is my issue, when I install ubuntu I let it install grub, when I try to boot into my windows partition from grub, the screen just flashes and then goes back to the main screen. So I wasn't sure what the issue was. The option to boot into ubuntu worked just fine. I went through a bunch of different stuff I found online as far as editing my menu.lst file and whatnot. I finally realized that most people who were having issues like mine, had the windows drive as the slave and the linux drive as the master and were having to do a map and whatnot. Well this didn't really fit what was happening with me, so I didn't know where to go from there.

After a couple of hours messing around with this, I really needed to get access to some files on my windows drive so I put in the xp install disk, went to repair and did a FIXMBR. This of course let me back into windows, but screwed up my grub installation.

So now, I've got no grub, and when I do get it back up I still have an issue with getting into windows from it. I'm not really sure what to do. I would try a reinstall, but I've got a wireless adapter that took me an incredibly long time to get working in linux and my computer is upstairs so I have to cart it all the way down just to get my internet and all that working again.

Any advice as far as reinstalling grub and then what to do about my issue with booting into windows would be greatly appreciated.

Sorry for the incredibly long message..
Thanks.
 
Old 11-15-2006, 05:40 PM   #2
bretts5964
Member
 
Registered: Feb 2005
Location: Seattle WA USA
Distribution: openSUSE 10.2 / Kubuntu 7.04
Posts: 46

Rep: Reputation: 15
Can't say I've got a solution exactly...

You could use one of these utilities from windows to backup the configuration files you need, then reinstall Ubuntu again...

Explore2fs (EXT2FS/EXT3FS)
http://www.chrysocome.net/explore2fs

YAReG (ReiserFS)
http://yareg.akucom.de/

I have drives that are configured almost identically to yours on separate physical drives. Like this:

IDE1 master: WinXP
IDE1 slave: CD-RW
IDE2 master: SUSE
IDE2 slave: (attempted) Kubuntu

My problem is similar, but I was trying to install GRUB on the first sector of the boot partion of Kubuntu, (on IDE2 slave). The point being that GRUB can be installed somewhere else besides the MBR, and windows can be made to chainload GRUB(s) of each OS. I use a tool called BootPart <http://www.winimage.com/bootpart.htm> for this.

When installing Kubuntu from the CD, there's an option to change the location of GRUB. It defaults to (hd0) a.k.a. /dev/hda, the IDE1 master MBR. I'm new to this distro, but it should be able to install to the /dev/hdd1, IDE2 slave, on the first sector of / (root) or /boot partitions.

My GRUB failed to install and crashed the Kubuntu installer, probably because I got the GRUB numbering wrong. I think I will create a GRUB floppy, and see what works from the GRUB prompt, then reinstall Kubuntu after determining the correct drive numbers.

Hope this helps some,
Brett
 
Old 11-15-2006, 06:51 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,418

Rep: Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198
From a Linux system (Knoppix is fine) let's see the output from
Code:
/sbin/fdisk -l
cat <mountpoint>/boot/grub/menu.lst
Remove the comments from the menu.lst prior to posting will be appreciated.
 
Old 11-15-2006, 08:56 PM   #4
killiansdlight
Member
 
Registered: Nov 2005
Posts: 30

Original Poster
Rep: Reputation: 15
okay I will post the info as soon as I get back to the system. Thanks for the suggestions so far.
 
Old 11-16-2006, 09:30 AM   #5
bretts5964
Member
 
Registered: Feb 2005
Location: Seattle WA USA
Distribution: openSUSE 10.2 / Kubuntu 7.04
Posts: 46

Rep: Reputation: 15
Some advice from Ubuntu forums

UPDATE: I did put in the wrong GRUB numbers during my install. The CD-RW drive does not get counted by GRUB, so the third disk, second partition is numbered (hd2,1) for me. Since my install failed in the middle, I reinstalled all of Kubuntu again. Then I was able to run BootPart from windows and point it at /dev/hdd2. Everything works now.

Found this thread over on the Ubuntu forums that might be helpful to avoid a complete Ubuntu reinstall. It looks reasonable, but I haven't tried it myself. It puts GRUB back on the MBR, (making windows unbootable unless a menu option is added), but could also work for other locations, if the drive numbers are known.

GRUB bootloader-- how can i reinstall it?
http://www.ubuntuforums.org/showthre...16#post1717816

- Brett
 
Old 11-16-2006, 01:14 PM   #6
killiansdlight
Member
 
Registered: Nov 2005
Posts: 30

Original Poster
Rep: Reputation: 15
That link is great brett it fixed grub right up. But now I still cant boot into windows. I'm not sure what you guys need to see, to figure out the possible issue. Please let me know so I can possibly get the dual boot working.
 
Old 11-16-2006, 03:01 PM   #7
bretts5964
Member
 
Registered: Feb 2005
Location: Seattle WA USA
Distribution: openSUSE 10.2 / Kubuntu 7.04
Posts: 46

Rep: Reputation: 15
Dual boot strategy

As I said, the Ubuntu forums solution, if followed exactly, will mean that windows will be put back to being UNBOOTABLE. However, since your Ubuntu is usable again, why don't you post your output to the commands that syg00 suggested?

There are many, many ways to get a multi-boot selection to work... There are only two being suggested in this thread - so far.

1. Put GRUB on the MBR of the first disk, and create menu options for each OS installed. (Presumably the windows option is either missing or fails?)

2. Put windows bootloader on the MBR of the first disk, and put GRUB on each Linux partition, and create windows menu options for each OS installed, (chainloading from windows to each Linux using bootsector pointer files), using BootPart.

The second option is a bit more complex, but safer in my opinion, because it allows windows to mindlessly assume control without any dependency on the other Linux/GRUB partitions, and vice versa. (Eliminating these dependencies is particularly important if you put each OS on a separate physical drive, like I do, in case of hardware failure). Either way, you're still installing GRUB, but in different locations.

So the output of fdisk will help decide where to put GRUB, and the output of your /boot/grub/menu.lst will reveal your menu choices.

- Brett
 
Old 11-16-2006, 05:58 PM   #8
killiansdlight
Member
 
Registered: Nov 2005
Posts: 30

Original Poster
Rep: Reputation: 15
Heres what my options in menu.lst look like. For some reason whenever I run fdisk I get no result. I tried just fdisk and also /sbin/fdisk both with and without the -l trigger.

Code:
title		Ubuntu
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.17-10-generic root=/dev/hdd1 ro quiet splash
initrd		/boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title		Microsoft Windows XP
rootnoverify		(hd0,0)
makeactive
chainloader+1
 
Old 11-16-2006, 06:48 PM   #9
bretts5964
Member
 
Registered: Feb 2005
Location: Seattle WA USA
Distribution: openSUSE 10.2 / Kubuntu 7.04
Posts: 46

Rep: Reputation: 15
Ok, if fdisk doesn't work from your hard drive, then try to run it from a console after booting the live CD. It should be on there.
 
Old 11-16-2006, 06:52 PM   #10
killiansdlight
Member
 
Registered: Nov 2005
Posts: 30

Original Poster
Rep: Reputation: 15
I tried it on both and got the same result. The command is definately there, because when I put -l it gives me a list of all the triggers...it just isn't doing anything for some reason.
 
Old 11-16-2006, 08:36 PM   #11
bretts5964
Member
 
Registered: Feb 2005
Location: Seattle WA USA
Distribution: openSUSE 10.2 / Kubuntu 7.04
Posts: 46

Rep: Reputation: 15
Think I know what's happening. This command must be run as root user, so do this:

sudo fdisk -l
 
Old 11-16-2006, 10:45 PM   #12
killiansdlight
Member
 
Registered: Nov 2005
Posts: 30

Original Poster
Rep: Reputation: 15
okay i got it, this is the result i get.

Code:
Disk /dev/hda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1           4       32098+  16  Hidden FAT16
/dev/hda2               5        3737    29985322+   7  HPFS/NTFS

Disk /dev/hdd: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1   *           1        2341    18804051   83  Linux
/dev/hdd2            2342        2434      747022+   5  Extended
/dev/hdd5            2342        2434      746991   82  Linux swap / Solaris
 
Old 11-16-2006, 11:35 PM   #13
bretts5964
Member
 
Registered: Feb 2005
Location: Seattle WA USA
Distribution: openSUSE 10.2 / Kubuntu 7.04
Posts: 46

Rep: Reputation: 15
Looks like you've got a hidden partition in front of your windows partition, (maybe a rescue partition?), so the GRUB menu option for windows in menu.lst might need to be adjusted to point at the /dev/hda2, or (hd0,1) in GRUB numbering, like this:

title Microsoft Windows XP
rootnoverify (hd0,1)
makeactive
chainloader +1

(There was no space on the last line before +1, so add that too). Then reboot and try to start up windows.
 
Old 11-17-2006, 08:09 AM   #14
killiansdlight
Member
 
Registered: Nov 2005
Posts: 30

Original Poster
Rep: Reputation: 15
You are my new hero bretts5964...got into Windows fine after the changes. Thanks for all the help!
 
  


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
When will EasyUbuntu support Edgy Eft? registering Ubuntu 6 11-15-2006 06:34 AM
Update manager in Edgy Eft 6.10 joegumbo Ubuntu 1 11-13-2006 04:40 PM
Upgrading to Edgy Eft tombiz Ubuntu 13 10-02-2006 04:28 PM
Upgrading to Edgy Eft ernesto_cgf Ubuntu 2 10-02-2006 04:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:44 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