You are not logged in.
Hello,
as I finally fine-tuned and repeatedely tested Windows installation in Virtualbox to my complete satisfaction I have no use for the stock Win7 installation on the 1st partition more.
I know I can format it to ext4 and mount as additional partition or use LVM but I would like to copy/move my current ArchLinux system to this 1st partition and then extend it to use the whole disk as a single ext4 partition + one swap partition. I'm asking if it's enough to copy whole contents with
cp -r --preserve-all /mnt/oldpartition/ /mnt/newpartition
to do "verbatim" copy/clone or am I missing something here ? The previous code should copy all file attributes and capabilities. The original install is on Ext4 partition. As the last step is to update etc/fstab and grub config of course.
Offline
Even simpler, you don't even need a live-cd for this. It's in the wiki.
Offline
That might work. It does avoid the pitfalls of recursively moving down the /mnt directory. I am not sure what happens to links -- be they hard or soft.
You might check out this article: https://wiki.archlinux.org/index.php/Fu … with_rsync
Edit: Rats, snaked again !
Last edited by ewaller (2012-10-07 17:45:30)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Nice idea to use rsync, thanks. Anybody with a personal experience ? Are there some pitfalls or is such method on par with cp concerning reliability and completeness ?
Offline
If you plan on moving it, you may need to reinstall the bootloader, which is very easy: chroot and reinstall like it says in the Beginners' Guide. Use an Arch "live" medium to be able to run the "arch-chroot" script instead of typing all of that.
Last edited by DSpider (2012-10-07 19:46:52)
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
I have used rsync and tar to move a filesystem. I wanted to change filesystems, and it worked no problem. That is be beauty of everything being a file.
I think I may end up doing this again soon, as I read reports that jfs will support trim in an upcoming kernel release.
Offline
You would be better off useing 'cp' with the '--archive' flag. That will make sure everything is correct i.e. symlinks, bla, bla. When doing things like this I always do them one directory at a time i.e. /root /bin /sbin . . . to avoid any problems.
If the current Arch partition and the Windows partition are back-to-back then you could just delete the Win part and expand the Arch part. Then expand the ext4 filesystem.
Last edited by hunterthomson (2012-10-08 01:25:07)
OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec
Offline
I don't understand why cp would be better than rsync or tar, since they all have options to preserve permissions, acls, etc.
Offline
If the reason for the move is because of a space issue, you should look into LVM. With that you can adjust the partition size on-the-fly.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
I've migrated my system to different drives on two occasions, the first time using cp and the second time using rsync.
I learned that cp doesn't necessarilly preserve ALL attributes (case in point was that "ping" stopped working unless I was root, because the SUID got messed up), whereas rsync preserved everything. I also quite like the --exclude option of rsync, allowing for a selective migration in a single command whilst not copying stuff you don't need to.
Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703
/ is the root of all problems.
Offline
I've migrated my system to different drives on two occasions, the first time using cp and the second time using rsync.
I learned that cp doesn't necessarilly preserve ALL attributes (case in point was that "ping" stopped working unless I was root, because the SUID got messed up), whereas rsync preserved everything. I also quite like the --exclude option of rsync, allowing for a selective migration in a single command whilst not copying stuff you don't need to.
That's why you have to pass --preserve-all option. In your case file capabilities (see man 7 capabilities) were not preserved.
Offline
-a, --archive
same as -dR --preserve=all
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline