LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 05-17-2008, 09:20 AM   #1
eikeland
Member
 
Registered: Nov 2004
Location: Newport, RI, USA
Distribution: Mandriva 2006
Posts: 125

Rep: Reputation: 15
Boot loader won't install in Mandriva 2008 after Windows install


I have (had...) a dual boot system (XP and Mandriva 2008). I had to re-install Windows after a crash, which made me loose the boot record (which I knew would happen). However, when I try to install the boot loader again from the Mandriva DVD, it doesn't seem to work. I went to the rescue system, and it looks like it wrote a new boot record and there were no errors. However, when I boot, it just hangs at the post, and it doesn't get to the boot loader where I would normally select what OS I want to load. I also inserted the Mandriva DVD, and selected the Boot to Hard disk option, which worked fine. I went to the Mandriva Control Center Boot option and did the same thing there, but it still doesn't work. I have tried both Lilo and Grub. I select /dev/hda as the boot device in the drop down menu since I think that's what it was before. However, since I am not getting to the boot loader, I am not sure where it's writing it. How can I check where the boot loader was written and if this is what my system expects?? Any other suggestions?
Thanks
 
Old 05-17-2008, 12:22 PM   #2
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Here is some grub commands that may help you out.

http://www.justlinux.com/forum/showthread.php?t=144294
 
Old 05-23-2008, 09:02 AM   #3
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 227Reputation: 227Reputation: 227
Just how many drives and partitions do you Have?

If the boot drive mbr is not at hda, then maybe itś sda (sata)

For instance, I have two hd's both sata, and hda is the dvdrw.

more info required.

regards, Glenn
 
Old 05-23-2008, 04:41 PM   #4
eikeland
Member
 
Registered: Nov 2004
Location: Newport, RI, USA
Distribution: Mandriva 2006
Posts: 125

Original Poster
Rep: Reputation: 15
Hi,

I have two IDE drives, and one SATA. I don't even think I have formatted/mounted the SATA drive, and I know the boot record was not on this drive. Unless that's where Mandriva is now trying to install it. I don't remember it asking me where I wanted to put it. How can I make sure the MBR is on hda?
 
Old 05-23-2008, 05:50 PM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
If there is a way to get Mandriva safe (recovery) mode and from the command line as root give us the results of 'fdisk -ls' without the quotes. This will give us the drive numbers and the order they are booting with what partitions on them.
 
Old 05-23-2008, 08:52 PM   #6
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 227Reputation: 227Reputation: 227
Hi, I think Mandriva sets the mbr on the first drive of the fastest bus (sata).

Have you checked the bios to see which drive is the first boot option?

Good tip Larry,

the asterix (*) marks the bootable partitions.

I think having a mix of pata and sata drives confuses the installer.

Both of my sata drives are bootable, though they were brand new (un-touched) before the installs, sdb has never been mbr/boot sector. Go figure.

This might be tricky, depending on you partition setup but, if you take the power plug from the IDE/pata drive and then install....

Plug the pata back in when you have finished. Where there is a will, there is a way.

Just a thought, have you thought about multiple partitions for your linux installs?

I have 21 partitions, including swap and /boot and backup partitions (not mirrors) so If I mess it up, most of my data is still there, just the OS configs are backed-up.

regards, Glenn

Last edited by GlennsPref; 05-23-2008 at 08:55 PM.
 
Old 05-23-2008, 09:01 PM   #7
eikeland
Member
 
Registered: Nov 2004
Location: Newport, RI, USA
Distribution: Mandriva 2006
Posts: 125

Original Poster
Rep: Reputation: 15
fdisk -ls gives me (where hda5 is the main linux partition):

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2cbc2cbb

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1147 9213246 c W95 FAT32 (LBA)
/dev/hda2 1148 2629 11904165 c W95 FAT32 (LBA)
/dev/hda3 2630 19457 135170910 5 Extended
/dev/hda5 2630 5206 20699721 83 Linux
/dev/hda6 5207 5409 1630566 82 Linux swap / Solaris
/dev/hda7 5410 9396 32025546 83 Linux
/dev/hda8 9397 10707 10530576 83 Linux
/dev/hda9 10708 19457 70284343+ 83 Linux

Disk /dev/hdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00042f03

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 6510 52291543+ b W95 FAT32
/dev/hdb2 6511 30401 191904457+ 5 Extended
/dev/hdb5 6511 30401 191904426 83 Linux

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x35083507

Device Boot Start End Blocks Id System


According to mdk the boot device is written on /dev/hda and I am using Grub with graphical menu. It does list a bunch of entries to boot on the next screen. The logs show the following when I did this in MCC:
21:58:48 drakboot[7158]: copied recursively /lib/grub/x86_64-mandriva/e2fs_stage1_5 /lib/grub/x86_64-mandriva/fat_stage1_5 /lib/grub/x86_64-mandriva/ffs_stage1_5 /lib/grub/x86_64-mandriva/iso9660_stage1_5 /lib/grub/x86_64-mandriva/jfs_stage1_5 /lib/grub/x86_64-mandriva/minix_stage1_5 /lib/grub/x86_64-mandriva/reiserfs_stage1_5 /lib/grub/x86_64-mandriva/stage1 /lib/grub/x86_64-mandriva/stage2 /lib/grub/x86_64-mandriva/ufs2_stage1_5 /lib/grub/x86_64-mandriva/vstafs_stage1_5 /lib/grub/x86_64-mandriva/xfs_stage1_5 to /boot/grub
21:58:49 drakboot[7158]: running: sh /boot/grub/install.sh
21:58:49 drakboot[7158]: modified file /etc/kde/kdm/kdmrc
21:58:49 drakboot[7158]: ### Program is exiting ###
 
