Let’s make a root(
/) partition except
/boot directory be
btrfs supports a copy-on-write functionality.
For the reason of excepting
/boot partition, the Ubuntu document warns against including Grub into
… As of 11.04, it is possible to use only btrfs file systems with the caveat that grub ‘MUST NOT’ be installed to the boot sector of the btrfs volume containing /boot.
As a result, I decided to make the
/boot partition be separated from the root(
Live bootable USB or Live CD of Ubuntu (refer to link: Making Live bootable USB)
Make boot partition be separated from your btrfs partition. (refer to link: Create boot partition after installation)
Grub Legacy (not Grub2. Refer to link: Downgrade Grub2 to Grub Legacy)
Basically, refer to the link for a whole process. This article is just for supporting the referenced site.
Problems & Solutions
Booting with Live USB
During the process, you need to
umount the directory to be converted to
btrfs. In this article, we are converting the whole root partition, so it is required to be booted with Live USB. Otherwise, you will fail to command
btrfs-convert, being prompted something like:
/dev/sda1 is mounted.
btrfs-tools in Lively booted system
You might fail to install
apt-get cannot find the package from repositories. Including all the repository will resolve this problem.
Go to Application > Ubuntu Software Center
From menu, Edit > Software Sources
Check all the list in Download from the Internet
apt-get install btrfs-tools
sudo dpkg -i btrfs-tools_0.19+20100601-3ubuntu3_amd64.deb
Without this updated tool, you cannot delete
If you succeeded in
btrfs-convert, the following messages will be prompted.
ubuntu@ubuntu:~$ sudo btrfs-convert /dev/sda1 creating btrfs metadata. creating ext2fs image file. cleaning up system chunk. conversion complete.
Change UUID in
With Grub Legacy we need to modify
root=UUID value in
menu.lst file to
btrfs partition’s manually. I used the following lines for Grub’s
title Linux 184.108.40.206 uuid 89591593-766e-4565-9d5c-017fb0e33298 kernel /vmlinuz-220.127.116.11 root=UUID=a90c79b1-5883-44cc-9e74-752db9ca764d ro initrd /initrd.img-18.104.22.168
In this example,
a90c79b1-5883-44cc-9e74-752db9ca764d is the UUID of
btrfs partition and
89591593-766e-4565-9d5c-017fb0e33298 is UUID of
Also, I used following lines for my
/dev/sda3 /boot ext4 defaults 0 0 /dev/sda1 / btrfs defaults 0 1
As you can see, I just wrote a path (
/dev/sda1) instead of UUID as described in the referenced site.
Because some scripts and hooking are added to
initrd images in
/boot directory should be updated.
I could not update them with command (i.e.
update-initramfs -u -k all) described in the referenced site. It was guessed due to the kernel version difference between Live USB and my original installation. I designated the kernel version as a parameter like below and it worked.
update-initramfs -u -k 22.214.171.124
Good luck! :)