3

Ubuntu 18.04.3 LTS For the past week I've had a very strange problem where my keyboard only worked at the login screen but nowhere else in Ubuntu. Today trying to fix it I rebooted in recovery mode a couple of times and in older versions, in case it was caused by an update. It didn't make any difference. When I tried to reboot again in normal mode (Ubuntu, with Linux 5.0.0-29-generic) boot hangs on the message:

"A start job is running for AppArmor ...itialisation (Xmin Xs / no limit)"

It stays that way until I force shutdown using the power button. This now happens whether I try to boot in recovery mode or normal mode. The only other available option is hit c for a command line from the GRUB boot menu. I'd really appreciate any suggestions as my computer is currently a brick. (please keep them simple, beginner level!) Many thanks

2
  • Since the boot issue is solved here. I suggest you post a new question with only the keyboard issue so that it gets enough attention and gets answered. Thank you
    – Raffa
    Oct 3, 2019 at 22:59
  • I already did, but I eventually solved it by buying a new SSD and reinstalling the OS! Drastic but effective.
    – hellsbells
    Oct 4, 2019 at 12:40

1 Answer 1

3

This solution is aimed at enabling you to log-in to your system. You will need to investigate the cause for this later. It is, however, much better to do from a functional system rather than a system which does not boot correctly.


Please follow the steps below:

  1. Reboot your machine and hold the Shift key as soon as you pass the BIOS logo to access the GRUB boot menu. You might need to repeat this a few times until you succeed and see the boot menu. This link will help.

  2. Select advanced options and hit Enter.

  3. Select the second option with (recovery mode) in front of it and hit Enter.

  4. Wait until the machine boots and another menu appears. Choose the option with drop to root shell prompt in it and hit Enter.

  5. Press Enter when it says press Enter for maintenance.

  6. Once you are presented with a command prompt, write the following command and press Enter (this will give you read and write access to your system):

    mount -o rw,remount /

  7. You will need now to disable the apparmor service. To do this please write the following command and press Enter:

    sudo systemctl disable apparmor.service

  8. Reboot your system.


Notice:

If you are still unable to access recovery mode because of the same issue, please try the following while at step #2 above:

  • Press e to edit GRUB boot options.
  • Move the cursor after the last character in the last options line and press Enter to start a new line.
  • Add systemd.mask=apparmor.service with no spaces and then press F10 to boot the system.

If all goes well and your system boots normally again, you can later trobleshoot and fix the cause then enable the apparmor service again by running the following command in the terminal:

sudo systemctl enable apparmor.service
6
  • 1
    Many thanks for your suggestion but I can't boot in recovery mode either, it gets stuck at the same AppArmor start job. The only other thing I can get to from the boot menu is press c for command line.
    – hellsbells
    Sep 28, 2019 at 17:47
  • @hellsbells You can try pressing e at GRUB menu to edit the boot options and add systemd.mask=apparmor.service in a new line at the end. Then press F10 to boot. See how it works
    – Raffa
    Sep 28, 2019 at 18:51
  • I got the following: "Booting a command list. error:syntax error. Press any key to continue...." when I pressed a key it went back to the boot editing page.
    – hellsbells
    Sep 28, 2019 at 20:04
  • @hellsbells should be on a new line. after the last existing line press Enter then type systemd.mask=apparmor.service with no spaces and then press F10. Check for typos
    – Raffa
    Sep 28, 2019 at 20:09
  • 1
    Brilliant! Although it still hung after that command & F10, I left it for over an hour and when I came back it was in the second boot menu, after which all the other steps worked perfectly. I've still got the original keyboard issue, but at least I'm able to boot the system! Many thanks, I appreciate your help.
    – hellsbells
    Sep 28, 2019 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.