LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE 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 Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

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
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
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 Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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