sudo /etc/init.d/apparmor start

Asked by mohd shamsuddin on 2014-04-02

sam@sam-Evo-D510-SFF:~$ sudo invoke-rc.d apparmor reload
[sudo] password for sam:
Sorry, try again.
[sudo] password for sam:
 * Reloading AppArmor profiles * AppArmor not available as kernel LSM.
                                                                         [fail]
invoke-rc.d: initscript apparmor, action "reload" failed.
sam@sam-Evo-D510-SFF:~$ sudo /etc/init.d/apparmor start
 * Starting AppArmor profiles * AppArmor not available as kernel LSM.
                                                                         [fail]
sam@sam-Evo-D510-SFF:~$

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubuntu-docs Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2014-04-02
Last query:
2014-04-02
Last reply:
2014-04-02
mohd shamsuddin (mohshahoo) said : #1

good day[morning/night]ubuntu citizens;i m happy eventough my pc got problem because i like to learn my mistake and be with you all.thank you very much

mohd shamsuddin (mohshahoo) said : #2

by the way'actionparsnip'i like to thanks you cause now i learned how to copy/paste using the terminal

No worries. It's the same in any application in any OS.

This may be helpful
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/375422

Manfred Hampl (m-hampl) said : #4

Maybe similar to http://ubuntuforums.org/showthread.php?t=2164641

What is the output of the following terminal commands:

cat /proc/cmdline

grep GRUB_CMDLINE_LINUX /etc/default/grub

Please copy/paste the output into this question document as done before.

mohd shamsuddin (mohshahoo) said : #5

sam@sam-Evo-D510-SFF:~$ dpkg -l | egrep 'flash|gnash|swf|spark'
ii spark 2011.0.deb-5 SPARK programming language toolset
sam@sam-Evo-D510-SFF:~$ sam@sam-Evo-D510-SFF:~$ dpkg -l | egrep 'flash|gnash|swf|spark'
sam@sam-Evo-D510-SFF:~$: command not found
sam@sam-Evo-D510-SFF:~$ ii spark 2011.0.deb-5 SPARK programming language toolset
sam@sam-Evo-D510-SFF:~$ dpkg -l | egrep 'flash|gnash|swf|spark'
ii spark 2011.0.deb-5 SPARK programming language toolset
sam@sam-Evo-D510-SFF:~$
cat /proc/cmdline
grep GRUB_CMDLINE_LINUX /etc/default/grub

mohd shamsuddin (mohshahoo) said : #6

sam@sam-Evo-D510-SFF:~$ dpkg -l | egrep 'flash|gnash|swf|spark'
ii spark 2011.0.deb-5 SPARK programming language toolset
sam@sam-Evo-D510-SFF:~$ sam@sam-Evo-D510-SFF:~$ dpkg -l | egrep 'flash|gnash|swf|spark'
sam@sam-Evo-D510-SFF:~$: command not found
sam@sam-Evo-D510-SFF:~$ ii spark 2011.0.deb-5 SPARK programming language toolset
sam@sam-Evo-D510-SFF:~$ dpkg -l | egrep 'flash|gnash|swf|spark'
ii spark 2011.0.deb-5 SPARK programming language toolset
sam@sam-Evo-D510-SFF:~$
cat /proc/cmdline
grep GRUB_CMDLINE_LINUX /etc/default/grub

ii: cannot connect to host: Connection timed out
sam@sam-Evo-D510-SFF:~$ sam@sam-Evo-D510-SFF:~$
sam@sam-Evo-D510-SFF:~$: command not found
sam@sam-Evo-D510-SFF:~$ sam@sam-Evo-D510-SFF:~$ dpkg -l | egrep 'flash|gnash|swf|spark'
sam@sam-Evo-D510-SFF:~$: command not found
sam@sam-Evo-D510-SFF:~$ ii spark 2011.0.deb-5 SPARK programming language toolset
ii: remote host closed connection: File exists
sam@sam-Evo-D510-SFF:~$ sam@sam-Evo-D510-SFF:~$
sam@sam-Evo-D510-SFF:~$: command not found
sam@sam-Evo-D510-SFF:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.11.0-19-generic root=UUID=edf23d7c-f8aa-48e7-836b-c0b7336cce78 ro pcie_aspm=force drn.vblankffdelay=1 apparmor=0 i915.senaphores=1 nmi_watchdog=0
sam@sam-Evo-D510-SFF:~$ grep GRUB_CMDLINE_LINUX /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force drn.vblankffdelay=1 apparmor=0 i915.senaphores=1 nmi_watchdog=0"
GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force drn.vblankffdelay=1 apparmor=0 i915.senaphores=1 nmi_watchdog=0"
sam@sam-Evo-D510-SFF:~$
sam@sam-Evo-D510-SFF:~$

mohd shamsuddin (mohshahoo) said : #7

thanks Manfred,i really appreciated your help

Best Manfred Hampl (m-hampl) said : #8

Your grub configuratuion contains the option to disable apparmor.
If you want to have apparmor running, you have to remove "apparmor=0" from GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and reload grub.

mohd shamsuddin (mohshahoo) said : #9

