Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Update overwrites /etc/default/grub? How could that happen?

  1. #1
    Join Date
    Jun 2011
    Location
    Netherlands
    Beans
    180
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Update overwrites /etc/default/grub? How could that happen?

    Hi,

    Today I ran an apt-get upgrade, and the grub configuration file appeared to be reset...
    How could that happen? Does it possibly have anything to do with the update?

    Regards
    Vim - Comfortable text editing and coding
    vim-autoformat - a code-formatting plugin for vim supporting various languages - https://github.com/Chiel92/vim-autoformat
    Vimperator - Fast browsing using keyboard only

  2. #2
    Join Date
    Sep 2006
    Location
    New Zealand
    Beans
    36
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Update overwrites /etc/default/grub? How could that happen?

    Hi Chiel92,
    Yes from my experience this is normal for an update. I have had to re-tweak Grub files before due to over writing during upgrades. It can get tricky when its been a few years since the last tweak.

  3. #3
    Join Date
    May 2012
    Beans
    2

    Re: Update overwrites /etc/default/grub? How could that happen?

    For what it is worth, I had the same problem with today's updates.
    It reset the grub file back to its 'factory settings'.

    I have no idea why todays update does this, but it is a pretty major thing to do without adequte warning or making a backup for you.
    I am less than happy about this and I invite whoever was responsible to explain themselves!

    In my case, a grub reset meant that I couldn't VNC onto my headless Ubuntu PC becuase it deleted the following line from my grub file:
    GRUB_CMDLINE_LINUX="nomodeset"

    In case anyone has the same problem, the solution was to run Xming on the local Windows PC and then use Putty SSH to remotely get a terminal window on the remote Ubuntu PC, and log in.
    Then I did:
    cd ..
    cd ..
    sudo gedit /etc/default/grub

    This poped up a graphical text editor on my Windows PC allowing me to put back the missing line in the grub file.

    Then I did
    sudo shutdown -r now
    to re-boot the Ubuntu box, and then everything was fine again.

  4. #4
    Join Date
    Jun 2011
    Location
    Netherlands
    Beans
    180
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Update overwrites /etc/default/grub? How could that happen?

    Quote Originally Posted by mango.muncher View Post
    Hi Chiel92,
    Yes from my experience this is normal for an update. I have had to re-tweak Grub files before due to over writing during upgrades. It can get tricky when its been a few years since the last tweak.
    Okay. I thought only grub.cfg would be overwritten in these cases, and not /etc/default/grub.
    Luckily I know how to retweak it.
    Vim - Comfortable text editing and coding
    vim-autoformat - a code-formatting plugin for vim supporting various languages - https://github.com/Chiel92/vim-autoformat
    Vimperator - Fast browsing using keyboard only

  5. #5
    Join Date
    Nov 2011
    Beans
    2,280
    Distro
    Ubuntu

    Re: Update overwrites /etc/default/grub? How could that happen?

    Today's update included a new kernel. That requires a grub edit, which would have been done by the updater. But, yes, I would expect it to maintain a user's kernel options.

  6. #6
    Join Date
    Jul 2007
    Location
    UK
    Beans
    17,030
    Distro
    Ubuntu Development Release

    Re: Update overwrites /etc/default/grub? How could that happen?

    Quote Originally Posted by buzzingrobot View Post
    Today's update included a new kernel. That requires a grub edit, which would have been done by the updater. But, yes, I would expect it to maintain a user's kernel options.
    It would also normally ask if you want to keep your version or install the new "package maintainers version". You can then inspect the difference and then either keep yours or install the new one.

    If this did not happen then this is a bug which needs reporting.

    I have a modified /etc/default/grub and it has not been changed. My system is fully up to date.

    (grub.cfg is generated but the other scripts.)
    Last edited by philinux; May 22nd, 2012 at 03:35 PM.

  7. #7
    Join Date
    Jun 2011
    Location
    Netherlands
    Beans
    180
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Update overwrites /etc/default/grub? How could that happen?

    Quote Originally Posted by philinux View Post
    It would also normally ask if you want to keep your version or install the new "package maintainers version". You can then inspect the difference and then either keep yours or install the new one.
    I'm pretty sure I didn't get this. (I just updated using the update manager, not in the terminal.)

    If this did not happen then this is a bug which needs reporting.
    I will send a bug report, if I can findout where to do that (I never have done it, so this is a good opportunity )

    I have a modified /etc/default/grub and it has not been changed. My system is fully up to date.
    Weird, do we have the same ubuntu version? (Ubuntu precise pangolin 12.04)
    Vim - Comfortable text editing and coding
    vim-autoformat - a code-formatting plugin for vim supporting various languages - https://github.com/Chiel92/vim-autoformat
    Vimperator - Fast browsing using keyboard only

  8. #8
    Join Date
    Jul 2007
    Location
    UK
    Beans
    17,030
    Distro
    Ubuntu Development Release

    Re: Update overwrites /etc/default/grub? How could that happen?

    Yep running 12.04 on main hard drive.

  9. #9
    Join Date
    Jul 2007
    Location
    UK
    Beans
    17,030
    Distro
    Ubuntu Development Release

    Re: Update overwrites /etc/default/grub? How could that happen?

    Still the same file. Untouched.

    Code:
    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"
    
    GRUB_DISABLE_OS_PROBER=true

  10. #10
    Join Date
    Jun 2011
    Location
    Netherlands
    Beans
    180
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Update overwrites /etc/default/grub? How could that happen?

    I did a bugreport bug here:
    https://savannah.gnu.org/bugs/index.php?36525

    I guess it explains the problem clear enough.
    Vim - Comfortable text editing and coding
    vim-autoformat - a code-formatting plugin for vim supporting various languages - https://github.com/Chiel92/vim-autoformat
    Vimperator - Fast browsing using keyboard only

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •