LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Computer Will Not Boot After Bare Metal Restore (https://www.linuxquestions.org/questions/linux-general-1/computer-will-not-boot-after-bare-metal-restore-546265/)

rrrssssss 04-15-2007 01:47 PM

Computer Will Not Boot After Bare Metal Restore
 
Hello forum,

I have a question concerning the MBR and its ability to find the root partition of my first Linux partition (Mandriva on hda1).

Last month I cloned my main internal IDE hard drive (250 gig) onto a larger hard drive (500 gig) using disk cloning software (Acronis) and it was a success, with no problems whatsoever. I have four operating systems on this hard drive, Mandriva, Windows, Debian, and Fedora and the boot manager Grub worked fine.

Then I performed a full system backup of the new larger hard drive (using R-Drive Image) because I am a firm believer in backups.

All went well until yesterday. I messed up the file system in Mandriva (ext2 file system) due to an umproper shut down and fdisk couldn't seem to fix it.

So I ran a bare metal restore from the backup image I made but when I re-booted my computer, everything stopped in its tracks without an error message (blinking curser only) right at the point where the boot manager should have launched.

So when I attempted to let the Mandriva recovery disk re-install the Grub boot loader, I got an error message that the root partition of Mandriva (hda1) could not be found.

If I enter the BIOS setup and change the first hard drive's parameters from "auto" to either "large" or "LBA", the computer will then boot straight into Windows. All three Linux distributions are then ignored, as well as any boot manager. I normally keep the hard drive's parameters set to "auto".

Just for the record, I have exceeded the 1024 cylinder boundry according to some warning messages I have gotten in times past, saying this normally should not cause problems except for older boot managers and some disk partitioning programs. Other than that, I have never had any problem with exceeding this 1024 cylinder boundry.

I have never had problems with my backup and restore software (R-Drive Image) until after I cloned my hard drive. I have used it successfully for years.

So, my main question would be, is there a way to make the MBR see the root partition of hda1?

Or is there a way to make Mandriva see the root partition when I attempt to re-install the Grub boot loader with the recovery disk?

I would also like to ask how can I partition this hard drive so that I will not exceed this 1024 cylinder boundry, just in case that is causing problems?

If anybody would try to help me, I would be most appreciative.

Thanks in advance,
Roy

Randux 04-15-2007 02:10 PM

Why are you trying to fix an ext2 fs with fdisk? You should be fixing it with fsck.

What do you get as the output of

fdisk -l # must do this as root

If you have a printed record of your MBR you can restore it by manually using fdisk. If you have a backup you can restore it with fdisk.

Ignore 1024 cyl warnings from any modern BSD or Linux distro on hardware made within the past 5-10 years.

Junior Hacker 04-15-2007 08:56 PM

Although I have not had the opportunity to restore grub with Mandriva, I have played with this in Mandrake 10.2, they are not much different in most other aspects, so I don't think it will be much different than the instructions below to restore the boot loader. Hopefully, it will set up the other Linux distributions also. And as Randux mentions, don't worry about the 1024 limit, those days have long past.

Code:

Restore boot loader Mandrake 10.2 2005 LE

1: Boot the computer with the first install CD or DVD in the drive.
2: When given the option to press enter to install or press a F(x)
combination where (x) represents a number for options, press the
appropriate F(x) key to see the options. Most often you need to
type: linux rescue    at the prompt if there is no rescue related
option.
3: The installer will load drivers into memory and should present
a list of rescue operations. If a progress bar shows up and goes to
the end and appears to hang there, hit the "Esc" key on the keyboard
to view the list of options.
4: If you see an entry like so: "Re-install Boot Loader", highlight
it if needed by using the arrow keys, then hit the "Tab" key on the
keyboard to highlight the "OK" switch and hit enter.
5: Linux will mount the installation and ask to press Enter to
continue, hit "Enter"
6: It will do it's thing and tell you to press Enter to return to
Rescue GUI, hit "Enter".
7: At the GUI with the list of options, use arrow keys to highlight
"Reboot", then hit "Tab" key till "OK" is highlighted and remove the
disc from the drive, hit "Enter" to reboot

.

rrrssssss 04-16-2007 04:46 AM

A Fix
 
Hello again forum,

I fixed my problem, at least for the most part.

I re-installed Mandriva and changed the hard drive's parameters from "auto" to "LBA". It had been on "auto" ever since I have had the computer and never caused problems.

But now I am getting an error message in Windows (different partition on same hard drive) when I launch Partition Magic saying the hard drives geometry seems to have changed and not to use this program. As a result of the different drive geometry, Partition Magic shows the first hard drive as being bad even though everything seems to work fine on it. (Forgive me if necessary for mentioning Windows).

So my question would be, Does changing "auto" to "LBA" really change the hard drive's geometry? And if it does, can that cause problems?

Thanks for bearing with me,

Roy

Junior Hacker 04-16-2007 03:35 PM

Code:

Does changing "auto" to "LBA" really change the hard drive's geometry?
No
Depending on the bios that is installed, I would tend to think it use LBA whether it is set to Auto or LBA

Extended CHS, also called ECHS or large mode in some BIOSes, uses BIOS translation to get around the 504 MiB size barrier inherent in standard CHS mode.


Quote:

Author: Charles M. Kozierok

Regular addressing of IDE/ATA drives is done by specifying a cylinder, head and sector address where the data that is required resides. Extended CHS (Large) addressing adds a translation step that changes the way the geometry appears in order to break the 504 MiB barrier, but the addressing is still done in terms of cylinder, head and sector numbers (they are just translated one or more times before they get to the actual disk itself).

In contrast, logical block addressing or LBA involves a totally new way of addressing sectors. Instead of referring to a cylinder, head and sector number, each sector is instead assigned a unique "sector number". In essence, the sectors are numbered 0, 1, 2, etc. up to (N-1), where N is the number of sectors on the disk. An analogy would be as follows. Your address (assuming you live in the U.S. and have a regular address) is composed of a street number, street name, city name and state name. This is similar to how conventional CHS addressing works. Instead however, let's say that every house in the U.S. were given a unique identifying number. This would be more how LBA works.

grahamatlq 04-17-2007 02:17 PM

restoring a badly configured hard drive
 
I have to say that your problems seem to indicate the tool you used did not properly back up or restore the MBR.

You have a catch all method of recovery at your fingertips.

1. Download the latest Kubuntu CD. This is the KDE version of Ubuntu so the desktop will be similar to Mandriva.
2. Put it in your computers CD rom and power up.
3. ensure the PC boots the Kubuntu CD (you should see the logo)
4. Boot the CD (it will not alter your hard disk)
5. When you get the desktop run up a Konsole switch to root and run parted. This is a command line partitioning tool.
6. Type help at the prompt and you will see one of the commands is "rescue" and another is "rm"
7. Remove all the partitions you think are suspect with "rm" and then run "rescue" to recover the real partition layout.

If you have any problems you should be able to connect to the internet and find solutions from the live CD.

I would suggest you reset your BIOS setting to auto before starting this.

If you need more help you can email me at: linuxquestions at grahams dot idps dot co dot uk.
I have a lot of experience recovering trashed hard drives so I'm sure I can help you.

Thanks.

Graham.

vwvr9 04-17-2007 09:42 PM

tried running fdisk /mbr ?

grahamatlq 04-26-2007 07:24 AM

fdisk /mbr

That's a DOS/Windows thing isn't it.

Won't work in Linux since Linux doesn't use a Microsoft bootloader. :tisk:

It gives you more versatility than that! :rolleyes:


All times are GMT -5. The time now is 02:53 AM.