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 06-04-2023, 03:26 PM   #1
grounddolphin
LQ Newbie
 
Registered: Mar 2023
Posts: 12

Rep: Reputation: 0
Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or


Hi, need your help please. I am new in linux and was trying things in my Centos 7. When i boot my system, i got the error below


" Welcome to emergency mode! After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or ^D to
try again to boot into default mode.
Give root password for maintenance
(or press Control-D to continue): "

ive got, 2 hdd and 1 hdd is sda1 and second hdd is sdb. To better understand, here is the clearer view of my partition.

Thanks a lot..
Attached Thumbnails
Click image for larger version

Name:	hdd.jpg
Views:	276
Size:	90.1 KB
ID:	41148  
 
Old 06-04-2023, 04:08 PM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Did you try "journalctl -xb" to see the system logs to get an idea of what went wrong?
 
Old 06-05-2023, 06:10 AM   #3
Wouterplop
LQ Newbie
 
Registered: Jun 2023
Posts: 3

Rep: Reputation: 0
fstab

Hello There,

I have encounter this as wel a few times.
But you have to read the journal to find you're problem indeed.

For me it was some folder location's and disk mount issue a couple of times.
Those startup mount location needs to be correct and can be modified with fstab.

Its mostly so simple in my experience but finding it without knowledge is difficult.

Regards,

Wouter
 
Old 06-05-2023, 06:46 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
When you have found the error messages, post them here and someone should be able to show you how to fix the problem.
 
Old 06-06-2023, 03:53 PM   #5
grounddolphin
LQ Newbie
 
Registered: Mar 2023
Posts: 12

Original Poster
Rep: Reputation: 0
thanks for all your help..

i attached here the error which i think is causing, not sure if this is the right one.

before i got the error, i was testing on LUKS on backup-databckup (is it called LVM or what is the proper term for that)

this was the command i run, then i shutdown. Maybe there is still some commands i need to run after the last command below which is the mount command. Just wanted to know, if i did some mistakes on the commands below.

- sudo umount /backup/data
- sudo shred -v iterations=1 /dev/backup/databckup
- sudo cryptsetup -v luksFormat /dev/backup/databckup
- sudo cryptsetup luksOpen /dev/backup/datackup databackup
- sudo mkfs.ext4 /dev/mapper/databackup
- sudo mount /dev/mapper/databckup /backup/data/
Attached Thumbnails
Click image for larger version

Name:	error1.jpg
Views:	190
Size:	66.0 KB
ID:	41160   Click image for larger version

Name:	error1-1.jpg
Views:	137
Size:	49.6 KB
ID:	41161  
 
Old 06-06-2023, 07:06 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,147

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Those commands look ok - I'd guess you have specified XFS as the filesystem type in /etc/fstab.
 
1 members found this post helpful.
Old 06-06-2023, 11:44 PM   #7
Wouterplop
LQ Newbie
 
Registered: Jun 2023
Posts: 3

Rep: Reputation: 0
From what i read is that the mount folder is this in fstab and you change a drive or after a reboot the drive name changed from sdb to sda.
If you want start the server again al you have to do is use command sudo vi /etc/fstab and remove that specific mount line or adjust disk name or uuid number to the specific new disk name or dev name.

I encountered the same issue and to fix this for the next time use the harddisk specific uuid number. I dont know the commands exactly but I do have it written somewhere if you need it.

Regards

Wouter
 
Old 06-08-2023, 01:52 PM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,372

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
edit /etc/fstab by adding a # at the beginning of the line that has /backup/data.
 
1 members found this post helpful.
Old 06-09-2023, 12:32 PM   #9
grounddolphin
LQ Newbie
 
Registered: Mar 2023
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
edit /etc/fstab by adding a # at the beginning of the line that has /backup/data.

Thank you so much colorpurple21859, you really saved my pc/work. I was trying different options, steps for the past one week. By just adding the #, my linux booted as normal. Thanks a lot really.

I have question though, if you dont mind?

By adding the #, what is the purpose of it or what does it do?
This is the line i have in fstab
/dev/backup/databckup /backup/data xfs defaults, usrquota 0 0

If i removed or delete that line in fstab, that would also solve the issue?
May i know what causes the boot issue by the way?

Last edited by grounddolphin; 06-09-2023 at 01:07 PM.
 
Old 06-09-2023, 12:39 PM   #10
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Putting a # in front of many config files in Linux indicates that the stuff after it is a comment for human readability and not to be executed by the program reading the config. It is a handy way to remove a config option but keep it around if you need to put it back.
Since the system is working it should be safe to remove that line now.
 
1 members found this post helpful.
Old 06-09-2023, 12:45 PM   #11
grounddolphin
LQ Newbie
 
Registered: Mar 2023
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by uteck View Post
Putting a # in front of many config files in Linux indicates that the stuff after it is a comment for human readability and not to be executed by the program reading the config. It is a handy way to remove a config option but keep it around if you need to put it back.
Since the system is working it should be safe to remove that line now.

Thanks a lot uteck for the info. i will take note of that.
 
Old 06-09-2023, 05:34 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,147

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
As I suggested, you have XFS specified in that fstab entry. However you did a mkfs for ext4 - merely changing the entry from xfs to ext4 will maintain the automatic mount. Commenting it out (using #) or deleting the line will mean you will have to manually mount it after each boot.

You need to spend some time understanding your linux system and what changes may affect - for example "man fstab" would be an easy start. Historically fstab has listed essential filesystems for the system and any errors indicate the system won't work, so the boot fails.
 
1 members found this post helpful.
  


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
LXer: How to use journalctl to analyze logs in Linux LXer Syndicated Linux News 0 03-22-2021 04:39 PM
LXer: How to use journalctl to View and Analyze Systemd Logs With Examples LXer Syndicated Linux News 0 12-06-2020 12:12 AM
LXer: How to analyze Linux systemd logs using journalctl advanced filtering options LXer Syndicated Linux News 0 12-09-2019 07:10 AM
LXer: How to Use Journalctl to Read Linux System Logs LXer Syndicated Linux News 0 12-18-2018 07:51 AM
[SOLVED] boot stops after mounting /root, goes emergency mode, no logs written JZL240I-U Linux - Kernel 12 02-13-2012 06:36 PM

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

All times are GMT -5. The time now is 04:08 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