grub is not updating rc.local

Asked by Ismail Gjevori

After updating the kernel in Ubuntu 12.04 and restarting the pc the /etc/rc.local script is not loaded. So i have to do manually

    "sudo update-grub"

What i expect is when i update the kernel the grub is updated automatically. I want to ask if this is how it works or it is a bug?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#1

I'm a bit confused about your question or your problem..

The /etc/rc.local script is EMPTY by default , and not do anything. If you have some code in /etc/rc.local that you want to run in every boot , then give here the results of

cat /etc/rc.local

As for the grub , of course is updated in each new kernel installation. It updated automatically. If not updated on your installation , then something is wrong .

Give here the results of

dpkg -l | grep -i grub

cat /etc/default/grub

Thanks

Revision history for this message
Ismail Gjevori (isgjevori) said :
#2

I've added some lines to the rc.local to turn off the discrete GPU. The added lines are these:

    chown isgjevori /sys/kernel/debug/
    chown isgjevori /sys/kernel/debug/vgaswitcheroo/switch
    echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

When it updates the kernel the GPU will stay on till i update the grub manually with "sudo update-grub" and reboot. After everything works fine.
Here are the outputs of the two commands:

isgjevori@precise:~$ dpkg -l | grep -i grub
ii grub-common 1.99-21ubuntu3.7 GRand Unified Bootloader (common files)
ii grub-gfxpayload-lists 0.6 GRUB gfxpayload blacklist
ii grub-pc 1.99-21ubuntu3.7 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 1.99-21ubuntu3.7 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 1.99-21ubuntu3.7 GRand Unified Bootloader (common files for version 2)

isgjevori@precise:~$ cat /etc/default/grub
# 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="quiet splash"
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

# 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="480 440 1"

Can you help with this problem?

Provide an answer of your own, or ask Ismail Gjevori for more information if necessary.

To post a message you must log in.