dd whole arch install?
Hi there, I am using Arch Linux for a couple of months (basically since Dota2 got its Beta Client on Linux), and I still lack some basic knowledge sometimes :)
I got 2 SSDs in my computer, a 128GB (sdb) and a newer 512GB (sda). Arch happens to be installed on the smaller one. Now i would like to move the whole install over to the 512GB SSD (its a bit faster too).
Am I right in thinking that i need to:
- Boot a live usb stick
- dd if=/dev/sdb of=/dev/sda
- resize the partitions afterwards
- update my syslinux bootloader to deflect the change from sdb to sda?
Is that all? Am i missing something?
EDIT: See below how i did it actually :)
Edited 7 Dec 2013. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 30 · 100% up
- Kind
- Text
- ID
- 1sbfvu
26 comments
That would work, but it would also waste a lot of time copying empty blocks to the new SSD. You're better off creating the partitions on the new disk and copying the files over.
Wow thanks I forgot about that. Would even stress the flash cells. A simple copy will do the trick? I am planning to remove the older 128GB SSD from the PC, so what about the MBR?
basically chroot in your copy on sda and then update & install syslinux
It might not stress the cells if the disk has enough logic to ignore writes of zeroed blocks. I suspect that they will. However, the driver will do what it's told and still send the command and data, wasting the amount of time it takes for the data to be sent and the drive to tell the OS that it's completed. That's probably small for individual blocks, but over the course of 128GiB it could add up.
As for the MBR, the people that have suggested chrooting are spot on. After copying the files, just treat it like a step in the installation process since you're using a liveusb.
why not rsync? You could rsync your whole /* or you could just set up a new install and rsync over important stuff.
Use rsync! From the wiki...
no idea what rsync is, will give it a read now :)
Definitely do that. Simply create new partitions and file systems, use
rsyncto copy files over (there's probably many howtos online, but you should still read thersyncmanpage). Then adjust the file system UUIDs in fstab and syslinux.cfg and reinstall syslinux.This method will be better for your SSD than using
dd.Another post suggests using
cp- that works when using the correct options, butrsyncis better suited for this task.Here is what i did:
Everything is fine now, thank you very much everyone
Now i can go over to the next task, change the file system from ext4 to btrfs :)
You have used cp -a, right? RIGHT?
yeah I did, ty :)
You could have formatted your new partitions as btrfs and it would have worked. Also the resize2fs was unnecessary because the copy was filesystem-agnostic.
This is what i did afterwards today. Came out i wasnt quite happy with that so I also splited / and /home on 2 btrfs volumes.
dd is data wasteful for this, you'll have to resize anyway and may be time wasteful if there is an error.
Use a tar pipe instead and unlike cp -p, will preserve permissions AND recreate special files.
(note: the v on both sides is for verbose output and will slow down the transfer significantly but nice to see progress)
You can
rsyncthe whole os excluding folders such as/mntand/media. I use rsync to backup the entire Arch install on an external drive.I just wanted to say that I have in fact done this before when I got my ssd and I was moving from my larger hard disk to my smaller one. What I did is I moved all my larger data off onto another partition, shrunk the partition to the same size as my ssd, did a dd image of my now proper-sized partition, and then dd'd it to my ssd.
I have to do it soon, too. But I planned using CloneZilla. It looks better.