Old 05-23-2008, 09:13 PM   #8
nafan
Member
 
Registered: May 2004
Location: /dev/bed
Distribution: Mandriva 2009.0 Powerpack
Posts: 172

Rep: Reputation: 30
Try installing grub manually. You will need to boot from the dvd, make a new directory to mount the root partition in (/dev/hda5) and mount your /boot in the right place....

If you mount /dev/hda5 at /mnt/rescue then your boot partition will need to be mounted at /mnt/rescue/boot

chroot into the installed system using
chroot /mnt/rescue /bin/bash

then use the grub-install program to install it in the mbr:
grub-install /dev/hda
 
Old 05-23-2008, 09:18 PM   #9
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 227Reputation: 227Reputation: 227
Sorry, I can't get much from your post.

I can see that it is passing the different filesystems, to try and match what filesystems you have.

e2fs, iso9660, reiserfs, ufs2, but just what did you do?(The logs show the following when I did this in MCC

You may have and error in the logs someplace, /var/log/..

or try to show what came before and after the clip you posted.

regards, Glenn
 
Old 05-23-2008, 09:31 PM   #10
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Get back to the command line and type grub and then hit enter and see if you get a 'Grub' command. If you get a grub command type 'root (hd0,4)' enter, 'setup (hd0);'enter then type quit and then enter. If this does not work I will also need to see your menu.lst

Last edited by Larry Webb; 05-23-2008 at 09:33 PM.
 
Old 05-23-2008, 10:22 PM   #11
eikeland
Member
 
Registered: Nov 2004
Location: Newport, RI, USA
Distribution: Mandriva 2006
Posts: 125

Original Poster
Rep: Reputation: 15
Sorry, I wasn't very specific about what I was doing in MCC. I was setting up the boot loader and options. I was selecting Grub to be the boot loader and Linux to be the default. That was what the logs was displaying.

Quote:
Originally Posted by GlennsPref View Post
Sorry, I can't get much from your post.

I can see that it is passing the different filesystems, to try and match what filesystems you have.

e2fs, iso9660, reiserfs, ufs2, but just what did you do?(The logs show the following when I did this in MCC

You may have and error in the logs someplace, /var/log/..

or try to show what came before and after the clip you posted.

regards, Glenn
I am not on my Mandriva machine now, so I can't try out the suggestions you guys made. I will try them when I get a chance. Thanks for your help.
PS. I found an old boot cd that I had made a while ago. It was using Lilo, but I guess that should be OK. I have never used it before, so I am not sure what to do with it. I assume it will give me some options when I boot with the CD in.. I will let you know how I make out with it.
 
Old 05-24-2008, 09:11 AM   #12
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 227Reputation: 227Reputation: 227
It certainly won't hurt to try the lilo disk.

Let us know how you go, please.

regards, Glenn
 
Old 05-29-2008, 09:30 PM   #13
eikeland
Member
 
Registered: Nov 2004
Location: Newport, RI, USA
Distribution: Mandriva 2006
Posts: 125

Original Poster
Rep: Reputation: 15
Smile Boot loader solved!

Quote:
Originally Posted by Larry Webb View Post
Get back to the command line and type grub and then hit enter and see if you get a 'Grub' command. If you get a grub command type 'root (hd0,4)' enter, 'setup (hd0);'enter then type quit and then enter. If this does not work I will also need to see your menu.lst

The Lilo boot CD didn't work either. Now I can boot to the hard disk when I insert the CD, but nothing happens when I log in. Anyway, that's a different issue
I tried the grub command and root (hd0,4) command. It returns:
Filesystem type is ext2fs, partition type 0x83
Not sure what that means, but maybe someone else does.
When I enter the setup command, I get:

Checking if "/boot/grub/stage1" exists...yes
Checking if "/boot/grub/stage2" exists...yes
Checking if "/boot/grub/e2fs_stage1_5" exists...yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors embedded.
Succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,4)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded

Then I rebooted, but it still didn't work.


I just thought of something... I did install a SATA drive a few months ago, but I never even formatted it I think. There certainly shouldn't be anything on it. However, when I go into the bios, it's listing the SATA drive as the first drive, then it's listing the EIDE drives after that. The boot priority is set to the hard disk, but it must think that the boot record is on the SATA.... Anyway, I changed the order of the hard disks, and it finds the boot loader and it starts up!
I still have problems with Mandriva itself (I am not too happy with all the things that worked fine in 2006 that I can't get to work in 2008), but I will work on those later (it's getting late now).

Thanks for all your suggestions though.
 
  


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
recovering from grub-install /dev/hda1 deleting windows XP boot loader Steve Mading Linux - Software 7 02-22-2010 07:53 PM
first install of mandriva 2008 numero7 Mandriva 6 01-26-2008 06:13 AM
how can i install a grub loader if my system directly boot windows akhil_jadhav Linux - General 11 08-26-2007 02:23 AM
Windows Install and Boot Loader rdabra Linux - General 1 09-30-2005 09:57 AM
Boot Loader Problems (install with Windows) neorion Fedora - Installation 1 08-11-2004 10:46 PM

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

All times are GMT -5. The time now is 09:42 PM.

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