grub installed improperly to MBR on sdb1, not sda1

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

grub installed improperly to MBR on sdb1, not sda1

#1 Post by nubc »

I installed Wary 511 to a blank Seagate SATA hard drive. All went well until I manually installed legacy grub to /dev/sda1. I didn't take the precaution of disconnecting an ext2 SATA hdd for data storage, sdb1, and for some reason grub wanted to install to the MBR on this drive, after I had installed grub on sda1, which was flagged as the boot drive. There is no OS on this data drive sdb1, so I do not understand why grub wanted to go there. I inspected menu.lst (on sda1) and found an odd mixture of sda and sdb in the text, and so I edited to change most instances of sdb to sda. In any case, the computer would not boot after this faulty install of grub, not even to the grub boot menu. So I disconnected sdb1 and ran grub install from live CD to sda1 again, and now the computer boots as expected. However, I am concerned that the MBR on sdb1, which will remain in the computer for the forseeable future, has a false grub installed to it, and I would like to restore MBR on sdb1 to original state. How to do this?

Additionally, I must temporarily install the old hdd that the new drive is replacing in order to transfer data. This old hdd also has Wary 511 on it, and it is also flagged as boot. So there is potential for confusion in this operation. For example, during the improper install of grub to the MBR of sdb1, I went into BIOS to change boot order and observed that the two SATA drives are listed as "SATA 0" and "SATA 2". Whoa, SATA 2? What happened to SATA 1? Hence, I assume that BIOS is renaming drives, maybe Wary is renaming drives, and I don't know what is going on. Nevertheless, I must hook up the old drive internally, because I don't have SATA connectors to perform this operation through USB. Any suggestions or recommendations?

Don't assume this is a easy full install of Wary to SATA hdd. In fact, this install has many issues, most of which have been previously resolved.
http://www.murga-linux.com/puppy/viewtopic.php?t=74536
Last edited by nubc on Thu 18 Oct 2012, 04:19, edited 1 time in total.

User avatar
Hotdog
Posts: 134
Joined: Fri 30 Sep 2011, 03:15
Location: Georgia USA

#2 Post by Hotdog »

nubc,

Can the drives be set to master and slave status? My apology if this is too obvious.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#3 Post by nubc »

No Master and Slave for SATA drives. I hooked up the old drive as a single and removed the boot flag, then installed it in the sdb1 position with the new drive in sda1 position, and the data transfer went without a hitch. I have now hooked up the data drive as sdb1 in the final drive configuration with new Wary install in sda1 position, and it seems to be working normally. So all that remains in the project is to restore the data drive's MBR, assuming it has an MBR, and assuming its MBR has been corrupted. Still have to check SATA drive number assignments in BIOS.

Code: Select all

Drive 0  SATA 0
Drive 1  SATA 2
Drive 2  PATA 0
Drive 3  PATA 1
Drive 1 SATA 2 was OFF in BIOS. I set it to ON, but this doesn't change anything. Upon booting up, data drive sdb1's desktop icon appears as unmounted.

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

grub installed improperly to MBR on sdb1, not sda1

#4 Post by Monsie »

Hi nubc,

I think your drive is probably okay. You can run

Code: Select all

fdisk -l
at the terminal to check it.

If you are really worried that the mbr may be corrupted, you can restore it with the following command:

Code: Select all

dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb1
assuming that sdb1 is the name of the drive that you want to repair... so adjust the label accordingly.

As is often the case, there is usually more than one way of fixing things... this particular method is one of the easiest and will work in Wary Puppy.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

Post Reply