Hello everyone.
I would like to recover my grub installation in a dual boot system. Could you please tell me if there is an easy way to recover grub using flash disk?
If yes is your suggestion opensuse developed? (currently running 11.3) . It would be nice also to have some gui just to make things easier. If not I assume that then the only option is the boot from dvd. Is that right?
Take a look at this thread and see if it does answer some questions: Re-Install Grub Quickly with Parted Magic
You might be able to get PartedMagic on a flash disk.
Reference the MBR, I note it is often prudent BEFORE a Linux install to back up the MBR BEFORE the Linux install.
One of the members are our office Linux Users Group (LUG) pointed out this interesting “dd” command method to backup the MBR to me (below):
In the example given, we are assuming the first hard disk is /dev/hda. In the newer systems, IDE drives, SCSI drives and USB drives/sticks are considered as SCSI devices, so the first drive is /dev/sda, thus the commands are:
Backup MBR (as root):
dd if=/dev/sda of=MBR-backup bs=512 count=1
and then store the file “MBR-backup” someplace (such as on a memory stick).
It is very important to get that command EXACT (ie do NOT reverse content of “if” and “of”). The idea of the backup being if one breaks the boot, then with another dd command one can restore the MBR.
Restore MBR (as root, WARNING!)
dd if=MBR-backup of=/dev/sda bs=512 count=1
Its very simple but it is INCREDIBLY IMPORTANT that one makes no errors in the dd command, as the consequences could be unpleasant.
Please also note, that if you have changed your partition layout and wish to only restore the boot loader (and not the partition table as well) then restore with
On 2010-11-20 12:06, oldcpu wrote:
>
> Reference the MBR, I note it is often prudent BEFORE a Linux install to
> back up the MBR BEFORE the Linux install.
…
> Code:
> --------------------
> dd if=/dev/sda of=MBR-backup bs=512 count=1
> --------------------
>
Be warned that this stores also the partition table. If you partition your
system (you are installing linux, so you will) and then restore this way,
your partition table will be changed back to the previous state and linux
will be “destroyed”.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)
Be warned that this stores also the partition table. If you partition your
system (you are installing linux, so you will) and then restore this way,
your partition table will be changed back to the previous state and linux
will be “destroyed”.
This is the reason for
note “bs=446”
For that matter, it is the reason for my post, was I not clear with my explanation?
Yes, but it arrived here after I sent mine. Both your post and mine are
timestamped “13:06”.
I didn’t realise that, but looking at it now, the extra clarification is a good thing anyway!
A mistake with this could be costly, or at least painful. Having said that, it’s a worthwhile precaution if done correctly.
On 2010-11-20 22:36, dvhenry wrote:
>
>> Yes, but it arrived here after I sent mine. Both your post and mine are
>> timestamped “13:06”. I didn’t realise that, but looking at it now, the extra clarification
> is a good thing anyway!
> A mistake with this could be costly, or at least painful.
Very much so if you are a newbie…
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)
Actually, If you intend to save the full partition layout, you may want to use a command like,
sfdisk -d /dev/sda > part_layout.txt
and restore with
sfdisk /dev/sda < part_layout.txt
as the above “dd” command only saves the needed info for the primaries (including the extended) but not all that may be needed for your logical partitions.
I need to correct my statement on this - I’ve only successfully used 446 with Linux and winXP and NOT with win7 nor Vista. I had thought I had used it with win7, but when I checked my notes as to what I actually did that day, it was NOT with win7 that I used the dd command.