4

I was working on CentOS7 by encrypting one of my drives which worked perfectly manually.

However, after making a mistake in the /etc/fstab and /etc/crypttab for mounting automatically it will get stuck looping indefinitely at

[***]A start job is running for dev-mapper-crypto.device

Any ideas on how to bypass this?

I tried running in runlevel 1 but it will try to mount it.

1

1 Answer 1

3

Boot with the emergency option (or -b for short) – this will skip almost everything. In case this leaves the root file system read-only, you can run mount -o remount,rw / once in the shell.

Or, boot with the systemd.debug-shell option – this will give you a shell on tty9 even while the system is booting. Then you can systemctl list-jobs and systemctl cancel.

Or, boot with the systemd.mask=mnt-whatever.mount – this will force systemd to ignore just that specific unit file. (Every fstab mount corresponds to a .mount unit, where / replaced is with -. For example, /mnt/my-data is mnt-my\x2ddata.mount.)


(Side note: systemd has no runlevels; the boot option for single-user mode is just that, single.)

4
  • OMG you are a life saver! I used the emergency option and it worked! Now I will just remove the /etc/fstab entries. thanks!
    – Bugger123
    Dec 15, 2015 at 13:40
  • Ugh now I cant edit the fstab :S
    – Bugger123
    Dec 15, 2015 at 13:45
  • Try mount -o remount,rw / or boot with emergency rw instead of the usual ro. Dec 15, 2015 at 13:46
  • I used mount / -o remount,rw and fixed it thanks again :)
    – Bugger123
    Dec 15, 2015 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .