Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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