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

Thread: How to update grub (legacy) in opensuse?

  1. #1

    Post How to update grub (legacy) in opensuse?

    Hey guys, new to the opensuse forum. Last time I used opensuse was probably around 2006 or 2007. So it has been a while. I will download the .iso every once in a while and run it in a VM to see what is new. I like where it is going.

    Anyway, I was hoping that someone might be able to guide me in the right direction about a question that I have.

    Is it possible, in opensuse, to update grub via the cli (command line interface (command terminal)) so that other OSes are added to the menu.list and/or the menu.list is refreshed?

    In other distros, for example debian/ubuntu/mint/etc., I can run:

    Code:
    sudo update-grub
    for grub legacy (lets just call this grub from here on out) and

    Code:
    sudo update-grub2
    for grub2. This will then refresh grub/grub2 boot menu to show anyother OSes detected, i.e. Windows XP/Vista/7, Ubuntu, Mint, etc.

    I have done it numerous times from within other distros, but never from within opensuse. My concern is that, if I remember correctly, opensuse doesn't use the 'sudo' command for super-user root access. It uses the 'su' command for that. Again, correct me if I am wrong.

    So, I would like to know, if I were to run:

    Code:
    su update-grub
    from within a terminal while in opensuse, will it update the menu.list just as doing it in other distros does? Is that the correct command to do what I am looking for?

    Thanks for your patience and help, I appreciate it!

    -Ojosazul

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,884

    Default Re: How to update grub (legacy) in opensuse?

    We normaly use YaST > System > Bootloader to make changes to the Grub configuration (I assume you mean that and not really updating Grub).

    When you do not use (or want to use) this in a GUI, there is the ncurls interface of YaST. In a terminal (as root) type:
    Code:
    yast
    and you will see the same items as in the GUI, but usable via tab and arrow keys.

    And as the most basic way of editing /boot/grub/menu.lst use vi.
    Henk van Velden

  3. #3

    Arrow Re: How to update grub (legacy) in opensuse?

    @hcvv - thanks for your response. I appreciate it. :-)

    Interesting. That is right, I had forgot about YaST.

    What I mean by updating grub is for example:

    I have 2 HDD. On one I install Windows (XP/Vista/7, doesn't matter). Then I take out the first one. I connect the second one and install Linux (openSUSE, Ubuntu, Mint, Arch, etc.) It will install GRUB as the bootloader to that HDD, being that it is the only HDD.

    Then I re-connect the 1st HDD (1st - Windows; 2nd - Linux Distro). If I turn on the machine, it will boot into the primary drive (master for PATA & primary selected drive via BIOS for SATA) and corresponding OS. Yet I won't have an option to boot the other OS. Now, on my system, and on many others, during POST we can press, for example, the F8 key to have a drive selection menu show up. Depending on which drive I select, the corresponding OS to that drive will then be selected and boot. But I don't want to have to press F8 every time.

    So, in the past, I make sure that the HDD with Linux installed on it is the primary drive (master or 1st via bios), that way it will boot first every time. Then once I am in to linux, I will open up a terminal and input the following command:
    Code:
    sudo update-grub
    or
    Code:
    sudo update-grub2
    This will then cause grub to scan all connected drives for any known OSes and add them to the menu.list or grub.cfg. Then at the next power-on of my machine, the grub boot menu will show both the installed linux and windows, plus any other OSes that it found.

    I just did this actually yesterday and the day before yesterday with three drives: 1st - Win7 Pro x64; 2nd - Mint 8 x64 (now mint 9 x64); and 3rd - Ubuntu 10.04 x64. It worked perfectly.

    That is what I mean by update grub: add other OSes to the boot menu automatically w/out having to manually enter them into the menu.list file (that is a pain!)

    Will YaSt do this for me via the GUI and/or terminal?

    ------------

    And in case you are wondering why I did it like that, it is because this way, each OS has it's own bootloader present on the same drive. It isn't dependent upon another drive being present just so that it can boot. I can take out a drive and still have access to the other drive's OSes. If something is broken, for example, if I remove the ubuntu drive then connect it at a later time to a different SATA slot, All I have to do is update Mint 9's boot menu and it will detect the "new" ubuntu being present and remove the "old" ubuntu's entry in the boot menu. It has saved me from many problems.

    That's why.

    -Ojosazul

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: How to update grub (legacy) in opensuse?

    Will YaSt do this for me via the GUI and/or terminal?
    Yes the sequence is Yast --> system --> bootloader --> Other button --> propose new configuration.

    In case of problems, first run this command to store the old Grub config file (menu.lst):
    Code:
    sudo cp /boot/grub/menu.lst /boot/grub/yikes.lst
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,884

    Default Re: How to update grub (legacy) in opensuse?

    I searched for update-grub on Google. It seems to be Debian.
    I can not find it in the normal openSUSE repos and never heard about it in these openSUSE Forums.
    It being a script (as I understand from my quick search) you could copy it from a Debian system, but I would use it with care. YaST may not like it, but as long as you are managing everything yourself (with update-grub) and do not use YaST for this item, I guess you are safe.

    EDIT: and as swerdna points out, YaST is cleverer then I knew of. One learns a new trick every day.
    Henk van Velden

  6. #6

    Default Re: How to update grub (legacy) in opensuse?

    Awesome!!! Thanks guys for the help. That was exactly what I was looking for.

    That is nice that YaST can do it via a GUI. Makes things a little easier.

    I appreciate your help.

    -Ojosazul

  7. #7

    Lightbulb Re: How to update grub (legacy) in opensuse?

    One other quick question somewhat related to my op.

    Does openSUSE, via the terminal, use 'sudo' or 'su' to gain super-user/root access? I always thought that it was 'su'.

    Take care.

    -Ojosazul

  8. #8
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,652

    Default Re: How to update grub (legacy) in opensuse?

    Either will work. sudo is only good for one process su changes users until you exit the session.

    Also you should use su -
    there is a difference in the enviroment if you leave the minus sign off. It read the man su for more info

  9. #9

    Default Re: How to update grub (legacy) in opensuse?

    Quote Originally Posted by swerdna View Post
    Yes the sequence is Yast --> system --> bootloader --> Other button --> propose new configuration.

    In case of problems, first run this command to store the old Grub config file (menu.lst):
    Code:
    sudo cp /boot/grub/menu.lst /boot/grub/yikes.lst

    WHAT DOES --->OTHER BUTTON --> PROPOSE NEW CONFIGURATION MEAN?
    There is no such button.
    If your going to post instructions post the correct steps !

  10. #10
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,044

    Default Re: How to update grub (legacy) in opensuse?

    On Fri, 23 Oct 2015 05:46:02 +0000, RBLOCK wrote:

    > swerdna;2184109 Wrote:
    >> Yes the sequence is Yast --> system --> bootloader --> Other button -->
    >> propose new configuration.
    >>
    >> In case of problems, first run this command to store the old Grub
    >> config file (menu.lst):>

    > Code:
    > --------------------
    > > > sudo cp /boot/grub/menu.lst /boot/grub/yikes.lst

    > --------------------
    >> >
    >> >

    >
    > WHAT DOES --->OTHER BUTTON --> PROPOSE NEW CONFIGURATION MEAN?
    > There is no such button.
    > If your going to post instructions post the correct steps !


    You might want to check the age of this thread - you're responding to a
    post that is > 5 years old.

    While it's possible that the user interface at this point hasn't changed
    in 5 years, my money is on that it has.

    If you're having a problem, you might start a new thread and discuss the
    problem you have with a *current* version of openSUSE.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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