Re: saved into the mbr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 22 November 2004 01:50, Alexander Dalloz wrote:
> Am So, den 21.11.2004 schrieb Sharon Kimble um 15:53:
> > In the near future I want to change the hard drive that this machine
> > boots from, the one where the whatever it is, is in the mbr. Is there any
> > way in which this 'whatever it is' can be saved to a CD, so that I can
> > still boot into linux after I've installed windows 2000 on the new drive,
> > and then put the 'whatever it is' into the new mbr?
> >
> > Sharon.
>
> Don't know what you plan with the CD, but you should certainly become
> common with grub. I.e. see following article
>
> http://www.fedoranews.org/contributors/bob_kashani/grub
>
> Maybe see further grub documents and the manpages.
>
> In general the MBR can be kept into a file by running
>
> dd if=/dev/hda of=/mbr.saved bs=512 count=1
>
> given that the drive with holding the MBR is the primary ATA drive.
>
> Alexander

Of course, restoring that on a different drive sutffs up the partition table 
big time.


A week or so ago I move my (Debian) Linux system to a new drive. Here's what I 
did.
0. Install new drive:-)
1. Insert old drive into a disk caddy.
2. Boot from CD. I likely used Knoppix, but anything wth a decent toolset 
including Fedora/Red Hat's CD will do.
3. (very carefull) dd if=/dev/hdc of=/dev/hda bs=$((1024*1024))

Once that completed I had a 30 Gb disk image at the front of a 120 Gb disk.
4. e2fsck -a /dev/hda1
   e2fsck -a -F /dev/hda2

5. fdisk /dev/hda
# Delete hda2 and create a new bigger one. About 40 Gb in this case

6. resize2fs /dev/hda2
7. e2fsck -a /dev/hda2

At this point I have 80 Gb into which I could (were I so foolish:-)) install 
Windows XP.

Having done that, I'd reboot from CD and reinstall grub:
install-grub '(hd0)' # or similar.




-- 
Cheers
John


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux