LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 04-12-2012, 11:16 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,650

Rep: Reputation: Disabled
Change active MBR from /dev/sdb to /dev/sda. How?


I currently boot from sdb (because FreeBSD killed my boot from sda). I want to restore the GRUB-MBR to sda.

I tried "man grub-install" but the SuSE people sort of castrated that alleging that YAST could do all and more, better. Fine. When I use YAST's boot loader module it offers to restore the currently active MBR of sdb. No chance to change hard disks.

Any idea how to do it (short of using "dd")?
 
Old 04-12-2012, 12:39 PM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,265

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
Unless you have / on sda, a script like yast will usually think it knows better than you.

There is some gimmick in grub.comf
map hd0 hd1
map hd1 hd0

To do exactly what you say in grub-speak. I would consider inserting it, or deleting it.

as for man grub-install, forget it. Grub thinks man pages don't exist; for you are the infinitely infuriating 'info grub' pages :-). Grub & tar are the only programs that come to mind which force users to use info pages. Info pages generally seem to be a maze with no way out.
 
1 members found this post helpful.
Old 04-12-2012, 02:16 PM   #3
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,626

Rep: Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725
Have you tried the standard method? Open a terminal as root user enter grub to get a grub prompt (grub>) then enter:

Quote:
root (hd1,3)
setup (hd0)
quit
The example above should install Grub to the mbr of sda pointing to the system partition with boot/kernel file on sdb4. You can use the geometry command at the grub prompt and compare it to your fdisk output to assure that sda is the same as (hd0), which it should be but is not always the same. geoemtry (hd0) at a grub prompt should show you info on partitions as grub sees them for sda. This is for Grub Legacy which I believe Opensuse still uses?
 
1 members found this post helpful.
Old 04-13-2012, 01:09 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,650

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Unless you have / on sda, a script like yast will usually think it knows better than you...
Well, / is on sda, but I still don't have access to sda's MBR.

Quote:
Originally Posted by business_kid View Post
There is some gimmick in grub.conf...
No need, I can boot. I just want my MBR restored.

Quote:
Originally Posted by business_kid View Post
as for man grub-install, forget it. Grub thinks man pages don't exist; for you are the infinitely infuriating 'info grub' pages :-). Grub & tar are the only programs that come to mind which force users to use info pages. Info pages generally seem to be a maze with no way out.
Well and truly spoken . As an aside: the "man" and "info" texts are identical...

@ yancek Thanks a lot. I found that out after I posted though I didn't know the geometry command. And yes, SuSE uses GRUB-legacy, they will probably switch with 12.2. Again, thanks.

Summing up: YAST can't deliver.

Last edited by JZL240I-U; 04-13-2012 at 01:13 AM.
 
  


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
RHEL 6 after boot primary partition shows /dev/sdb instead of /dev/sda vipul_patel Red Hat 1 04-26-2011 09:48 AM
iscsi: which local device (/dev/sda, /dev/sdb) is used WITHOUT dmesg? knikkerr Linux - Software 3 08-13-2010 04:30 AM
/dev/sda & /dev/sdb keeps swapping name sinister1 Linux - Hardware 4 02-18-2008 01:44 AM
RHEL4U5 install changes /dev/sda to /dev/sdb bhoch Red Hat 8 12-05-2007 06:33 AM
forcing the order of /dev/sda /dev/sdb etc.. jdaniel Linux - Software 5 05-23-2006 07:41 AM


All times are GMT -5. The time now is 10:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration