You are not logged in.

#1 2014-08-10 21:33:00

Registered: 2009-01-14
Posts: 15

[SOLVED] Copying an install from Btrfs to Ext4

Basically, I've had my fun, it's time to go back to a non-experimental fs

My plan is:

1) Boot into livecd
2) mount the old root drive
3) cp -a the old root drive to a backup drive
4) format the old drive as ext4
5) cp -a everything from the backup back to the new ext4 formatted drive
6) arch-chroot and fix fstab etc
7) remove all mention of btrfs from kernel module config etc.

Anyone see issues with the above plan?

Edit: See the full list of things I did in my reply below

Last edited by habitue (2014-09-14 02:23:04)


#2 2014-08-10 22:27:13

Registered: 2014-04-08
Posts: 845

Re: [SOLVED] Copying an install from Btrfs to Ext4

Your plan is pretty much how I moved my install of a VM onto a physical drive (following the guide on the wiki)
I'd use rsync -a instead of cp -a, since afaik it also verifies the files transferred correctly via checksum verification. Don't know if cp does.

[ Arch x86_64 | linux | ThinkPad X220 | Intel Core i5 2540M@3.3Ghz | Intel HD3000 | 16GB RAM | Main, docked to 2 Monitors ]
[ Arch x86_64 | linux-ck-k10 | Custom-built | AMD Phenom II X4@3,5Ghz | nVidia 260 GTX | 12GB RAM | Retired ]
[ Arch x86_64 | linux | Custom-built | Intel Celeron G3920@2,99Ghz | iGPU | 8GB RAM | Home server ]


#3 2014-08-22 00:43:37

Registered: 2012-03-09
Posts: 75

Re: [SOLVED] Copying an install from Btrfs to Ext4

maybe run mkinitcpio again once you're chrooted into your new ext4 disk, as it may do some fsck stuff.  It can't hurt regardless.


#4 2014-09-14 02:22:25

Registered: 2009-01-14
Posts: 15

Re: [SOLVED] Copying an install from Btrfs to Ext4

I ended up doing a couple extra things:

1. I used dd to make a block level image of my btrfs disk out of paranoia
2. I used cp -a to make a file level copy, this worked fine
3. I generated my new fstab the usual way
4. I needed to modify mkinitcpio.conf to remove btrfs modules
5. [this was where I got hung up for a long time] I had to delete my old kernel images and completely regenerate them (pacman -S linux)
6. I uninstalled btrfs-progs, mkinitcpio-btrfs, and snapper (though I have no idea if this was necessary. I admit I was flailing a bit for a while)


#5 2014-09-14 03:52:28

Registered: 2012-09-27
Posts: 435

Re: [SOLVED] Copying an install from Btrfs to Ext4

I made similar migration recently and would like to add my 2 cents:

* if old partition was root then you need to modify 'root=' bootloader option (it is true for gummiboot and syslinux).
* if computer has BIOS and the old partition was boot partition then one needs to rerun bootloader installer that updates partitions information. In case of syslinux I used syslinux-install_update tool.

To sync files I was using `rsync -av from to` though it is the same as `cp -a`.

I think this information is valuable and should be documented somewhere in wiki.


#6 2018-11-07 22:57:56

Registered: 2016-11-08
Posts: 17

Re: [SOLVED] Copying an install from Btrfs to Ext4

what I made:
- saved root files with cp -aRv to a temporary location
- inserted the archlinux install usb drive
- created a new ext4 partition to be the new root
- copied the old files to the new ext4 partition
- mounted the partitions and swaps
- generated new fstab since its a new root and UUID (genfstab -U)
- chrooted
- grub-mkconfig -o /boot/grub/grub.cfg
- mkinitcpio - p linux

I think that was all. Hope not to messed up with files permissions.


#7 2018-11-08 00:05:42

Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 8,766

Re: [SOLVED] Copying an install from Btrfs to Ext4

Please don't necrobump, Magnesium. … bumping.22


Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.


Board footer

Powered by FluxBB