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

Thread: How to edit grub.cfg

  1. #1
    Join Date
    Aug 2008
    Location
    Manila, Philippines
    Beans
    231
    Distro
    Ubuntu 12.10 Quantal Quetzal

    How to edit grub.cfg

    I'm dual booting Ubuntu 12.04 with Arch. I'm using Ubuntu's GRUB to pull in other OS's. Because Arch switched to systemd, all I had to do is add an option in the linux line of the /boot/grub/grub.cfg. The addition is:

    init=/usr/lib/systemd/systemd

    How do you edit grub.cfg to add this option?

    Do/Can I edit /etc/grub.d/30_os-prober because that's where Arch entry section in grub.cfg is located?

    Do I use the /etc/grub.d/40_custom file and fill in the entry? OR..

    Use the GRUB_CMDLINE_LINUX= at /etc/default/grub?

  2. #2
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: How to edit grub.cfg

    Quote Originally Posted by donato roque View Post
    I'm dual booting Ubuntu 12.04 with Arch. I'm using Ubuntu's GRUB to pull in other OS's. Because Arch switched to systemd, all I had to do is add an option in the linux line of the /boot/grub/grub.cfg. The addition is:

    init=/usr/lib/systemd/systemd

    How do you edit grub.cfg to add this option?

    Do/Can I edit /etc/grub.d/30_os-prober because that's where Arch entry section in grub.cfg is located?

    Do I use the /etc/grub.d/40_custom file and fill in the entry? OR..

    Use the GRUB_CMDLINE_LINUX= at /etc/default/grub?
    Checkout the How to in my signature.
    It has gone to a wiki and there is a link to that wiki in the post close to the last one.
    It works with Debian Squeeze so it should work with Arch if you are using Grub.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  3. #3
    Join Date
    Aug 2008
    Location
    Manila, Philippines
    Beans
    231
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How to edit grub.cfg

    Checkout the How to in my signature.
    It has gone to a wiki and there is a link to that wiki in the post close to the last one.
    It works with Debian Squeeze so it should work with Arch if you are using Grub. http://ubuntuforums.org/showthread.php?t=1542338
    Item no. 5 on your wiki should do the trick. Thank you.

  4. #4
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: How to edit grub.cfg

    Quote Originally Posted by donato roque View Post
    Item no. 5 on your wiki should do the trick. Thank you.
    You are welcome! Glad I could help.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  5. #5
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    7,352
    Distro
    Ubuntu Development Release

    Re: How to edit grub.cfg

    You might want to study this:

    http://www.gnu.org/software/grub/manual/

    It should also be noted that what we have been calling Grub 2 is actually Grub 1.97 to Grub 1.99.

    Ubuntu 12.10 now has Grub 2.0 and 12.04 will be getting it at the End of January when 12.04.2 is released.

    There are some improvements.

    Regards.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  6. #6
    Join Date
    May 2007
    Beans
    12,670

    Re: How to edit grub.cfg

    Did you notice that in the GRUB.CFG file, there is a notice telling you NOT to edit it? That's because when you later do an update to Ubuntu which updates the kernel, it will rewrite this file -- and DELETE any changes you made.
    Ubuntu 14.04, Mint 17; MS Win 8.1.
    Will not respond to PM requests for support -- use the forums.

  7. #7
    Join Date
    Feb 2012
    Location
    el_GR
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to edit grub.cfg

    Quote Originally Posted by donato roque View Post
    I'm dual booting Ubuntu 12.04 with Arch. I'm using Ubuntu's GRUB to pull in other OS's. Because Arch switched to systemd, all I had to do is add an option in the linux line of the /boot/grub/grub.cfg. The addition is:

    init=/usr/lib/systemd/systemd
    . We have the same dual-boot (except mine is triple boot , Windows too).

    Arch not switched yet in systemd as I know. This option in grub IS NOT as switching in systemd (I know that for sure). It is just a test of systemd . Yes , test it first and then you must delete-remove this option from grub and switch to a pure systemd.
    Please read the Wiki : https://wiki.archlinux.org/index.php/Systemd

    Quote Originally Posted by donato roque View Post
    How do you edit grub.cfg to add this option?
    Edit the grub in Arch Linux
    Code:
    sudo nano /etc/default/grub
    and add the option in the appropriate position.
    Then update the grub
    Code:
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    Then boot to ubuntu and mount the partition with Arch and update the grub.

    Example if Arch is on /dev/sda3

    Code:
    sudo mount /dev/sda3 /mnt 
    sudo update-grub
    and I think you will be fine.

    If above not working , then modify the Ubuntu's grub.cfg manually.
    Code:
    sudo nano /boot/grub/grub.cfg
    find the Arch Linux entry and add the option manually.
    Thanks
    Last edited by NikTh; October 14th, 2012 at 12:08 AM.

  8. #8
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: How to edit grub.cfg

    Quote Originally Posted by grahammechanical View Post
    and 12.04 will be getting it at the End of January when 12.04.2 is released.
    Now there is some good news. Grub 1.99 displays an erroneous error when selecting windows although
    it goes to windows any way so, this is good. Grub 2.00 does not do that.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  9. #9
    Join Date
    Aug 2009
    Beans
    3,480
    Distro
    Ubuntu Development Release

    Re: How to edit grub.cfg

    I meant to say that grub 1.99 reports an error when windows is selected if you have customized your grub menu through my How to.
    Although, if you just press enter or wait it goes into windows w/o any problem.
    I am glad they are replacing grub 1.99 on Precise with 2.00 as then there will be no error.

    It is now a wiki just waiting on it to be linked to my thread.

    https://help.ubuntu.com/community/MaintenanceFreeCustomGrub2Screen

    You can check out the example screens for Grub 1.98 (Lucid), Grub 1.99 and Grub 2.00.
    The only time I ever have to touch anything is when I want to change the background picture
    in which case the font colors may also need to be changed depending on the lightness/darkness of the picture.
    When a new kernel is installed nothing needs changing and if your default line is not the top line, it will stay as it was.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Gnome | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  10. #10
    Join Date
    Aug 2008
    Location
    Manila, Philippines
    Beans
    231
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How to edit grub.cfg

    Quote Originally Posted by Mark Phelps View Post
    Did you notice that in the GRUB.CFG file, there is a notice telling you NOT to edit it? That's because when you later do an update to Ubuntu which updates the kernel, it will rewrite this file -- and DELETE any changes you made.
    Yes. To make changes in GRUB configuration files it is recommended to make your changes in the /etc/grub.d/* bunch of files.

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
  •