LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-13-2015, 08:47 AM   #1
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106

Rep: Reputation: 11
error in fstab causing the system to land in single user


Hi,

There are situations where an improper option, or typo in the mount point declaration in fstab was causing the system to go directly into single user mode, nothing unusual.
It becomes very frustrating, if the filesystem that fails to mount is completely not essential to boot a system into multiuser mode/runlevel.
One of my friends formatted a ntfs disk to ext4, the filesystem entry in fstab has been changed accordingly, but the mount options ( for udisks ) have not been modified.
Two weeks later he decided to reboot the system, and it was unable to return back into multiuser, single user CTRL-d prompt, >> WITHOUT ANY << error message, none of the /var/log were populated beside wtmp - kind of a messed up situation!
The system is running Debian v8 Jessie, with systemd, but this is the case across the board, not just Debian. I had a similar situation about 1-2 years ago, when I made a typo on some "scratch", low priority filesystem, unneeded by the system, and unneeded by any of the apps. But when the system restarted, that filesystem failed to mount and landed in single user mode... And I was miles away from the console ( I ask wtf? ) I expressed my feelings back then as well.

This is like having speakers not connected to the system causing it not to boot...

I do not know, but I simply refuse to understand this, and accept this as the proper way of handling >>such<< errors... we are not talking about being unable to mount ROOTFS, but some secondary, not crucial and not required to be able to boot the system. Of course, it should generate errors, and it should make the admin aware about such problem, but not prevent the admin from being unable to troubleshoot the issue from a remote location... this design is poor and nasty and (...).

What do you think? Is this good and nobody should be concerned, simply leave it alone?

Thanks,

Mike

Last edited by paziulek; 05-13-2015 at 08:48 AM.
 
Old 05-13-2015, 09:22 AM   #2
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Have you tried adding "nofail" to the mount options?
 
Old 05-13-2015, 09:29 AM   #3
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106

Original Poster
Rep: Reputation: 11
does anyone see an error message here? there is nothing in /var/log ( only file modified is wtmp )

 
Old 05-13-2015, 09:32 AM   #4
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by maples View Post
Have you tried adding "nofail" to the mount options?
Well, If I would expect the device to not exist on the next reboot, I probably would, or simply comment out/remove the line... but the default behavior should not prevent the system from starting....

Last edited by paziulek; 05-13-2015 at 09:34 AM.
 
Old 05-13-2015, 09:38 AM   #5
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106

Original Poster
Rep: Reputation: 11
and again, the photo was made by my friend, after checking for any errors he was unable to find anything that would give some kind of idea.... regardless, let's stick to being connected remotely, and there is no one to work at the console...
 
Old 05-13-2015, 10:36 AM   #6
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by paziulek View Post
Well, If I would expect the device to not exist on the next reboot, I probably would, or simply comment out/remove the line... but the default behavior should not prevent the system from starting....
You say that it's better that a system continue booting normally even if it fails to mount a device, except for /.

However, many people want there to be "bright and loud warning sirens" when something like that happens. For example, if it's a production web server and /var fails to mount, then how can it access the websites in /var/www? What if /usr doesn't mount, and you're using a distro that stores everything in /usr? Or how can users access their files if /home didn't get mounted? With /home, it can become even more problamatic because as users log in, the system might re-create files like .bashrc and some stuff in .config/ that then needs to be removed before the filesystem gets mounted.

There are both advantages and disadvantages to the approach that Linux currently takes. If you have a non-critical drive on your system, I would suggest that you just go ahead and add "nofail" so that you don't run into issues like this.
 
Old 05-13-2015, 11:25 AM   #7
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by maples View Post

However, many people want there to be "bright and loud warning sirens" when something like that happens
A critical system is monitored, any change in the mounted filesystems, or usage, is a trigger to send an alarm. Even, if the system restarts without being controlled, I NEVER want ANY user on that system, till I check the consistency of the data, and reason why it decided to reboot. I am the person that controls when and what cannot start, not systemd, nor any other eg. init, that tells me - " No Way Jose - USB mouse is not connected to the system, booting in single user.. "

It is not about system not mounting volumes during a not controlled and unexpected restart, it is about not doing things properly when the restart is controlled.
Any such reboot should wake you up in the middle of the night, and your first question will not be "if all volumes are mounted" - at least my case it will be "wtf happened?". A >brainless< admin will configure a production system so it starts all services automatically, including database(s), etc. - the reason: unforeseen results due to an unplanned or uncontrolled system restart.
BUT
If something like this happens, I want to be able to connect to the system, in the middle of the night, without driving 50 miles, troubleshoot, and take steps prepare the environment for users, and have answers available ( and maybe solutions as well ). But if the system lands in a single user mode, I can do (...).

Thanks for your reply.

Mike
 
Old 05-13-2015, 02:39 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
this looks like a minor bug

i have been seeing this about 50 / 50% on a kvm running debian 8

sometimes something is finishing before other things in systemD

this is after all the first debain with it

expect some minor bugs


systemD has bootckeck built it

run it and output a SVG and look at the boot order
Code:
su -
systemd-analyze plot > /boot.svg
and have a look

Last edited by John VV; 05-13-2015 at 02:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to edit /etc/fstab but cannot get into single user mode Birdman48 Linux - Newbie 15 08-23-2014 03:35 AM
File system check in single user mode a.abdulna Linux - Newbie 1 05-29-2013 01:17 PM
help in single user mode - cannot write fstab Shady_Creeper Slackware 2 02-14-2007 09:15 AM
Partition sizes on single-user system Feldon Debian 2 08-20-2005 09:36 AM
regular user program causing system freeze win32sux Slackware 2 02-07-2005 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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