Re: easiest way to replace hard drive?

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

 



On 10/08/2009 09:48 AM, Dr. Michael J. Chudobiak wrote:
> Hi all,
>
> Is there an easy way to transfer a system from one drive (holding
> boot, swap, lvm partitions, in the default F11 layout) to a different
> hard drive, if the new drive is smaller?
>
> If the new drive is larger, dd could be used in a fairly
> straightforward way.
>
> However, I want to try replacing a 160 GB hard drive with an Intel 80
> GB solid-state drive, just for fun...
>
> I suspect a re-install might be easier.
>
> - Mike
>
For me:

1) Shutdown and install the drive
2) Boot LiveCD (I use Ubuntu because "partition manager" is included)
3) Partition new drive with "partition manager"
4) mkdir /mnt/a /mnt/b
5) mount /dev/sdXx /mnt/a   (Old)
6) mount /dev/sdYy /mnt/b   (New)
7) (a) cp -a /mnt/a/. /mnt/b/. OR
    (b) rsync -avz /mnt/a/. /mnt/b/.
8) umount /mnt/a /mnt/b
9) Repeat steps 5-8 for each partition to copy over
10) rmdir /mnt/a /mnt/b
11) Relabel each new partitions (Label or UUID), update fstab & grub (if
included)
12) execute: grub
      (a) find /grub/stage1  <-- locate the boot (grub) partitions of
all drives seen by the Bios
      (b) root (hdX,Y)  <-- set the root to the new drive's boot partition
      (c) setup (hdX,Y) <-- sets up the new drives's MBR with root
(boot) partition information
      (d) quit
13) Remove LiveCD & shutdown or reboot
14) Set remove the old drive OR set the BIOS to default to
      the new drive OR add new drive information to old drive grub

Note:
The above assumes that new drive has enough space
for the data copied over from the old drive partitions as
step 7 copies only the data and not the entire partition image.

FWIW,
Dan

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux