[how to] lmde on nilfs2 root partition on my ssd.

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

[how to] lmde on nilfs2 root partition on my ssd.

Postby dann0 on Wed Jul 11, 2012 6:26 am

ok guys i am writing this because though it is a common thing i didn't see any single tutorial that had all the needed information to do this from the installer. some gurus might be saying "that's why i compile my own..." but this is for the guys that use the graphical installer but still want to take advantage of the nilfs2 file system which tends to run very well on ssd's. it seemed strait forward and was easier than it would have been in the past because grub v2 does support booting nilfs2 but there were a couple challenges that required some googleing and i learned a couple things. the hold ups were A. the initramfs, and B. the default fstab configuration.

requirements:
bootable dvd or flash drive with lmde installer on it.
internet connection, preferably wired to avoid wifi support issues.
computer you desire to install lmde on.

first step is to boot the computer into the installer live dvd.
once you are booted you will notice that nilfs is not an option in gparted nor the install program. gparted doesn't seem to support nilfs but that's ok, the installer can do the final format and does support nilfs2 but only after the package is installed. you can use the graphical package manager or switch to console (CTRL+ALT+F2) and type sudo apt-get install nilfs-tools this will install the needed files to support nilfs partitions for this live session. you can switch back to the GUI with CTRL+ALT+F7. if it promts you for a password type 'root' (no quotations) you have to use console because there is a password bug in terminal on the live dvd.

now run through the installer to till you get to the location for the installation. when you select edit it will open gparted, do this if you need to create a new partition table. gparted will not give you the option to format as nilfs2. that's ok just leave it as the default ext4 and apply changes.

close gparted and in the installer right-click on the root partition or any other partition you want to run as nilfs2 and chose edit, choose the mount point / and choose the nilfs2 option under format.

finish running the installer but don't reboot you are not done. the system is installed but the installed system doesn't have support for the file system it's installed on just yet and some configuration is wrong.

now your hard disk is likely still mounted, we want to remount it as something easier to type like. you need to know the device name of the root partition. mine was /dev/sda1 you can see mounted devices by typing 'mount' in command line, if it's not mounted for some reason it might show if you type 'cat /proc/devices' but i'm unsure. you can also right click the desktop icon and look at properties. once you know the device name you can mount the hard drive as something easier to type than the likely long label the system gave it. i used /target as it was used in this tutorial.

http://www.mail-archive.com/linux-nilfs ... 00994.html


to do this i opened console and typed
su
mkdir /target
mount -o remount,rw /dev/<your device name here> /target
if that doesn't work try to unmount it with 'umount /<device name>'
then mount it as /target with 'mount /dev/<device name> /target'

now we need to add the nilfs2 module to the initramfs so the kernel can read the file system on boot.
follow the tutorial above or type 'echo nilfs2 > /target/ect/initramfs-tools/modules' i'm sure using the pipe like in the tutorial works fine but it looks odd to me, just not how i ussually do it...
alternatively you could use the gedit to open /taget/ect/initramfs-tools/modules and add nilfs2 to the bottom of the text file.

now update the initramfs (this is what i needed the tutorial for. )
su
mount --bind /proc /target/proc
chroot /target /usr/sbin/update-initramfs -u

now you have support for nilfs2 in the initramfs but the fstab is configured to run fsck by default which isn't supported on nilfs2.
open /target/etc/fstab in gedit, either graphical or commandline and locate the entry for / at the end of the entry change the '1' to a '0' this will disable fsck on boot. you may also want to add relatime,discard to the mount options to improve performance. some people like to use noatime but it can possibly break certain programs that use the last accessed time and the last modified time.

now you may reboot and enjoy your nilfs2 root partition. you may still need to install the nilfs-tools package in the actual installation but the kernel module is in the initramfs so it can read it, i'm not sure if you can resize partitions without nilfs-tools though. no need to compile your own build with nilfs support or migrate from an ext partition. in many cases nilfs2 on a ssd give remarkable performance and i know my system is as fast as it's ever been. i hope this helps others that are trying to do this but can't get a strait answer.. i know i saw a lot of "nilfs is not ready for root yet," or "ext is recomended for root" type of answers on different boards. it's like people throw in their $0.02 when they don't know the answer so they can still feel superior...
dann0
Level 1
Level 1
 
Posts: 4
Joined: Fri Nov 19, 2010 7:56 pm

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 3 guests