Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hey,
I'm using CentOS and I'm banging my head on the wall as to how to get the luks partition to mount on boot while using the UUID of the device. It is working with using the /dev/mapper/cryptPart.
here is /etc/fstab right now
Code:
#
#
# /etc/fstab
# Created by anaconda on Wed Sep 5 08:38:18 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=13e31a3e-d1d6-4092-85ac-205e1b13ce11 / ext4 defaults 1 1
UUID=14ef3e84-2d3b-417a-be7f-a73cb06c56f2 /boot ext4 defaults 1 2
UUID=3de803fc-3e0d-43c8-821f-af3b957cd6e5 /home ext4 defaults 1 2
/dev/mapper/cryptPart /cryptDir ext4 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
here is /etc/fstab with UUID
Code:
#
#
# /etc/fstab
# Created by anaconda on Wed Sep 5 08:38:18 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=13e31a3e-d1d6-4092-85ac-205e1b13ce11 / ext4 defaults 1 1
UUID=14ef3e84-2d3b-417a-be7f-a73cb06c56f2 /boot ext4 defaults 1 2
UUID=3de803fc-3e0d-43c8-821f-af3b957cd6e5 /home ext4 defaults 1 2
###/dev/mapper/cryptPart /cryptDir ext4 defaults 1 2
UUID=713450fb-0c30-4ff6-a3a7-e88d4638c621 /cryptDir
ext4 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
the error that i keep on getting while trying to boot is this(it asks me for my password though first)
Code:
fsck.ext4: Device or resource busy while trying to open /dev/vda4
Filesystem mounted or opened exclusively by another program? [FAILED]
***An error occurred during the file system check.
***Dropping you to a shell; the system will reboot
***when you leave the shell.
***Warning - - SELinux is active
***Disabling security enforcement for system recover.
*** Run 'setenforce 1' to reenable.
Give root password for maintenance
(or type Control-D to continue):
edit: here is the output to cryptsetup luksDump /dev/vda4 | grep UUID
Code:
UUID=713450fb-0c30-4ff6-a3a7-e88d4638c621
Last edited by malak33; 09-07-2012 at 01:37 AM.
Reason: added cryptsetup luksDump /dev/vda4, edit for /etc/fstab (posted wrong VM) :(
VDP76- tried what you suggested and it doesn't work for me
michaelk- i tried what you suggested and it works. However, the reason I'm trying to get this to work is for the RHCSA exam I'm taking on Monday this is about the only thing i don't know how to do on their list of Exam objectives
Quote:
Configure local storage
List, create, delete, and set partition type for primary, extended, and logical partitions.
Create and remove physical volumes, assign physical volumes to volume groups, and create and delete logical volumes.
Create and configure LUKS-encrypted partitions and logical volumes to prompt for password and mount a decrypted file system at boot.
Configure systems to mount file systems at boot by Universally Unique ID (UUID) or label.
Add new partitions and logical volumes, and swap to a system non-destructively.
thats from Red Hat
as you can see from my /etc/fstab everything else is using the UUID, do you think I'll be fine or am i overthinking this?
Apologies for posting on a old thread but I was stuck on this issue studying for the RHCSA. I tried everything and know that the luks was working as I could mount it manually but not through /etc/fstab. I found that my fsck selection was too low, which I think caused some issues checking the mount before checking the passphrase.
All I did to this fix this was change the last /etc/fstab setting from 4 to 2. Below is the current setting which works, but when I had the fsck setting to 4 (the last column), I got the prompt to enter the passphrase, but right after that it reverts to maintenance mode.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.