LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2007, 06:34 AM   #1
rrandrews
LQ Newbie
 
Registered: Oct 2007
Posts: 11

Rep: Reputation: 0
Problem with boot record / grub


I recently installed openSUSE 10.3 on a system that was using Kubuntu and it's boot loader. openSUSE is installed on a different partition. Now I can't for the life of me get rid of the Kubuntu boot loader. I've tried using yast->bootloader in suse (I can boot the installation using an option on the install disc), uninstalling grub from kubuntu, uninstalling/reinstalling grub from suse, using the boot recovery tools on the suse disc, and using the command "bo dd if=/dev/zero of=/dev/HD count=1 bs=512".

None of these attempts have had any effect on the boot loader. This is driving me insane!
 
Old 10-01-2007, 06:44 AM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
There is only 2 main boot loaders in Linux; Grub and Lilo.

Both Suse and Kubuntu use Grub as the standard boot loader. Thus by getting rid of Kubuntu Grub you get the same version 0.97 back in Suse, with the exception of the splash image.

A boot loader cannot be uninstalled because it is not part of a filing system. You overwrite one with another.

In any Linux with Grub you can instruct its boot loader to take over the MBR of the boot disk, say device sda by a terminal command in root console
Code:
grub-install /dev/sda
For Lilo the equivalent is
Code:
lilo -b /dev/sda
You can have 100 Linux but only one MBR. Therefore it is your right to allow any distro's boot loader to take control of the MBR by the above commands.
 
Old 10-01-2007, 06:59 AM   #3
rrandrews
LQ Newbie
 
Registered: Oct 2007
Posts: 11

Original Poster
Rep: Reputation: 0
I'm sorry, I didn't make the problem clear.

openSUSE doesn't show up on the loader that Kubuntu installed. Prior to installing Kubuntu, I had openSUSE and Vista running fine with grub from the opensuse installation. After installing Kubuntu (same partition as suse), the boot loader was changed. Now it only has three selectionsh, all new: Kubuntu, Kubuntu repair mode, and memtest.

When I installed opensuse 10.3, I installed it on a different physical drive. After installing, the boot options remained untouched.

Anyway, system's running at automated repair thing now and I'm stuck waiting on an fsck. I'll try your suggestion when it finishes. Thanks!

Last edited by rrandrews; 10-01-2007 at 07:06 AM.
 
Old 10-01-2007, 07:10 AM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
There are loads of tips in the last link of my signature.

If you know which partition Suse is residing you can boot it now manually with Kubuntu's Grub because by pressing "c" key at the booting Kubuntu's Grub screen you get a Grub prompt, which Suse's version conceals.

Say your Suse is installed in the 5th partition (or the partition where /boot is held) it will boot in a Grub prompt by command
Code:
root (hd0,4)
configfile /boot/grub/menu.lst
To make it boot automatically in Kubuntu you just edit the Kubuntu's /boot/grub/menu.lst with the addition of the above manual command prefixing it first with a title line indicating the name of the distro, something like
Code:
title Dude say my Suse in 5th partition of 1st disk known to Grub as (hd0,4)
root (hd0,4)
configfile /boot/grub/menu.lst
Adjust the partition number to suit your circumstance. If you still have a problem post here the output of
Code:
fdisk -l
The above work for any distro that has Grub!!!!!!!!!!!!!!!!

Last edited by saikee; 10-01-2007 at 07:12 AM.
 
Old 10-01-2007, 07:13 AM   #5
rrandrews
LQ Newbie
 
Registered: Oct 2007
Posts: 11

Original Poster
Rep: Reputation: 0
edit: didn't see latest post
 
Old 10-01-2007, 07:34 AM   #6
rrandrews
LQ Newbie
 
Registered: Oct 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Code:
root (hd0, 0)
configfile /boot/grub/menu.lst
pulled up the openSUSE boot menu but I couldn't load anything--I got "Error 17: Cannot mount selected partition."

Here is the result of fdisk -l:

Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d84b6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2611    20972826   83  Linux
/dev/sda2   *        2612       60801   467411175   83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a2a39

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       60801   488384001    7  HPFS/NTFS

Disk /dev/sdc: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x76ebeff0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       47889   384668361   83  Linux
/dev/sdc2   *       47890       48641     6040440    5  Extended
/dev/sdc5           47890       48641     6040408+  82  Linux swap / Solaris
sda is the openSUSE installation, sdc is Kubuntu.
 
Old 10-01-2007, 07:35 AM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Let's be frank about this.

With Kubuntu's Grub pressing the "c" key at the Grub screen can drop you into a Grub prompt.

In a Grub prompt there is no installed Dos, Windows, Linux, BSD, Darwin and Solaris that cannot be booted manually!!!!!!!!!!!

The manual instruction you boot in a Grub prompt is the commands you need in menu.lst, with the exception "title" statement is needed in menu.lst.

Suse's menu.lst has a "gfxmenu" statement that coneals the Grub prompt. You can claim Grub prompt back by disabling the gfxmenu statement by putting a "#" in front of it.
------------------------------------------------------------------------
In your case with sda, sdb & sdc

You may have told the bios to boot the disk in an order at variant with sda, sdb and sdc. So the right thing to do is to ask Grub to tell you what it sees, by Grub prompt command
Code:
geometry (hd0)
geometry (hd1)
geometry (hd2)
From the above you will find out if (hd0) is sda or not, or asking Grub to tell you which partition/disk has menu.lst
Code:
find menu.lst
Having find the two partitions, which should be Suse and Kubunu, then you can boot either of them with the manual commands already given to you.

If you have a problem then post the 3 geometry statements output here. You can activate a Grub shell in Linux to issue the same 3 goemetry statements to post their output here. The command in a Linux root console is simply
Code:
grub
A Grub prompt is the Grub at a state "before" an operating system is booted.

A Grub shell is Grub you obtain "after" a Linux has been booted. You can't use a Grub shell to boot a system but Grub is available to carry out various tasks.

Last edited by saikee; 10-01-2007 at 07:49 AM.
 
Old 10-01-2007, 08:41 AM   #8
rrandrews
LQ Newbie
 
Registered: Oct 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Ok, I figured it out. Or I fixed it anyway. GRUB was using the menu from hd2, I did
Code:
root (hd0, 0)
setup (hd0)
which, I guess, set it to use the drive I wanted. Also, openSUSE and the boot manager in yast was using hd1 instead of hd0 when creating the menu.lst for some reason.

Everything seems to be working OK now. Thanks!
 
Old 10-01-2007, 08:55 AM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Yast is a nice hardware handling program in Suse. No other Linux use Yast. Its boot loader is still Grub.

The Grub commands in your post #8 means you told Grub to "source" its Grub file from the 1st partition of the 1st disk or (hd0,0), as Grub counts from zero, and install itself in the whole of the 1st disk (hd0) which is the MBR.

It pays to understand the command if you multi-boot. In multi-boot you just boot to a partition as far as a Linux boot loader is concerned.
 
  


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
remove GRUB from windows partition boot record Krun Linux - Newbie 3 09-13-2007 05:51 PM
uninstalling grub loader from master boot record m3rlin6984 Linux - General 3 01-12-2006 04:12 PM
Grub: how to recover Boot Record for (hd0,0)? fishwombat Linux - General 1 04-27-2004 10:43 AM
removing grub from the Master boot record olubone Linux - Software 1 11-16-2003 04:06 PM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 03:22 AM


All times are GMT -5. The time now is 11:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration