Mdk 2006 - GRUB installation problems
I've just built a new machine (AMD 64X2 4400, Asus K8N-SLI deluxe) and am having trouble getting GRUB to install.
I've got Mandriva 2006 "free" x68_64 edition, which seems to install OK, until it tries to install the bootloader. Although there are no error messages at this point, it is clear that GRUB hasn't been installed at all, as nothing is added to the MBR of the boot partition. My system has 2x200GB SATA drives, configured in a mirror RAID using the onboard nForce raid controller. The drivers for this are installed without problem at the start of Mandriva installtion. I am planning on using BootIt as my main boot manager (it has some useful features as I will also be running 32/64bit versions of Windows) so my drive is partioned as follows: Code:
Primary: BootIt partition (FAT) 8Mb When running in rescue mode and trying to reinstall GRUB, I get the following message: Code:
Installing driver for sata_nv <snip>.... So, does anyone have any ideas about what could be causing this and how to rectify it? I think it may be because of the RAID - my drives appear to be sitting in /dev/mapper/nvidia_cdhfeddc1 etc, should they not be referenced as /dev/sdc[x]? I'm new to both RAID and SATA on linux..... I've a few years experience running linux on both desktop and server environments but this level of detail is a bit new to me so I apologise if I ask newbie questions! Please help if you can - I'm itching to get the dual-core power flowing! :) i.s |
Your problem is probably the fact that your /boot partition is on the raid array. a /boot partition should be located on a non-raid partition, as bootloaders get confused by raid.
|
Thanks for the reply - I tried adding an old IDE drive to my box and moving the /boot partition across to that. Still get the same error messages when trying to install GRUB and the drive is not bootable.
i.s |
Hmm... why do you insist on using grub, why not just use Lilo? Since you'll be using BootIt for the bootloader anyway, why not stick with the mandriva standard?
I've had no problems with Lilo. |
Hi
As far as the rescue mode not finding the disk goes, your problem may be related to not specifying the correct harddrive/partition number. For example, its possible that if you're using IDE devices (e,g, PATA drive), the master device on the primary IDE channel may be seen as hd0 and if you have both the master and slave in use then the slave device may be hd1. This being the case, your SATA disk would be hd1 (if only Primary/master IDE in use) or hd2 (if both Primary/master and primary/slave in use). If you are also using the Secondary IDE channel then the SATA drive maybe hd3 or hd4. In your particular case it looks like your SATA drive is hd2 Also, you said you opted for Grub to install to the root partition but in "rescue mode" you are telling grub to setup to /boot (i.e partition 4). Now, I'm not sure where Mandriva installs the bootloader when you say 'to root' but normally root means exactly what it says (i.e "/") which in your case is partition 6 (in Grub terminology). So, my best guess is you should specify (hd2,6) ---- but remember what I said re IDE channels above As far as not being able to boot, you'll need to make sure you've specified the correct partition to boot in BootIt (sorry I don't know this program so can't help with that). If it still doesn't work, you should check your grub config file "menu.lst" -- paste a copy in this thread if u need help Probably as clear as mud but hope something I've mentioned helps.... Lastly, just so you know, there is only one MBR on a disk :) Cheers Ian |
OK, I'm just going to swallow my pride and put myself on the line in the hope that I'm making some stupid mistake and someone can help!
My (limited) knowledge of bootloaders is that every partition on the disk (or at least every primary partition) has a boot sector that contains info on how to boot the OS and part of Grub is installed on the boot sector of /boot. (Right/Wrong??) There is also an MBR per disk that specifies which partition to boot from. (Right/Wrong??) Spitfire - I think you're on the right track, I'm pretty sure the errors I'm getting are due to the wrong disk being referenced. If it helps my full disk layout is this: I have 2 IDE channels - the primary has a DVD-RW as master and a DVD-ROM as slave. The secondary has a HDD which contains (only) the /boot partition. I also have 2 SATA controllers, each with 4 channels. My SATA disks are connected to one of these controllers but I don't know if it's the first or second controller as linux sees it. I'm new to GRUB so unsure of exactly how to control/install it - I've tried running /sbin/grub-install from rescue mode with a number of parameters but just get messages such as "/dev/hdc does not have any corresponding BIOS device" and "/sbin/grub-install: line 356: sed: command not found". Since putting my /boot partition on a seperate IDE drive, grub seems to install even less than it would before - /boot only contains a "lost+found" directory and a keyboard mapping! purelithium: I'd quite happily use LILO if it was offered to me - the installer only offers GRUB with/without a GUI, am I missing something? Will continue to play about tomorrow and let you know if I crack anything. In the meantime if anyone can see something I'm doing wrong (no matter how stupid!) please let me know! Thanks for the help so far - I know I'm so close and yet so far..... i.s |
That's strange. i've never had Grub with Mandriva, always lilo....
Sorry, I don't know enough to help you any further. |
Hi
In answer to your questions: Yes each disk has a single MBR and yes each partition has a Boot Sector. The partiton table normally contains information (i.e its start sector etc) for upto four primary partitions or three primary plus an extended partition (I say "normally" because some 3rd party boot loaders can make "changes" to allow >4 partitions). The partition table also flags which partition is the currently active partition. In your case, I assume the active partition will be the one with BootIt installed. With regard to your statement/query "Grub is installed on the boot sector of /boot", I don't think it is! As I said before, I think it's on your root partition. Did you try telling BootIt to boot from the"/" partition instead of "/boot"?? If I read correctly, you seem to have added another drive into the mix. Your call, but I think you should take back out as it'll just confuse things. Something useful would be to copy/paste your "menu.lst" file here for people to see (/boot/grub/menu.lst). Ian |
Hi guys.
I've taken the other IDE disk out again now as suggested, it only seemed to confuse things more. As requested, I've got the following files. They're taken from rescue mode, so the real path to them is /mnt/boot/grub/.... menu.lst: Code:
timeout 10 Code:
(fd0) /dev/fd0 Code:
grub --device-map=/boot/grub/device.map --batch <<EOF I've tried BootIt pointing to "/" and "/boot" - neither partition is marked as bootable though, as GRUB always errors when installing. Thanks again for the help. i.s |
Hmm... might be getting somewhere. After posting the above, I started playing about (well, I can't break it more!) and changed the first line of /boot/grub/install.sh to:
Code:
grub --device-map=/mnt/boot/grub/device.map --batch <<EOF Code:
Probing devices to guess BIOS drives. This may take a long time Any ideas now? :) i.s |
Hi
First off, is the script you mentioned the script that runs when you select "Reinstall bootloader" ? Second thing is that, from the output snippet you gave in the last post, root is being set as (hd0,4) which is the same as in your first post but instead of the "Error 21: Selected disk does not exist" (as per 1st post) it now finds an ext2 filesystem. This doesn't make sense unless your disk config has changed. Are you sure you removed the HD you installed on the IDE channel? Also can you post output of Code:
df |
Will post the df output when I get home.
I'm not too sure what exactly happens when I select the reinstall bootloader option - it's one of the menu options on the splash screen for the rescue GUI. If I choose the "goto console" option there I can get to a console with my system mounted under /mnt. My disk config is now exactly as it was in the first post - the only thing thats changed between the "selected disk does not exist" and the "Checking if /boot/grub/stage1 exists" messages is the change to the install.sh script. My guess here is that the device.map file can be used to define what (hd0) is - before it could not find that file so used the default (prob one of the IDE DVD drives) but now the map file redefines (hd0) as "/dev/mapper/nvidia_cdhfeddc". This is the drive in the RAID array, so (hd0,4) would be the 4th partition on this disk?? - ie "/boot"? Will try repointing this to (hd0,6) as that should be the root partition - I assume that this is what it should be trying to find. Will let you know how I get on! |
Try GRUB for DOS please. It is a cross-platform boot loader based on GNU GRUB. The GRUB.EXE can be started from DOS/Win9x; and GRLDR can be started from BOOT.INI of Windows NT/2K/XP/2003; and even more, the GRUB.EXE can be started from LINUX via the KEXEC tool.
By using GRUB.EXE or GRLDR, you don't have to touch your MBR. It is the safest way coexisting with DOS/Windows. You needn't install GRUB for DOS. Just run GRUB.EXE from DOS, or append a line of "C:\GRLDR=START GRUB" into your BOOT.INI(restart and select the "START GRUB" menu item), that will do. Download GRUB for DOS here: http://freshmeat.net/projects/grub4dos/ |
Some progress!
I tried amending the install.sh script to: Code:
root (hd0,6) When GRUB is installed, I get the following output: Code:
grub> root (hd0,6) As requested, my df output is: Code:
Filesystem 1K-blocks Used Available Use% Mounted on Cheers, i.s |
The similar problem repeatedly occur for the old "root+setup" manner. GRUB4DOS has introduced a new method. The new utility bootlace.com can be used to install GRLDR BOOT RECORD onto the MBR. Now that the old method doesn't work, please have a try with bootlace.com. Only two steps are needed:
1. Run bootlace.com to write the MBR of /dev/hda: bootlace.com /dev/hda (Note: bootlace.com can also be run under DOS: bootlace.com 0x80) 2. Copy the file GRLDR to the root dir of one of the supported filesystems, which are FAT12, FAT16, FAT32, EXT2, EXT3. (NTFS is OK only when you are lucky). README.txt within GRUB4DOS has more details(with examples that you can follow). |
All times are GMT -5. The time now is 04:29 PM. |