help restore MBR from imagefile and booting successfully

Other questions, messages

Moderator: feffer

ron7000
Posts: 3
Joined: Tue Sep 13, 2011 11:11 pm

help restore MBR from imagefile and booting successfully

Postby ron7000 » Tue Sep 13, 2011 11:23 pm

Hi, I tried using partimage 0.6.9 today. Can someone explain the MBR and what's happening when you choose "Restore an MBR from the imagefile" and how to correctly choose the following from the two columns on the next screen that comes up?

my goal is to clone a sas hard drive in an sgi server. The os is SLES 11.1. The drive is partitioned /dev/sda1 from cylinder 0..9 (around 70MB) and /dev/sda2 from cylinder 9..max. I successfully created the imagefiles for sda1, and did a split on sda2 to 4gb.
I put a blank disk in the system and partitioned the new disk the same as the old and successfully wrote the images to the new (blank) disk, for this I chose "Restore partition from an image file" for both sda1 and sda2. On power up with new disk the server bios sees the new disk and i boot it, linux starts booting but then fails a little way in. Sorry, I don't have the screen output but i can post tomorrow. It was regarding I think the / partition and not seeing it on the correct scsi id, it said could not find / or could not find /dev/sda2 on scsi-id-bla-bla-bla.
Now when I created the image files, I had a working disk running sles11.1 and it was mounted and running under /dev/sdb#. My original good disk I had all set to clone was under /dev/sdc# but not mounted, and the blank disk which i manually partitioned to be the same as sdc came up under /dev/sda# and also was not mounted in linux.

ron7000
Posts: 3
Joined: Tue Sep 13, 2011 11:11 pm

by device id and persistent name

Postby ron7000 » Wed Sep 14, 2011 12:07 am

think i figured out what's happening:

http://www.novell.com/support/viewConte ... &sliceId=1

I know the drive or partition is mounted in linux by device id, not by device name. And from what i can remember the error i saw seemed like a mount error, so according to novell i need to make an image file of my gold disk having at least the root partition in /etc/fstab mounted by device name.
makes sense at least since the new disk would have a different scsi id than the one it was cloned from.

i also noticed in yast - partitioner there was an expert option "clone disk". I haven't tried it, i wonder if that takes care of the mount by device id problem. will find out tomorrow.

ron7000
Posts: 3
Joined: Tue Sep 13, 2011 11:11 pm

Postby ron7000 » Wed Sep 14, 2011 7:11 pm

well suse's clone disk sucks. it does not work. novell apparently cannot count and add correctly.... when i made the original disk from the installation dvd i made the /boot/efi partition go from cylinder 0..9 and it was 70.xx MB in size. The root / partition goes from 9..32xxx and is whatever in size. When I try to use yast clone disk in partitioner it fails, because it wants to do cylinder 0..9 for sda and 10..end for sdb.
What I also found is I cannot specify cylinder 0..9 and 9..end for the new disk when I simply try to partition it in partitioner, it throw an error and wants to do 0..9 and 10..end. And if I let it do that then the /boot/efi partition, which is /dev/sda1, is a different size than the original. In order to get it the same size I have to tell it cylinder 0..8 to format as FAT and then it's the same 70.xx MB.

on the brighter side, I was able to save a partimage file of sda1 and sda2, write it to a blank disk already partitioned after figuring the numbering out to get it the same size. I had booted my gold disk and changed the mounts for sda1 and sda2 to "by device name" however this was not enough. The boot would still fail because it still tried to mount the root partition by device id. The fix for this was editting elilo.conf in /dev/sda1 which is mounted as /boot/efi. I first did this by preempting the boot process and editting elilo.conf. I saw in there it had root=/dev/disk/by-id/scsi-35000blabla-part2. I changed this to root=/dev/sda2 and the system booted and worked fine. So the catch was, on my gold disk, to not only change the mount points in /etc/fstab to by device name, but also the bootloader which is found under yast - system - boot loader, this is a gui that lets yast do the editting of the /boot/efi/elilo.conf file, which all I needed to do is set "root=/dev/sda2". There is also an /etc/elilo.conf file that should be editted to preserve this if/when the kernel is updated, which the gui takes care of also.


Return to “Miscellanous”

Who is online

Users browsing this forum: No registered users and 1 guest