I have a brand new SSD and I'd like to install 12.04 onto it with nilfs as the filesystem for the root partition.

I can't find any easy way of doing that. If I boot from the 12.04 LiveCD, I can install nilfs-tools (I had to download it via wget -- I couldn't seem to apt-get it) and I was able to format a partition as nilfs via mkfs.nilfs.

However, when I click "install Ubuntu" and start the installer and tell it I want to choose the partition, it wants to reformat it and only gives me options for other filesystems (reiser, ext, etc.) but no nilfs, even though nilfs support has been installed (I was able to create a nilfs filesystem on my partition).

Any tips or suggestions?


As Roland Taylor pointed out, you can first install to an ext4 partition using the installer, then transfer it to a nilfs partition.

Prepare a free partition for the system. It will be mounted as /, let's call it NILFS.

And you need another partition for installing Ubuntu, it can be a usb-disk or another partition on the disk, let's call it EXT.

You don't need a separated /boot partition, as grub 1.99 shipped with Ubuntu 12.04 already supports boot from nilfs2 file system.

Prepare the system

You do a normal Ubuntu install to EXT.

Install nilfs-tools, and format the free partition to nilfs2.

By default, Ubuntu's initramfs doesn't have the nilfs kernel module in it.

You need to regenerating it:

sudo echo nilfs2 >> /etc/initramfs-tools/modules
sudo update-initramfs -u

Transfer the system

Boot into Ubuntu 12.04 livecd. Install nilfs-tools. (You need to change sources in Software Center before apt-get install nilfs-tools.)

Mount EXT and NILFS, then copy your system:

sudo cp -ax /media/EXT/* /media/NILFS/*

(You can use rsync instead.)

Then edit your /media/NILFS/etc/fstab, change the line /. (Change the uuid, ext4->nilfs2. I recommend adding noatime,async,discard mount options for SSD.)

Then edit your grub configuration and reinstall grub. See Ubuntu Wiki for how to tweak with grub. Note that you need to change your grub config file before reinstalling. I suggest to chroot into NILFS, and just use dpkg-reconfigure to change config and reinstall at once.

Now you can reboot into your nilfs2 based Ubuntu 12.04! :-)

Though I've not tested it, but the above instructions should work. In fact, I've used the same method to transfer my Ubuntu 10.04 from ext3 to nilfs2. Since the grub of Ubuntu 10.04 doesn't support booting from nilfs2, I've used ext2 as /boot. But recently I've downloaded Ubuntu 12.04 live cd to test if 12.04 works on my netbook. So just now I've copied /boot/ back into / partition, changed my grub config file and used 12.04's grub-install to re-install grub. And it worked! (So maybe I can turn the useless separated boot partition into a small swap partition?)

P.S. If you don't like this method, you may try installing via debootstrap. I think it will work too.


Essentially you cannot do this as yet because the installer does not support it.

It may technically be possible to transfer an installation from say, EXT4, to NILFS (installing to a partition then transferring to the NILFS partition), but you would also need a separate boot partition (and as you can see this becomes increasingly complicated).

In essence, the answer is "you can't", for now. Also, remember NILFS is rather new, so support for a move like this is unlikely.

  • Ubuntu 12.04's grub has /usr/lib/grub/i386-pc/nilfs2.mod, so do we still need a separate boot partition in ext{2,3,4}? – weakish May 7 '12 at 10:58
  • @weakish: most likely not, but it's hard to tell. Remember more than just grub needs to have support for NILFS for it to be used in the installer. – RolandiXor May 7 '12 at 15:36
  • @Taylor Of course I mean via transferring as you mentioned (not use installer directly). – weakish May 7 '12 at 23:50
  • ugh, it's 6 1/2 years later, and I still don't see support in the installer? – Michael Dec 13 '18 at 22:38
  • @Michael it's a matter of adoption. I don't really think it's taken off much. You may need to open a bug report and request this feature. – RolandiXor Dec 19 '18 at 6:22

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.