24

When I started my laptop I found this message:

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 maintainence
(or type control-D to continue):

I have tried all the above commands but nothing happens.
How can I solve this problem?

Zanna
  • 70,465
Gourav Manchanda
  • 383
  • 2
  • 3
  • 8

4 Answers4

29

When you see Ctrl+D enter root password. Then run mount -a to see where the error is (which line).

Then enter sudoedit /etc/fstab and correct the missing or remove it, then save and finally reboot with sudo reboot.

karel
  • 114,770
New Life
  • 291
5
 #mount -a

it will mount all disks and shows all unmounted mount points.

then go to

    # vi /etc/fstab

comment that unmounted mount points in fstab

then

   #reboot
5

You can't enter any of those commands until you "Give root password for maintenance".

You have the two choices it gives, plus some others.

  1. Give the root password. This may be your password. I'm stuck at this myself with my Kubuntu computer.
  2. Press Ctrl+D and it'll try again (and probably fail again).
  3. Press Ctrl+Alt+Del which will usually reboot the computer. With many computers pressing Esc during the boot process may give you more details and options.
  4. Hold down a power button, or physically disconnect power (remove battery).

If you can't remember the root password, the Ubuntu wiki help page or How do I reset a lost administrative password? may help.

skierpage
  • 313
5

Thankfully I had a hunch why my computer (Debian Jessie) couldn't boot (I had changed fstab wrongly), but of course couldn't get in because I had OP's problem.

skierpage's answer had my solution, which was on the ubuntu help page. Specifically, the steps I took was "The Other Way":

  1. At the boot menu, type e to edit the boot command.
  2. Change ro to rw init=/bin/bash

Then F10 to boot and I was able to access a passwordless root shell and could edit /etc/fstab to undo my changes.

Matthias
  • 201