sam@sam-Evo-D510-SFF:~$ GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and reload grub.
GRUB_CMDLINE_LINUX_DEFAULT: command not found
sam@sam-Evo-D510-SFF:~$ GRUB_CMDLINE_LINUX_DEFAULT
GRUB_CMDLINE_LINUX_DEFAULT: command not found
sam@sam-Evo-D510-SFF:~$ sudo apt-get remove'apparmor=0'
[sudo] password for sam:
E: Invalid operation removeapparmor=0
sam@sam-Evo-D510-SFF:~$

mohd shamsuddin (mohshahoo) said : #10

sam@sam-Evo-D510-SFF:~$ /etc/default/grub
bash: /etc/default/grub: Permission denied
sam@sam-Evo-D510-SFF:~$

Manfred Hampl (m-hampl) said : #11

You misunderstood my comment. What I gave as a description of the steps to do, but not a command to execute.

open a terminal and issue the command

gksudo gksudo gedit /etc/default/grub

This should ask for your password as the confirmation for an administrative action, and the open an editor with the grob configuration file loaded.
In the editor window scroll down until you find a line that starts with GRUB_CMDLINE_LINUX_DEFAULT
In that line remove the text "apparmor=0"
Save the file and close the editor.
Then issue the command

sudo update-grub

and if there is no error message shown, finally reboot your computer and check whether apparmor is running after the reboot.

mohd shamsuddin (mohshahoo) said : #12

sir,pls be patient with me i m geek to computer and i wish to learn. thanking you sir very much for your kind anticipation

mohd shamsuddin (mohshahoo) said : #13

Thanks i will do that
On Apr 2, 2014 6:42 PM, "Manfred Hampl" <
<email address hidden>> wrote:

> Your question #246376 on ubuntu-docs in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/246376
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> You misunderstood my comment. What I gave as a description of the steps
> to do, but not a command to execute.
>
> open a terminal and issue the command
>
> gksudo gksudo gedit /etc/default/grub
>
> This should ask for your password as the confirmation for an
> administrative action, and the open an editor with the grob configuration
> file loaded.
> In the editor window scroll down until you find a line that starts with
> GRUB_CMDLINE_LINUX_DEFAULT
> In that line remove the text "apparmor=0"
> Save the file and close the editor.
> Then issue the command
>
> sudo update-grub
>
> and if there is no error message shown, finally reboot your computer and
> check whether apparmor is running after the reboot.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/246376/+confirm?answer_id=10
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/246376
>
> You received this question notification because you asked the question.
>

mohd shamsuddin (mohshahoo) said : #14

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force drn.vblankffdelay=1 apparmor=0 i915.senaphores=1 nmi_watchdog=0"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force drn.vblankffdelay=1 i915.senaphores=1 nmi_watchdog=0"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="48
GRUB_GFXPAYLOAD_LINUX=None

Manfred Hampl (m-hampl) said : #15

I just see that you have TWO occurences of GRUB_CMDLINE_LINUX_DEFAULT=... in your grub config file. You should delete one.

Furthermore I recommend that you also delete the string "i915.senaphores=1". There is a typo in it (must be sema... with m not with n), so this options does not do anything and is redundant.

And the same with "drn.vblankffdelay=1". For that option to have effect it miosses an o (...blankoff...). What you currently have is not having any effect and should be deleted.

mohd shamsuddin (mohshahoo) said : #16

Sir.how to delete these two thread.any command line for terminal.pls
further advise.thank you very much
On Apr 2, 2014 7:16 PM, "Manfred Hampl" <
<email address hidden>> wrote:

> Your question #246376 on ubuntu-docs in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/246376
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> I just see that you have TWO occurences of
> GRUB_CMDLINE_LINUX_DEFAULT=... in your grub config file. You should
> delete one.
>
> Furthermore I recommend that you also delete the string
> "i915.senaphores=1". There is a typo in it (must be sema... with m not
> with n), so this options does not do anything and is redundant.
>
> And the same with "drn.vblankffdelay=1". For that option to have effect
> it miosses an o (...blankoff...). What you currently have is not having
> any effect and should be deleted.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/246376/+confirm?answer_id=14
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/246376
>
> You received this question notification because you asked the question.
>

Manfred Hampl (m-hampl) said : #17

I have already given the command for starting the editor in one of my previous postings:

gksudo gksudo gedit /etc/default/grub

Do not forget to update your grub bootloader afterwards with the command

sudo update-grub

and do not forget to reboot to really activate the changes.

mohd shamsuddin (mohshahoo) said : #18

sam@sam-Evo-D510-SFF:~$ gksudo gksudo gedit /etc/default/grub
sudo update-grub

mohd shamsuddin (mohshahoo) said : #19

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force drn.vblankffdelay=1 apparmor=0 i915.senaphores=1 nmi_watchdog=0"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force drn.vblankffdelay=1 apparmor=0 i915.senaphores=1 nmi_watchdog=0"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="48
GRUB_GFXPAYLOAD_LINUX=None

mohd shamsuddin (mohshahoo) said : #20

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm= nmi_watchdog=0"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="48
GRUB_GFXPAYLOAD_LINUX=None

