PDA

View Full Version : how to fix grub?


niuqelrah
28th January 2011, 12:02 AM
hi.

The person who helped my out on my f12 told to me to do a new thread regarding my new problem.

I did install the mandriva 2010.2 overwriting my f12, hoping to fix my GRUB. but then after the installation, I got an error saying:

Root {hd1,0)
Error 21: Selected disk does not exist.

.---------------------------------------------------------------------------

he also told me to post my menu.lst.

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,8)/boot/gfxmenu
default 0

title linux
kernel (hd0,8)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=1933a3b3-096a-460c-a9ec-ba4ed6f6229f resume=UUID=b66517c5-5d53-4795-8b31-21225f4ea671 splash=silent vga=788
initrd (hd0,8)/boot/initrd.img

title linux-nonfb
kernel (hd0,8)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=1933a3b3-096a-460c-a9ec-ba4ed6f6229f resume=UUID=b66517c5-5d53-4795-8b31-21225f4ea671
initrd (hd0,8)/boot/initrd.img

title failsafe
kernel (hd0,8)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=1933a3b3-096a-460c-a9ec-ba4ed6f6229f failsafe
initrd (hd0,8)/boot/initrd.img

title windows
root (hd1,0)
map (0x81) (0x80)
map (0x80) (0x81)
makeactive
chainloader +1

title Linux sda7
root (hd0,6)
configfile /grub/menu.lst


***********************

i need help guys, please.

stoat
28th January 2011, 12:24 AM
So do you mean to say that it's Windows that you can't boot from that menu? If so, my guess is that it's the hex stuff in those map commands. Maybe not, but I've never seen that before. It sure isn't in the GRUB manual that way. I would just try (hd0) and (hd1) in those. And it might help if you posted the output of fdisk -l.

niuqelrah
28th January 2011, 12:44 AM
yes, Cannot boot windows on the menu.

here it is.

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x86c086c0

Device Boot Start End Blocks Id System
/dev/sda1 1 3824 30716248+ 7 HPFS/NTFS
/dev/sda2 3825 60800 457659720 f W95 Ext'd (LBA)
/dev/sda5 3825 45503 334786536 7 HPFS/NTFS
/dev/sda6 45504 58634 105474117 7 HPFS/NTFS
/dev/sda7 * 58634 58647 102399+ 83 Linux
/dev/sda8 58647 58711 511999+ 82 Linux swap / Solaris
/dev/sda9 58711 60800 16785407+ 83 Linux

Disk /dev/sdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xcdb7cdb7

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1932 15518758+ 7 HPFS/NTFS
/dev/sdb2 1933 4865 23559322+ f W95 Ext'd (LBA)
/dev/sdb5 1933 4865 23559291 b W95 FAT32

stoat
28th January 2011, 12:53 AM
Of all those partitions, only two of them can have Windows boot loader files. The one you tried is one of them. So first, I would just try it again with the map commands written in the more familiar way. And the makeactive command is not necessary for booting a modern Windows system. So I would try this...title windows
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1If you're worried about doing that, then just add it at the bottom without changing the existing stuff.

P.S.: I just changed your root command to rootnoverify. GRUB cannot mount an NTFS partition, so there is no use making it try.

jbkt23
28th January 2011, 01:07 AM
This is what I had in mine when I dual booted:

title Win 2000
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

So the title line is what ever you make it but try this:

title windows
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

Hope this helps!

---------- Post added at 08:07 PM ---------- Previous post was at 08:05 PM ----------

Damm,
minutes apart

niuqelrah
28th January 2011, 01:20 AM
still the same. i cant get to windows. Thou it will put another option at the selection, but upon selecting the added option, it will prompt the same error

stoat
28th January 2011, 01:34 AM
21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.Is the drive an internal drive, or maybe a USB external?
Can you see it listed in BIOS setup?
Did Fedora boot this Windows system before you installed Mandriva?
Boot Fedora or mount its partition and take a look at its grub.conf to see how it did it.

JamesNZ
28th January 2011, 01:56 AM
Wild guess here, but what if your windows entry in grub was title windows
rootnoverify (hd1,0)
chainloader +1

Note the map commands are gone.

niuqelrah
28th January 2011, 02:22 AM
I can boot windows before before installing mandriva. also i can no longer boot fedora as well.

it's an internal disk.

---------- Post added at 11:20 AM ---------- Previous post was at 11:17 AM ----------

still the same JamesNZ, I wont boot on windows.

if am going to reinstall my windows and attempt remove the GRUB upon booting. how can I do that?

---------- Post added at 11:22 AM ---------- Previous post was at 11:20 AM ----------

still the same JamesNZ, I wont boot on windows.

if am going to reinstall my windows and attempt remove the GRUB upon booting. how can I do that?

stoat
28th January 2011, 02:24 AM
Okay. I'm still thinking about the Windows issue. But the Fedora problem likely is being caused by the path for it in the Mandriva menu.lst file. Since Fedora does not have a separate boot partition, the path for it in GRUB menu commands should include "/boot". I think it may help in fixing Windows to get Fedora going again. Try this for Fedora in the Mandriva menu.lst...title Linux sda7
root (hd0,6)
configfile /boot/grub/grub.confFedora has a menu.lst symlink to grub.conf, so menu.lst should have worked. But I changed it to grub.conf which is the real file.



if am going to reinstall my windows and attempt remove the GRUB upon booting. how can I do that?I urge you not to do that yet. If you change too many variables related to the Windows thing, you may make the puzzle worse. It sounds like you're panicking too soon. Nothing bad is wrong yet IMO. If Fedora booted Windows with this same hardware and partition arrangement, then Mandriva can do it, too. But of course do what you think is best.

niuqelrah
28th January 2011, 02:36 AM
I urge you not to do that yet. If you change too many variables related to the Windows thing, you may make the puzzle worse. It sounds like you're panicking too soon. Nothing bad is wrong yet IMO.[/QUOTE]


im not really comfortable with Mandriva, seriously. I was suppose to reinstall my windows and fedora. but i'll try o open fedora first then i guess.

---------- Post added at 11:36 AM ---------- Previous post was at 11:31 AM ----------

title Linux sda7
root (hd0,6)
configfile /boot/grub/grub.conf

this one is not working. got an error now on fedora, the "/boot/grub/grub.conf" cannot be found.

Am about the reformat my two main hard disk using windows, would I be encountering problems in booting windows still?

how can I remove the whole Mandriva on my system, including the GRUB?

after this, I'll stick to fedora.

stoat
28th January 2011, 02:43 AM
Studying that fdisk more closely, /dev/sda7 looks more like a boot partition in size (~100 MB). So now I am suspicious that /dev/sda7 is Fedora's boot partition, and the rest of it got plowed under by Mandriva. Anyway, whatever it is, it's not an operating system. Now it looks bad to me, and starting over is looking better. I guess we'll never untangle the Windows mystery. Too bad.

niuqelrah
28th January 2011, 02:49 AM
yeah. got messed up and it's crazy.

anyway, so my question now is, if am about to reinstall everything, [i'll be installing windows first], how can I remove the GRUB on the boot up menu?

JamesNZ
28th January 2011, 02:58 AM
I have 2 ideas for reinstalling:

1. Back up thoroughly, boot your windows cd, delete all existing partitions, make your windows partition and then install windows and then fedora.

2. Rescue your installed fedora system with the "Rescue installed system" option. The con to this is that your partitions may be so messed up that it would fail, giving you more headaches.