Page 78 of 94 FirstFirst ... 2868767778798088 ... LastLast
Results 771 to 780 of 931

Thread: Grub 2 Basics

  1. #771
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by delparral View Post
    Dear DRS305

    I have several OS in different partitions. My Ubuntu 9.1 is in sda1. However I can not access it. When I select it on Grub booting I get the message ¨load the kernel first¨.
    This message usually means that the prefix (normally "(hdX,Y)/boot/grub" ) isn't set correctly or that the "vmlinuz..." file is missing. We'd be guessing though, so do as von Stalhein suggests and run the boot info script. Posting the contents of RESULTS.txt will help us help you.
    Back to Xorg...

    Retired.

  2. #772
    Join Date
    Jul 2011
    Beans
    3

    Re: Grub 2 Basics

    Hi,

    I'm using an application of deployment and management of operating systems and I need to change the order of the default menu entry in one Ubuntu 10.10, but i need to do it outside of the OS to be able to choose the correct OS before boot.

    In older versions I only needed to change the parameter in menu.lst but now I can't do a sudo update-grub

    How can I change directly /boot/grub/grub.cfg without broking everything?

  3. #773
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    The same way you edited menu.lst before. Just know that it will be replaced the next time you do run update-grub.

    You also can chroot into the system while it is mounted from another system and run update-grub that way:

    Code:
    for f in sys proc dev ; do mount --bind /$f /mnt/$f ; done
    chroot /mnt
    update-grub

  4. #774
    Join Date
    Apr 2007
    Location
    Staunton, Va. USA
    Beans
    519
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Grub 2 Basics

    I have found that an application called "Grub Customizer" will work fine for your purpose. Check this web site about it: http://www.webupd8.org/2010/10/grub-...er-add-or.html


    sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    sudo apt-get update
    sudo apt-get install grub-customizer
    Using POP!_OS 20.04, which is basically Ubuntu 20.04 with some help from System76.

  5. #775
    Join Date
    Jul 2011
    Beans
    3

    Re: Grub 2 Basics

    Quote Originally Posted by psusi View Post
    The same way you edited menu.lst before. Just know that it will be replaced the next time you do run update-grub.

    You also can chroot into the system while it is mounted from another system and run update-grub that way:

    Code:
    for f in sys proc dev ; do mount --bind /$f /mnt/$f ; done
    chroot /mnt
    update-grub
    so if I modify the file grub.cfg every time the computer boots it's not necessary to do the chroot?

  6. #776
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    I'm not sure exactly what you want to do but there have to be simpler ways of doing what you want rather than editing Grub2 every time you boot.

    If you need to make different selections on boot:
    Do you see the Grub 2 menu during boot? If so, you should be able to choose the selection. If you don't see the menu, perhaps we can permanently make the changes so you do.

    If the boot option is always going to be the same:
    If the version of the OS you want to boot doesn't change (or even if it does), you can create a custom menu and have the first menuentry be the one that always boots by default. You can also disable one or more of the GRUB scripts so that portion of the menu doesn't change (in combination with a custom entry).

    If you can be a bit clearer of what exactly you want to do we can probably create a fairly trouble-free solution.

    As far as editing the grub files outside the OS:
    You need to chroot when you are trying to install or update a system. If you only want to manually edit the grub.cfg file, all you have to do is mount the partition and then access the file. Of course, as has been mentioned, any update-grub operation will re-write the file so other steps would be needed to prevent future modifications.
    Back to Xorg...

    Retired.

  7. #777
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by rauletisurv View Post
    so if I modify the file grub.cfg every time the computer boots it's not necessary to do the chroot?
    What? If you edit grub.cfg, the changes will be thrown out when you do next run update-grub. You can edit /etc/default/grub and run update-grub using a chroot from a livecd, or you can just edit grub.cfg as a temporary measure to boot the system, then edit /etc/default/grub and run update-grub.

    You can also edit the commands for one time use at boot time by pressing e at the grub menu to boot the system this time, and then go edit /etc/default/grub and run update-grub, and then you don't need a livecd at all.

  8. #778
    Join Date
    Jul 2011
    Beans
    3

    Re: Grub 2 Basics

    Sorry, I didn't want to explain all the details because is hard and long.

    I'm implementing a application of deployment and management of operating systems in my university.

    This aplication have a little kernel that boot up before any operating system using PXE.

    The HD have 3 operating systems (W7, WXP and Ubuntu10.10) and I have to be able to boot any operating sistems by the aplication. I can't boot the OS directly so I want to boot helped by the ubuntu's grub.

    The partitions are mounted in this little kernel and I can change any file of them.

    I think edit every time the file it's a good way because every time this aplication will go first and then the students will select what OS they want to use. The partitions will be frozen by deepfreeze so there will be no update-grub, and if there are any the file grub.cfg will by booted anyways.

  9. #779
    Join Date
    May 2011
    Beans
    80
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Grub 2 Basics

    Hello everyone, a question:

    I found out that using the sudo update-grub from the terminal of
    my first installation helped a lot in having two linux-distros
    on the same harddisk.

    The only thing to mention should be just to not install grub when
    installing your second linux-distro.

    Just install it without putting a bootloader onto the harddisk (important!)
    and run into your first linux and update grub and the partition with
    your 2nd distro will be added and should work as desired.

    Does someone of you did this also?
    Did you experience any difficulties with that way?

  10. #780
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by grubu View Post
    Does someone of you did this also?
    Did you experience any difficulties with that way?
    That is not bad advice when it is an option.

    For a time (and I believe still) in the recent Ubuntu releases the installer did not allow the option of not installing the Grub bootloader. It was reported as a bug, as many advanced users recognized the advantages of not installing a second Grub 2.

    One workaround was to install it to a flash drive and then just make sure the system boots off the internal hard drive first.

    When you do have Grub installed on more than one drive, it can get confusing as to which one is controlling. I help myself by using a different background image for each Grub's boot menu, but you can also determine which one controls since it will place it's OS at the top of the list (if you haven't modified the /etc/grub.d script names).
    Last edited by drs305; July 24th, 2011 at 08:08 PM.
    Back to Xorg...

    Retired.

Page 78 of 94 FirstFirst ... 2868767778798088 ... 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
  •