# Luks - able to mount root without using fstab?

## dman777

On a new install, I encrypted my root partition in Luks. I have successfully completed the full Gentoo installation. I can boot from grub into my Gentoo system, enter Luks password, and successfully be in my system on the command line. 

What is puzzling though, is that I have not placed the /dev/mapper/rootfs in my /etc/fstab. I am still able to boot into my system with the /dev/mapper/rootfs mounted as /. How is this possible? Am I truly not in my root file system even though it appears I am?

----------

## frostschutz

well, you can kind of get away not putting the / filesystem in fstab. After all - in order to read the fstab, / must already be mounted.

you are probably passing that info via your bootloader as kernel parameter, and/or through initramfs, which mounts / for you.

of course, you should still put it in fstab in the end, if only to check that the correct thing is mounted and with the options.

----------

## dman777

If it is not being used in fstab and that is confirmed, it should be removed. 

Here is my reasoning.... if you do luks on a SSD, you will need to throw in the `allow-discards` in GRUB(root_trim=yes). A user may not do this and instead place the option in fstab, where that entry will never actually be used. 

The consequence will be uneven wear on a expensive SSD with performance loss as a end result.

Who could I contact to have https://wiki.gentoo.org/wiki/Dm-crypt#Configuring_fstab removed?

----------

## frostschutz

 *dman777 wrote:*   

> If it is not being used in fstab

 

It is, in various ways. fstab is not just about mounting. Some file managers parse fstab entries to determine whether a path should be treated as an external/ejectable device or not, and stuff like that.

So you should still have the fstab entry, regardless whether it's required in early boot.

----------

## dman777

Correct, I was confusing Luks options with mounting options. 

For anyone that reads this:

 rootfs_trim(allow-discards) is a LUKS command. The discard option in /etc/fstab for /dev/mapper/root is a mounting option and has nothing to do with LUKS. rootfs_trim(allow-discards) is needed regardless of the 'discard' option in /etc/fstab. In my case, I use both.

----------

