You are not logged in.

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

habitue
Member
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)

Offline

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

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

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 | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

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

rh995
Member
Registered: 2012-03-09
Posts: 76

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.

Offline

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

habitue
Member
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)

Offline

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

anatolik
Developer
Registered: 2012-09-27
Posts: 458

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.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

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

Magnesium
Member
Registered: 2016-11-08
Posts: 19

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.

Offline

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

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

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

Please don't necrobump, Magnesium.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB