Copy Your Linux Install to a Different Partition or Drive
If you need to move your Linux installation to a different hard drive or partition (and keep it working) and your distro uses grub this tech tip is what you need.
To start, get a live CD and boot into it. I prefer Ubuntu for things like this. It has Gparted. Now follow the steps outlined below.
- Mount both your source and destination partitions.
Run this command from a terminal:
$ sudo cp -afv /path/to/source/* /path/to/destinationDon’t forget the asterisk after the source path.
- After the command finishes copying, shut down, remove the source drive, and boot the live CD again.
- Mount your destination drive (or partition).
- Run the command “gksu gedit” (or use nano or vi).
Edit the file /etc/fstab. Change the UUID or device entry with
the mount point / (the root partition) to your new drive.
You can find your new drive’s (or partition’s) UUID with this
$ ls -l /dev/disk/by-uuid/
- Edit the file /boot/grub/menu.lst. Change the UUID of the appropriate entries at the bottom of the file to the new one.
- Run sudo grub.
At the Grub prompt, type:
find /boot/grub/menu.lstThis will tell you what your new drive and partition’s number is. (Something like hd(0,0))
root hd(0,0)but replace "hd(0,0)" with your partition’s number from above.
setup hd(0)but replace "hd(0)" with your drive's number from above. (Omit the comma and the number after it).
That’s it! You should now have a bootable working copy of your source drive on your destination drive! You can use this to move to a different drive, partition, or filesystem.
|Nativ Disc||Sep 23, 2016|
|Android Browser Security--What You Haven't Been Told||Sep 22, 2016|
|The Many Paths to a Solution||Sep 21, 2016|
|Synopsys' Coverity||Sep 20, 2016|
|Naztech's Roadstar 5 Car Charger||Sep 16, 2016|
|RPi-Powered pi-topCEED Makes the Case as a Low-Cost Modular Learning Desktop||Sep 15, 2016|
- Readers' Choice Awards 2013
- Android Browser Security--What You Haven't Been Told
- The Many Paths to a Solution
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Nativ Disc
- Synopsys' Coverity
- Naztech's Roadstar 5 Car Charger
- Securing the Programmer
- RPi-Powered pi-topCEED Makes the Case as a Low-Cost Modular Learning Desktop
- CodeLathe FileCloud Google Chrome Extension
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide