LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-21-2008, 05:02 AM   #1
Quercus ruber
Member
 
Registered: Mar 2004
Location: Bocholt, Germany
Distribution: Slackware
Posts: 135

Rep: Reputation: 24
dual boot on a compaq now only boots to hp backup & recovery manager


hi
I set up a relative's laptop to dual boot into vista or pclos and that was fine. But the hp recovery & rescue manager partition was recognised as bootable and added as a grub entry, which my relative accidentally chose. Now the machine skips grub and only boots to the hp r & r manager. Of course, we don't have the recovery disks. But the data is still there. I'm using the machine now, having booted with a live slax stick, and everything is still there. Has the mbr been overwritten? Here is the result of fdisk:

Code:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9c62b218

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        3706    29768413+   7  HPFS/NTFS
/dev/sda2   *        8582        9527     7585792    7  HPFS/NTFS
/dev/sda3            9527        9730     1627136    7  HPFS/NTFS
/dev/sda4            3707        8581    39158437+   5  Extended
/dev/sda5            3707        5377    13422276   83  Linux
/dev/sda6            5378        5886     4088511   82  Linux swap
/dev/sda7            5887        8581    21647556   83  Linux

Partition table entries are not in disk order
And here is menu.lst

Code:
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,4)/usr/share/gfxboot/themes/pclinuxos/boot/message
default 0

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda5  acpi=on resume=/dev/sda6 splash=silent vga=788
initrd (hd0,4)/boot/initrd.img

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/sda5  acpi=on resume=/dev/sda6
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/sda5  failsafe acpi=on resume=/dev/sda6
initrd (hd0,4)/boot/initrd.img

title windows
root (hd0,0)
makeactive
chainloader +1

title windows1
root (hd0,1)
makeactive
chainloader +1

title windows2
root (hd0,2)
makeactive
chainloader +1
Any help would be appreciated. As the data still seems to be in situ, I'd rather not delete or reformat anything except as a really last resort.

ros
 
Old 12-21-2008, 07:23 AM   #2
JosipBroz
Member
 
Registered: Nov 2008
Location: Ljubljana
Distribution: OpenSuSE
Posts: 56

Rep: Reputation: 18
Cool

No need to reformat anything. The solution is actually extremely simple: you have to make your GNU/Linux partition the active one. Currently, thanx to the not-so-clever "makeactive" lines in your menu.lst, the two Windows partitions will be re-activated when first booted into, putting you through all this hassle again. To summarize:
1 -- make the desired GNU/Linux partition (i.e. either sda5 or sda7) active (or "bootable" as they sometimes call it) with a suitable tool, such as gparted, fdisk etc.
2 -- comment-out both "makeactive" lines in your menu.lst by prepending a "#" (without quotes).
3 -- test your configuration.
4 -- post back, specifying any residual problems.
Cheerz & Good Luck

Last edited by JosipBroz; 12-21-2008 at 07:27 AM.
 
Old 12-25-2008, 03:52 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Has the mbr been overwritten?
Probably, just the boot loader section, you need to reinstall grub. You should be able to use the PCLinux install CD/DVD to get you to recovery mode and repair the MBR.
 
Old 12-25-2008, 03:54 AM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Even if free software were crap, it should still get our preference over the non-free crap secreted by IT corporations.
You're only here for a little time, why punish yourself?
Live while you're alive!
You can't take the money with you.

Last edited by Junior Hacker; 12-25-2008 at 04:00 AM. Reason: Added the last sentence.
 
Old 12-25-2008, 03:55 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Or you can download supergrub, which will automatically restore your grub.
 
Old 12-25-2008, 09:10 AM   #6
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Quote:
Originally Posted by JosipBroz View Post
No need to reformat anything. The solution is actually extremely simple: you have to make your GNU/Linux partition the active one. Currently, thanx to the not-so-clever "makeactive" lines in your menu.lst, the two Windows partitions will be re-activated when first booted into, putting you through all this hassle again. To summarize:
1 -- make the desired GNU/Linux partition (i.e. either sda5 or sda7) active (or "bootable" as they sometimes call it) with a suitable tool, such as gparted, fdisk etc.
2 -- comment-out both "makeactive" lines in your menu.lst by prepending a "#" (without quotes).
3 -- test your configuration.
4 -- post back, specifying any residual problems.
Cheerz & Good Luck
That will only work if Quercus ruber has Grub installed to the boot sector of his/her Linux partition that is marked as active; if Quercus ruber was previously using Grub in the MBR to boot all their OSes, it is not likely that the Linux partition will currently have Grub installed to the boot sector. What you describe could certainly work if Quercus ruber wants to install Grub to the boot sector of the Linux partition, but I think it is better to just install Grub to the MBR, because then you get the benefit of using Grub's stage1.5 file which has error reporting.
 
Old 01-07-2009, 01:58 AM   #7
Quercus ruber
Member
 
Registered: Mar 2004
Location: Bocholt, Germany
Distribution: Slackware
Posts: 135

Original Poster
Rep: Reputation: 24
Thumbs up Fixed

Hi

apologies for the delay - blame it on the holiday season. JosipBroz, your solution did not work because grub was installed in the MBR not on the boot sector of my linux partition.

I fixed it like this.

booted with a rescue cd

Code:
$ sudo su
# mkdir /mnt/test
# mount -t ext3 -o dev /dev/sda5 /mnt/test
# chroot /dev/sda5
# grub-install /dev/sda
# exit
# umount /mnt/test
Then I removed the windows 1 and 2 options from menu.lst

Now its fine.

For future reference:

http://www.supergrubdisk.org/wiki/Howto_Fix_Grub

Thanks to sycamorex for the supergrub link.

ros
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup software for dual boot XP & Linux desktop? gchandler Linux - Desktop 4 11-05-2008 01:36 PM
LXer: How to backup MySQL and recovery Using Zmanda Recovery Manager LXer Syndicated Linux News 0 09-10-2008 04:30 AM
GUI based Backup & Recovery Software cegres Linux - Newbie 3 02-12-2008 10:44 AM
LXer: Backup & Recovery LXer Syndicated Linux News 0 01-27-2007 05:54 AM
postgreSQL vs mysql: backup & recovery hank43 Linux - Software 1 08-30-2006 03:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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