| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Using the GRUB bootloader to multi-boot

This version was saved 16 years, 6 months ago View current version     Page history
Saved by PBworks
on September 17, 2007 at 12:03:13 pm
 

 Using the GRUB bootloader to multi-boot.

 

Before you start.

Before you start installing another Operating System to an existing installation, you should back up your MBR [Master Boot Record] in case this gets trashed during the installation. A good place to save it is to removable media such as a floppy disk or a USB Pen-drive.

 

  • Simple way, using the dd command : --

 

[code]

paul@PAULS:~$ dd if=/dev/hda of="/home/paul/My Documents/backupMBR/backupfile.mbr" bs=512 count=1

1+0 records in

1+0 records out

512 bytes transferred in 0.022755 seconds (22501 bytes/sec)

paul@PAULS:~$

[/code]

 

With the result : --

 

[code]file:/home/paul/My Documents/backupMBR/backupfile.mbr  512 B[/code]

 

Note :

If you have made changes to your partitions, when restoring the MBR, use this : --

 

[code]

dd if="/home/paul/My Documents/backupMBR/backupfile.mbr" of=/dev/hda bs=448 count=1

[/code] leaving the last 64 bytes unchanged, as this points to the partition table and you do not want to change this.

 

If this had been written to removable media it would be a bit easier to access when needed, but a liveCD will be able to get back to this file also.

 

Further information on this topic found at [url]http://ubuntu.wordpress.com/2005/10/20/backing-up-the-mbr/[/url]

 

 


 

  • Here is a posting with different methods, worth knowing about.

http://www.tux.org/pub/people/kent-robotti/looplinux/backup-mbr.readme

 Unfortunately it does not work for me in Linspire 5.0.59 - 'file not found' error, meaning the app. is not installed.

[quote]
=============================================================================
You can use 'backup-mbr' to backup and restore your MBR.

The (M)aster (B)oot (R)ecord is the first 512 bytes of your hard drive,
and you should always have a current backup of your MBR!

To hold the MBR, you can use any media with a filesystem on it,
but the filesystem on the media must be supported by the kernel!

In addition to backing up the MBR of the hard drive you specify, it also
makes a backup of the boot sector from each partition on the hard drive.

Backup MBR from /dev/hda to directory /mbr/hda on /dev/fd0.
# backup-mbr -b -d /mbr/hda hda fd0 "If directory doesn't exist, will create."

Restore MBR to /dev/hda from backup in directory /mbr/hda on /dev/fd0.
# backup-mbr -r -d /mbr/hda hda fd0

Restore boot sector to /dev/hda1 from backup in directory /mbr/hda on /dev/fd0.
# backup-mbr -r -d /mbr/hda hda1 fd0

If you want to backup the MBR to a multi-session CD-R/RW, do this.
# backup-mbr -cd-multi -b -d /mbr/hda hda hdc

You can specify the cd device the old (pre kernel v2.6) way, like this.
# backup-mbr -cd-multi -b -d /mbr/hda hda 0,0,0

You'll need 'cdrecord' and 'mkisofs' installed, and have a CD in the
drive '/dev/hdc'.

If it's not a multi-session CD-R/RW, do it this way.
# backup-mbr -cd -b -d /mbr/hda hda hdc "CD will be written multi-session."

The non multi-session CD-RW must be blank, blank it first if it's not.
cdrecord blank=fast dev=/dev/hdc "You'll loose anything on the CD!"

Or, if you want this script to blank the CD-RW.

# backup-mbr -cd-blank -b -d /mbr/hda hda hdc

Restore MBR to /dev/hda from backup in directory /mbr/hda on /dev/hdc.
# backup-mbr -r -d /mbr/hda hda hdc

<dwilson24@nyc.rr.com>

[/quote]

 

Now to the taks of setting up your hard drive(s) for multibooting.

 

 

Comments (0)

You don't have permission to comment on this page.