The new GRUB can handle the / boot partition in btrfs format, so now you do not need to have a separate partition formatted in ext2 / 3/4.
Further we assume that your entire file system is represented by one partition. If you have every partition under / usr /, / var, etc. create a separate partition then modify them separately, according to the instructions below.
So let's get started ...
1. Make a backup section. No one is responsible for the possible loss of data other than yourself!
2. Download and burn to a Debian Wheezy CD or USB stick (or newer).
3. Boot from the created boot image.
4.
fsck -f /dev/sdaX
(where / dev / sdaX is the root partition)
5. Check if your favorite text editor is available (vim, ed, mine, etc.) and btrfs-tools, if not, then install them.
6.
btrfs-convert /dev/sdX
7.
mount /dev/sdX /mnt
8. Mount the / proc, / dev, / sys partitions into / mnt:
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
9.
chroot /mnt
10. Edit / etc / fstab, find the line for the root partition (/) and change the UUID to a direct description of / dev / sdX, change the file system type from ext3 / ext4 to btrfs, remove the “extra” options by simply defaults, replace number 1 to 0.
11.
ls -la /boot
You should see a file like: initrd.img-3.1.0-1-686-pae.
The line after 'initrd.img-' is the version of the kernel that should be used further.
12.
mkinitramfs 3.1.0-1-686-pae -o /boot/initrd.img-3.1.0-1-686-pae
13.
grub-install /dev/sdX
14.
update-grub
15.
exit
(exit the chroot environment)
16. Unmount the / proc, / dev, / sys and / mnt sections into / mnt:
umount /mnt/proc
umount /mnt/dev
umount /mnt/sys
umount /mnt
17. Overload and pray.
18. After a while, the system should boot up, enter 'mount' and make sure that it works on btrfs.
19. Execute:
update-initramfs -u -t -kall
If everything went well, you can safely delete the backup / ext2_saved that was created during the file system conversion process. We do it like this:
btrfs subvolume delete /ext2_saved
ps: Free translation of the
article .