View previous topic :: View next topic |
Author |
Message |
LegionOfHell Apprentice

Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Sat Jun 13, 2020 2:11 am Post subject: /etc/fstab and encrypted partition. |
|
|
/dev/sda1 is un-encrypted and is mounted at /boot
/dev/sda2 is encrypted ... and is the rootfs
What should i put in my /etc/fstab ? is the following correct:
Code: |
/dev/sda1 /boot vfat noatime 0 2
/dev/mapper/vg0-root / ext4 noatime 0 1
|
or is using UUIDs a MUST ? like this:
Code: |
UUID-of-/dev/sda1 /boot vfat noatime 0 2
UUID-of-/dev/mapper/vg0-root / ext4 noatime 0 1
|
|
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3596
|
Posted: Sat Jun 13, 2020 6:16 am Post subject: Re: /etc/fstab and encrypted partition. |
|
|
AFAIK lvm does not understand UUID, so /dev/mapper/vg0-root should be ok.
For /boot you should not need an entry at all. If you want one for convenience, prefer PARTUUID over UUID. |
|
Back to top |
|
 |
AlexJGreen Tux's lil' helper

Joined: 19 Sep 2018 Posts: 149
|
Posted: Sat Jun 13, 2020 11:23 pm Post subject: |
|
|
_
Last edited by AlexJGreen on Mon Dec 28, 2020 3:08 am; edited 1 time in total |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47017 Location: 56N 3W
|
Posted: Sun Jun 14, 2020 8:39 am Post subject: |
|
|
LegionOfHell,
For the root entry in fstab, use anything you like except a symbolic link.
The entry is only used by rootfsck to know the file system type.
Symlinks in fstab are a very bad thing. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
pietinger Guru

Joined: 17 Oct 2006 Posts: 508 Location: Bavaria
|
Posted: Sun Jun 14, 2020 9:20 am Post subject: Re: /etc/fstab and encrypted partition. |
|
|
LegionOfHell wrote: | What should i put in my /etc/fstab ? |
Copy your needed lines from this example:
Code: | # option "defaults" == "rw,suid,dev,exec,auto,nouser,async"
#
PARTLABEL=boot /boot vfat defaults,noauto,noatime 1 2
PARTLABEL=swap none swap sw 0 0
/dev/mapper/vg0-root / ext4 defaults,noatime 0 1
tmpfs /tmp tmpfs rw,noexec,nodev,nosuid,mode=1777 0 0
tmpfs /var/tmp/portage tmpfs rw,nodev,nosuid,size=10G,uid=portage,gid=portage,mode=775,noatime 0 0 |
... if you gave this partition-names to your partitions. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|