LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-19-2022, 03:33 PM   #1
Uddercup
LQ Newbie
 
Registered: Oct 2022
Posts: 2

Rep: Reputation: 0
Recreating fstab for a LUKS drive that was accidentally deleted


I was having trouble booting my system and in the process of following some directions incorrectly and trying to fix it, I accidentally overwrote my fstab file. Now I'm having trouble recreating it in order to be able to log in. Currently the system will boot, ask for the encryption password, run fsck, and then take me to the dekstop login screen. After typing in my password however, the screen will flash black for a few seconds, then return to the login screen. I'm not 100% sure this is caused by the fstab, but it started happening after I accidentally overwrote it. I was able to find this old thread with some helpful information, but I'm still having issues.

This is what my fstab currently looks like:
Code:
# <file system> <mount point>   <type>  <options>   <dump>  <pass>
/dev/mapper/luks-7523dc92-a54d-4cce-8c8a-8f46a3ca4edd /     ext4    defaults    1   2
/dev/mapper/luks-4dd38da4-6cc6-46cd-87bf-096bbc83b75e /l    ext4    defaults    1   2
And this is what my crypttab looks like, this is unchanged from when the system was working previously:
Code:
# /etc/crypttab: mappings for encrypted partitions.
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# See crypttab(5) for the supported syntax.
#
# NOTE: You need not list your root (/) partition here, but it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies
#       to encrypted swap, which should be set up with mkinitcpio-openswap
#       for resume support.
#
# <name>               <device>                         <password> <options>
luks-7523dc92-a54d-4cce-8c8a-8f46a3ca4edd UUID=7523dc92-a54d-4cce-8c8a-8f46a3ca4edd     /crypto_keyfile.bin luks
luks-4dd38da4-6cc6-46cd-87bf-096bbc83b75e UUID=4dd38da4-6cc6-46cd-87bf-096bbc83b75e     /crypto_keyfile.bin luks
"l" is the name of my login, so I chose that as the mounting point in fstab, though I'll admit that was a complete guess.

Does anyone know what needs to be done to correct the fstab? Barring that, is it possible to reinstall just the OS while keeping my programs, data, and settings intact?

Thanks in advance!
 
Old 10-19-2022, 09:29 PM   #2
PsychoHermit
Member
 
Registered: Aug 2021
Location: Carson City Nevada
Distribution: Debian Testing
Posts: 136

Rep: Reputation: Disabled
I believe /l should be /home/l

That shouldn't stop it from booting though.

[edit] Reinstalling will not overwrite your settings etc. as you have a separate home partition. [/edit]

-glenn

[edit[ Right, that should have been /home [/edit]

Last edited by PsychoHermit; 10-22-2022 at 04:08 PM.
 
1 members found this post helpful.
Old 10-21-2022, 06:26 PM   #3
Uddercup
LQ Newbie
 
Registered: Oct 2022
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by PsychoHermit View Post
I believe /l should be /home/l

That shouldn't stop it from booting though.

[edit] Reinstalling will not overwrite your settings etc. as you have a separate home partition. [/edit]

-glenn
Thank you for this reply! While it wasn't the exact solution, it did point me in the right direction.

I changed the path to /home/l and still had the same issue after rebooting; got to the login screen, logged in, hung on a black screen, then dropped back on the login screen. Next I tried changing the path to /home/ and sure enough, logged in right to the desktop with no issues. I'm both overjoyed and a little annoyed the solution ended up being so simple.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accidentally decrypted my LUKS Debian disk using Veracrypt in Windows, and now it won't boot WindowsVeteran Linux - Security 2 08-11-2022 03:56 PM
[SOLVED] Recovering a deleted partition table of a LUKS encrypted flash drive b92kvmomim Linux - Newbie 11 05-18-2017 09:35 AM
Problem with fstab.rootfs in on an dm-crypt/LUKS encrypted SATA drive Elthemor Linux - General 0 12-26-2013 08:44 AM
Accidentally Deleted 1 TB Drive Useing Startup Disk Creator 9876543210 Linux - Hardware 1 10-20-2010 02:18 AM
recreating previously deleted users box_l SUSE / openSUSE 1 12-10-2004 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration