LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-15-2007, 01:47 PM   #1
rrrssssss
Member
 
Registered: Mar 2005
Posts: 266

Rep: Reputation: 32
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
 
Old 04-15-2007, 02:10 PM   #2
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
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.

Last edited by Randux; 04-15-2007 at 02:13 PM.
 
Old 04-15-2007, 08:56 PM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
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
.

Last edited by Junior Hacker; 04-15-2007 at 08:59 PM.
 
Old 04-16-2007, 04:46 AM   #4
rrrssssss
Member
 
Registered: Mar 2005
Posts: 266

Original Poster
Rep: Reputation: 32
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
 
Old 04-16-2007, 03:35 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
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.
 
Old 04-17-2007, 02:17 PM   #6
grahamatlq
Member
 
Registered: Dec 2006
Posts: 37

Rep: Reputation: 17
Lightbulb 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.
 
Old 04-17-2007, 09:42 PM   #7
vwvr9
Member
 
Registered: Feb 2005
Distribution: OpenSuse 10.1 / Centos 4.4
Posts: 60

Rep: Reputation: 15
tried running fdisk /mbr ?
 
Old 04-26-2007, 07:24 AM   #8
grahamatlq
Member
 
Registered: Dec 2006
Posts: 37

Rep: Reputation: 17
fdisk /mbr

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

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

It gives you more versatility than that!
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What folders+files to backup for near bare metal restore c_mitulescu Linux - Server 2 04-11-2007 11:40 AM
LXer: Methods of Linux Bare Metal Restore and Disaster Recovery LXer Syndicated Linux News 0 08-06-2006 08:21 PM
PXE bare metal provisioning kd93088 Red Hat 1 08-07-2005 08:58 AM
Can I do a Bare Metal Restore? bob151 Linux - Software 1 04-14-2005 06:41 PM
Bare-metal restore problems with Redhat ES 3.0 robthky Linux - General 0 08-12-2004 09:19 AM


All times are GMT -5. The time now is 04:46 PM.

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