Install Mageia 1 on an encrypted btrfs file system

Mageia is a new Linux distribution forked from Mandriva. The first release was just last month and it has since been reviewed on this website. (See Mageia 1 review.) Btrfs is a relatively new file system in the Linux kernel, It is a copy-on-write file system with built-in support for, amongst other features, subvolumes (the same functionality provided by LVM, the Linux Logical volume Manager), filesystem-based RAID 0, 1 and 10, online resizing and several other enterprise-grade features.

It is still under heavy development, and not yet recommended for use in a production environment. The man page for btrfs utilities specifically warns that it “… is currently under heavy development, and not suitable for uses other than for benchmarking and review.” It is, however, the default file system on MeeGo, and is slated to be the default on Fedora 16. What that points to is it will also be the default on other Linux distributions before very long. This then is a good time, if your favorite distribution supports it, to start getting used to it.

This tutorial offers the simple steps needed to install Mageia 1 on an encrypted btrfs file system. You do not have to encrypt it, but disk encryption is one of several methods that you may use to boost the physical security profile of your computer.

To start, download an installation image of Mageia from here. You may download any image, Live, Network-install, or a DVD image. Boot the system from the CD or DVD you made from the downloaded image and click until you get to the disk partitioning step. This is a standalone installation, but it is possible to install a btrfs-based Mageia alongside another distribution or operating system in dual-boot fashion.

The images used in this tutorial were taken from an installation in a virtual environment. The first step is to delete existing partitions, so unless your disk is a brand new one, select each partition and click Delete.
Mageia Btrfs

Now that we have a “clean” disk, time to start creating partitions. Before you start, click Toggle to expert mode. Btrfs is not an option in normal mode, so you need to be in expert mode to be able to complete this tutorial. Once in expert mode, select the disk, then click Create.

Note: When setting up a btrfs-based system, three partitions are recommended. These are for /boot, Swap, and /, the btrfs root.
Mageia Btrfs 1

For the boot partition, a size of 500 MB should be more than enough and the mount point should, of course, be /boot. In this example, I set the file system type to btrfs, but you do not have to use btrfs for /boot. So you may want to ignore my choice here and select Linux native (ext2). If this is the first partition on the disk, the installer will create it as a primary partition, even if you do not specify it here. OK.
Mageia Btrfs 2

With the boot partition created, select the free space and click Create.
Mageia Btrfs 3

The second partition will be for Swap, disk space that the system may use as virtual memory. 2 GB is usually enough for Swap. Set the “Preference” to “Primary” and set the “Filesystem type” to “Linux swap.” For added security, encrypt this partition. OK.
Mageia Btrfs 6

There should be no reason to check for bad blocks, so click OK. If you are curious, it wont hurt to check. Note that this step and the next one will be repeated when you configure the last partition.
Mageia Btrfs 5

The right choice here is OK.
Mageia Btrfs 7

The third and last partition will be for the btrfs root. If Mageia is the only distribution or operating system you are going to install on the disk, assign all available disk space to it. To prevent the installer from creating this as a logical partition, set the “Preference” to “Primary.” Enable encryption and specify and confirm an encryption passphrase. OK.
Mageia Btrfs 8

Partitioning is completed. Click Done to continue with the rest of the installation.
Mageia Btrfs 9

The partitions sans Swap will need to be formatted. Next. Complete the installation and when you reboot, the passphrase you specified for the root partition will be needed to boot into the system. Note that if you wish to add another layer of physical security to the system, you can password-protect the boot loader. The step to do that, if you are installing from a DVD or Network-Install image, is at the Summary step, just before your settings are written to disk.
Mageia Btrfs 10

You can have quality articles like this delivered automatically to your Feed Reader or Inbox by subscribing via RSS or email. This website now has a Question and Answer section. Use the commenting system for simple comments, but for more involved assistance, please use the Question & Answers section.

Related Posts

Tips for dual-booting Windows and Linux Multi-booting, installing more than one operating system on a computer's hard drive(s), has become very popular over the years, fueled, of course, by ...
Manual LVM disk partitioning guide for Fedora 17 Anaconda, the Fedora system installation program, is one of the easiest and most feature-rich graphical installation programs available on any distrib...
How to install Linux Mint 12 KDE on a btrfs file system While we are still waiting for Btrfs, the B-tree File System, to be mature enough and be used as the default file system in Linux, it is already possi...
How to dual-boot Linux Mint Debian Edition and Windows 7 This is the latest article in the series on dual-booting Linux and BSD desktop distributions with Windows 7. And this one provides step-by-step direct...
How to install Linux Mint Debian Edition on an encrypted LVM file system Linux Mint Debian Edition (LMDE) is the edition of Linux Mint that is based on Debian Testing. Like the edition of Linux Mint based on Ubuntu, the ins...
Manual disk partitioning guide for Linux Mint Debian The latest ISO installation images for Linux Mint Debian, the line of Linux Mint based on Debian, were made available for download a few days ago. Whi...

We Recommend These Vendors

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).

Deploy an SSD Cloud server in 55 seconds on DigitalOcean. Built for developers and starting at $5:00/month (20 GB SSD, 512 MB of RAM).


  1. Pingback: Install Mageia on encrypted btfs « 0ddn1x: tricks with *nix

  2. Pingback: Links 23/6/2011: Red Hat’s Record Financial Performance, Scientific Linux 5.6 is Out | Techrights

Leave a Comment

Your email address will not be published. Required fields are marked *