mohd shamsuddin (mohshahoo) said : #21

AppArmor not available as kernel LSM.
                                                                         [fail]

mohd shamsuddin (mohshahoo) said : #22

sam@sam-Evo-D510-SFF:~$ sudo invoke-rc.d apparmor reload
[sudo] password for sam:
 * Reloading AppArmor profiles * AppArmor not available as kernel LSM.
                                                                         [fail]
invoke-rc.d: initscript apparmor, action "reload" failed.
sam@sam-Evo-D510-SFF:~$

mohd shamsuddin (mohshahoo) said : #23

sam@sam-Evo-D510-SFF:~$ sudo invoke-rc.d apparmor reload
[sudo] password for sam:
 * Reloading AppArmor profiles * AppArmor not available as kernel LSM.
                                                                         [fail]
invoke-rc.d: initscript apparmor, action "reload" failed.
sam@sam-Evo-D510-SFF:~$ sudo update-grub
[sudo] password for sam:
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.11.0-19-generic
Found initrd image: /boot/initrd.img-3.11.0-19-generic
Found linux image: /boot/vmlinuz-3.11.0-18-generic
Found initrd image: /boot/initrd.img-3.11.0-18-generic
Found linux image: /boot/vmlinuz-3.11.0-15-generic
Found initrd image: /boot/initrd.img-3.11.0-15-generic
Found memtest86+ image: /boot/memtest86+.bin
done
sam@sam-Evo-D510-SFF:~$

mohd shamsuddin (mohshahoo) said : #24

sam@sam-Evo-D510-SFF:~$ sudo modprobe apparmor
[sudo] password for sam:
FATAL: Module apparmor not found.
sam@sam-Evo-D510-SFF:~$ sudo /etc/init.d/apparmor start
 * Starting AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
                                                                         [ OK ]
sam@sam-Evo-D510-SFF:~$ see /etc/apparmor/rc.apparmor.functions
Warning: unknown mime-type for "/etc/apparmor/rc.apparmor.functions" -- using "application/octet-stream"
Error: no such file "/etc/apparmor/rc.apparmor.functions"
sam@sam-Evo-D510-SFF:~$ sudo aa-status
apparmor module is loaded.
18 profiles are loaded.
18 profiles are in enforce mode.
   /sbin/dhclient
   /usr/bin/evince
   /usr/bin/evince-previewer
   /usr/bin/evince-previewer//launchpad_integration
   /usr/bin/evince-previewer//sanitized_helper
   /usr/bin/evince-thumbnailer
   /usr/bin/evince-thumbnailer//sanitized_helper
   /usr/bin/evince//launchpad_integration
   /usr/bin/evince//sanitized_helper
   /usr/lib/NetworkManager/nm-dhcp-client.action
   /usr/lib/connman/scripts/dhclient-script
   /usr/lib/cups/backend/cups-pdf
   /usr/lib/lightdm/lightdm/lightdm-guest-session-wrapper
   /usr/lib/lightdm/lightdm/lightdm-guest-session-wrapper//chromium_browser
   /usr/lib/telepathy/mission-control-5
   /usr/lib/telepathy/telepathy-*
   /usr/sbin/cupsd
   /usr/sbin/tcpdump
0 profiles are in complain mode.
3 processes have profiles defined.
3 processes are in enforce mode.
   /sbin/dhclient (1208)
   /usr/lib/telepathy/mission-control-5 (2082)
   /usr/sbin/cupsd (826)
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
sam@sam-Evo-D510-SFF:~$

mohd shamsuddin (mohshahoo) said : #25

Thanks Manfred Hampl, that solved my question.

mohd shamsuddin (mohshahoo) said : #26

thank you

Manfred Hampl (m-hampl) said : #27

Fine to see that your system is again running with apparmor as desired.
Just a comment:
It seems that you have deleted more than recommended form the grub configuration file.

The boot command line option
"pcie_aspm= "
in GRUB_CMDLINE_LINUX_DEFAULT is missing a value (was "pcie_aspm=force" before) and you deleted the line
GRUB_CMDLINE_LINUX=""

As your system seems to run even with these erroneous modifications, I am not sure whether I should recommend re-doing the whole exercise of editing the grub config file etc.

mohd shamsuddin (mohshahoo) said : #28

Thanks for the help.the system ok but video distorted.i hope you may help
me fix this issue.thanks again you are very kind
On Apr 3, 2014 2:42 PM, "Manfred Hampl" <
<email address hidden>> wrote:
>
> Your question #246376 on ubuntu-docs in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/246376
>
> Manfred Hampl posted a new comment:
> Fine to see that your system is again running with apparmor as desired.
> Just a comment:
> It seems that you have deleted more than recommended form the grub
configuration file.
>
> The boot command line option
> "pcie_aspm= "
> in GRUB_CMDLINE_LINUX_DEFAULT is missing a value (was "pcie_aspm=force"
before) and you deleted the line
> GRUB_CMDLINE_LINUX=""
>
> As your system seems to run even with these erroneous modifications, I
> am not sure whether I should recommend re-doing the whole exercise of
> editing the grub config file etc.
>
> --
> You received this question notification because you asked the question.