LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Grub Issues in Edgy Eft (https://www.linuxquestions.org/questions/ubuntu-63/grub-issues-in-edgy-eft-501925/)

killiansdlight 11-15-2006 02:18 PM

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.

bretts5964 11-15-2006 05:40 PM

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

syg00 11-15-2006 06:51 PM

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.

killiansdlight 11-15-2006 08:56 PM

okay I will post the info as soon as I get back to the system. Thanks for the suggestions so far.

bretts5964 11-16-2006 09:30 AM

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

killiansdlight 11-16-2006 01:14 PM

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.

bretts5964 11-16-2006 03:01 PM

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

killiansdlight 11-16-2006 05:58 PM

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


bretts5964 11-16-2006 06:48 PM

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.

killiansdlight 11-16-2006 06:52 PM

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.

bretts5964 11-16-2006 08:36 PM

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

sudo fdisk -l

killiansdlight 11-16-2006 10:45 PM

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


bretts5964 11-16-2006 11:35 PM

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.

killiansdlight 11-17-2006 08:09 AM

You are my new hero bretts5964...got into Windows fine after the changes. Thanks for all the help!


All times are GMT -5. The time now is 07:20 PM.