You are not logged in.

#1 2014-09-18 11:23:23

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 304

Copying entire Archlinux OS to other disk with different filesystem

Hello,

I got a new disk, however it will have a different filesystem, has different size, and is different type (SSD vs HDD) than where my Archlinux is currently installed. I'd like to use the SSD for the OS to speed up things.

Would it work to cp or dd everything from e.g. /dev/sda1 to /dev/sdc1, and would it boot up correctly? Or would I need to do more things such as changing fstab? Do you think it will be possible, or would it be faster to just install a new Arch?

Any hints and things I should keep in mind appreciated.

Thanks!

Offline

#2 2014-09-18 11:49:36

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: Copying entire Archlinux OS to other disk with different filesystem

Is to consider that dd is rather slow (6~7 Mib/sec), preferring rsync would do better, once the destination is formatted.
In case to have a backup in between I suggest fsarchiver or clonezilla. That will save your data with several options, including splitting down to DVD or other media size. Doing so you will have a warranty that if in case something gone bad you may go back to the previous state.


do it good first, it will be faster than do it twice the saint wink

Offline

#3 2014-09-18 16:14:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Copying entire Archlinux OS to other disk with different filesystem

Offline

#4 2014-09-18 16:48:43

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Copying entire Archlinux OS to other disk with different filesystem

aardwolf wrote:

I got a new disk, however it will have a different filesystem

This immediately rules out dd - use cp, as suggested on karol's wiki link above, or rsync.

Offline

#5 2014-09-18 18:08:17

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Copying entire Archlinux OS to other disk with different filesystem

Of course you would have to change at least your fstab and bootloader config to point at the new partitions to make the cloned system boot.
Also make sure that you keep permissions etc. with cp or rsync.

Personally, I would probably just reinstall the whole system, but I like to do that anyway every once in a while.

Last edited by ooo (2014-09-18 18:19:32)

Offline

#6 2014-09-18 20:54:21

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Copying entire Archlinux OS to other disk with different filesystem

I've successfully transferred partitions to both smaller and larger partitions on differerent drives, even changing filesystems, using fsarchiver.  I was very pleased.  I would not use fsarchiver to move a Windows partition.

Offline

#7 2014-09-19 11:08:37

Painless
Member
Registered: 2006-02-06
Posts: 233

Re: Copying entire Archlinux OS to other disk with different filesystem

I did a similar thing a year back, an old laptop I'd been given would not boot from USB or CD.  I removed the HDD, connected it to another PC running Arch, partitioned, formatted it, then mounted the volumes.  Mounted and copied data (from an even older laptop) over into each partition on the newer laptop HDD using rsync.  Mounted and chrooted into /(root) on the "new" HDD, ran grub-install (adjusted syntax for correct HDD), grub-mkconfig.  Re-installed the HDD back in the (newer) old laptop.  That laptop has been in use for the past year.

Having said that, if I had had the option to run a fresh install, I would have done that instead.  The above took quite a while, I was unsure how it would turn out, all very 'last resort'  smile

Last edited by Painless (2014-09-19 11:11:31)

Offline

#8 2014-09-19 17:00:53

nstgc
Member
Registered: 2014-03-17
Posts: 393

Re: Copying entire Archlinux OS to other disk with different filesystem

Along this same line of thought, I'm thinking about changing how I handle my fallback Arch install. Currently I an Arch installed on a separate drive with a different filesystem (ext4 instead of btrfs) and I update it every now and then. I don't really like this method since ideally the fallback should be a day or two behind the one I use mainly.

The alternative, it seems, would be to write a script that rsync's a two day old snapshot of my main Arch installation to this other partition, and then makes modifications to the fstab. My main Arch installation fails, I can install grub to bring this other installation up to full functionality. This seems to be preferable to me, especially since I would have a fully functional installation as opposed to one that might need to be tweaked a bit. This way I can hold out till a week end or something before fixing my main installation.

Thoughts on this?

Offline

Board footer

Powered by FluxBB