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

What is an init system? Editor: This is a short and to-the-point article to read if you want to get a proper understanding of how your Linux system boots. Back in Fedora 1...
Autologin, passwordless login and controlling who can reboot and shutdown your computer in... Autologin and passwordless login play a critical role in the physical security posture of your computer. In KDE, they are very easy to configure. But ...
How to install Orange in Ubuntu 13.04 Orange, a Free Software released under the GNU General Public License, is a modular machine learning and data mining application developed at the Bioi...
How to replace LibreOffice with Apache OpenOffice on Fedora 20 For almost a year now, I've seldom had to use any component of LibreOffice, the default Office suite on virtually all desktop Linux distributions. ...
How to dual-boot Linux Mint 10 or Ubuntu 10.10 and Windows 7 on a computer with two hard d... The first two articles on dual-booting Windows 7 and Linux distributions published here involved installation on a computer with a single hard drive. ...
GNOME 3: From an end-user’s perspective Released just a few days ago, GNOME 3 is the latest major version of the GNOME desktop environment. If you are currently running a GNOME-based Linux o...

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 *