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

Thread: Grub doesn't show openSuse boot option

  1. #1
    Join Date
    Jul 2020
    Location
    Buenos Aires, Argentina
    Posts
    8

    Default Grub doesn't show openSuse boot option

    Hi there!
    After I installed several updates, and after I rebooted the system, Grub no longer shows OpenSuse boot option. (Grub only shows Windows boot option in a black screen. Grub version 2.0.4)
    Now I cannot boot openSuse.
    How can I get Grub to show back openSuse boot option?

    Thank you, in advance.
    --
    Adrián E. Córdoba

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,533
    Blog Entries
    3

    Default Re: Grub doesn't show openSuse boot option

    I'm puzzled as to how that is even possible.

    There should be a boot option for each installed kernel.

    Is it possible that you accidentally removed all kernels?
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  3. #3
    Join Date
    Jul 2020
    Location
    Buenos Aires, Argentina
    Posts
    8

    Default Re: Grub doesn't show openSuse boot option

    Quote Originally Posted by nrickert View Post
    I'm puzzled as to how that is even possible.

    There should be a boot option for each installed kernel.

    Is it possible that you accidentally removed all kernels?
    I don't think so.
    --
    Adrián E. Córdoba

  4. #4
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    747

    Default Re: Grub doesn't show openSuse boot option

    Try exploring the boot options from grub using this method:
    https://www.howtoforge.com/tutorial/...h-grub-rescue/

    You basically need to start from grub command line and explore
    Code:
    ls (
    then use "tab" twice to see what options you have and look for something like
    Code:
    (hd0,1)/boot/grub
    If you can't find anything, you may have accidentally deleted at least the default kernel. If that's the case, you need a USB stick with LEAP/TW installed.

    If you do find something and boot from it, Yast Bootloader should be able to fix this for you.

  5. #5
    Join Date
    Jul 2020
    Location
    Buenos Aires, Argentina
    Posts
    8

    Default Re: Grub doesn't show openSuse boot option

    Quote Originally Posted by SJLPHI View Post
    Try exploring the boot options from grub using this method:
    https://www.howtoforge.com/tutorial/...h-grub-rescue/

    You basically need to start from grub command line and explore
    Code:
    ls (
    then use "tab" twice to see what options you have and look for something like
    Code:
    (hd0,1)/boot/grub
    If you can't find anything, you may have accidentally deleted at least the default kernel. If that's the case, you need a USB stick with LEAP/TW installed.

    If you do find something and boot from it, Yast Bootloader should be able to fix this for you.
    If that was the case... Is it posible to rapair the system with the rescue optionof the installation DVD?
    --
    Adrián E. Córdoba

  6. #6
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    747

    Default Re: Grub doesn't show openSuse boot option

    Quote Originally Posted by aecordoba1 View Post
    If that was the case... Is it posible to rapair the system with the rescue optionof the installation DVD?
    Yes, but it's a bit complicated.

    If you mean by: kernels not deleted = It's easier to just configure your grub and boot from existing ones and use the Yast Bootloader, this is the cleanest and easiest way.
    You can also use the rescue media to explore the existing kernels, and mount, bind and chroot the existing / then re-compile the kernel or reconfigure grub by:

    Code:
    mkinitrd
    or
    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    in either of the case, you want to make sure that you can see the linux entries in your /boot/grub2/grub.cfg

    on binding, mounting and chrooting: (https://forums.opensuse.org/showthre...aster-recovery)

    If you mean by: kernels deleted = You need to use a rescue media to mount, bind and chroot your existing / and download and install a kernel. This is not very trivial because you need to set up your rescue environment. Personally, I have a shared NTFS partition between linux and W10 and I downloaded kernel from W10, placed it in the shared partition and installed downloaded kernel. I've done exactly this in the same link above (https://forums.opensuse.org/showthre...aster-recovery).

  7. #7
    Join Date
    Jul 2020
    Location
    Buenos Aires, Argentina
    Posts
    8

    Default Re: Grub doesn't show openSuse boot option

    Thank you, very much!
    --
    Adrián E. Córdoba

  8. #8

    Post They don't like each other

    Both opensuse and Windows, when installed on the same computer, have a tendency to delete boot options of the other OS. Usually happens after updates, 1-4 times per year.


    If opensuse has deleted Windows's boot option, then the solution is easy: boot into opensuse, and reinstall the boot loader. If this is done in Yast, don't forget to enforce "Probe Foreign OS".


    If Windows has deleted the opensuse's boot option, then the story is longer. Boot from a Live or rescue Linux USB flash drive or CD, and do these steps. They are described in more details elsewhere; here is an approximate sequence of steps:


    1) Identify the root partition (/, not /root) and mount. (The root partition contains /etc and /home):
    Code:
    mount -t ext4 /dev/sda2 /mnt

    2) If UEFI boot is used, identify and mount the the FAT partition used for booting:
    Code:
    mount -t vfat /dev/sda1 /mnt/bootefi

    3) Mount (bind) three filesystems:
    Code:
      mount --rbind /proc /mnt/proc
      mount --rbind /sys  /mnt/sys
      mount --rbind /dev  /mnt/dev

    4) Optionally, one more mount:
    Code:
     mount -t devpts pts /mnt/dev/pts

    5) Change root (chroot):
    Code:
    chroot /mnt

    6) Optionally, mount all filesystems:
    Code:
    mount -a

    7) Reinstall grub with one of these methods, or with some other command:
    Code:
    grub2-install --target=x86_64-efi /dev/sda
    
    grub2-install --target=x86_64-efi --efi-directory=/bootefi /dev/sda
    
    Start yast,  go to System -> Boot Loader
    
    Start yast2, go to System -> Boot Loader

    8) Exit the chroot environment:
    Code:
    exit

    9) Unmount the filesystems in reverse order:
    Code:
      umount /mnt/dev/pts
      umount /mnt/dev
      umount /mnt/sys
      umount /mnt/proc

    10) Reboot
    Code:
    reboot

  9. #9
    Join Date
    Oct 2014
    Location
    Switzerland
    Posts
    747

    Default Re: They don't like each other

    Quote Originally Posted by ZStefan View Post
    Both opensuse and Windows, when installed on the same computer, have a tendency to delete boot options of the other OS. Usually happens after updates, 1-4 times per year.


    If opensuse has deleted Windows's boot option, then the solution is easy: boot into opensuse, and reinstall the boot loader. If this is done in Yast, don't forget to enforce "Probe Foreign OS".


    If Windows has deleted the opensuse's boot option, then the story is longer. Boot from a Live or rescue Linux USB flash drive or CD, and do these steps. They are described in more details elsewhere; here is an approximate sequence of steps:


    1) Identify the root partition (/, not /root) and mount. (The root partition contains /etc and /home):
    Code:
    mount -t ext4 /dev/sda2 /mnt

    2) If UEFI boot is used, identify and mount the the FAT partition used for booting:
    Code:
    mount -t vfat /dev/sda1 /mnt/bootefi

    3) Mount (bind) three filesystems:
    Code:
      mount --rbind /proc /mnt/proc
      mount --rbind /sys  /mnt/sys
      mount --rbind /dev  /mnt/dev

    4) Optionally, one more mount:
    Code:
     mount -t devpts pts /mnt/dev/pts

    5) Change root (chroot):
    Code:
    chroot /mnt

    6) Optionally, mount all filesystems:
    Code:
    mount -a

    7) Reinstall grub with one of these methods, or with some other command:
    Code:
    grub2-install --target=x86_64-efi /dev/sda
    
    grub2-install --target=x86_64-efi --efi-directory=/bootefi /dev/sda
    
    Start yast,  go to System -> Boot Loader
    
    Start yast2, go to System -> Boot Loader

    8) Exit the chroot environment:
    Code:
    exit

    9) Unmount the filesystems in reverse order:
    Code:
      umount /mnt/dev/pts
      umount /mnt/dev
      umount /mnt/sys
      umount /mnt/proc

    10) Reboot
    Code:
    reboot
    You may want to specify what your /dev/sda1 and /dev/sda2 are. Your instructions seem sound for your specific setup but may not be applicable to the OP.

  10. #10

    Post More explanation

    Quote Originally Posted by SJLPHI View Post
    You may want to specify what your /dev/sda1 and /dev/sda2 are. Your instructions seem sound for your specific setup but may not be applicable to the OP.
    I think the OP has encountered exactly the "Boot option of an OS disappeared!" problem that I face regularly on several computers. Here is what he says:

    "After I installed several updates, and after I rebooted the system, Grub no longer shows OpenSuse boot option. (Grub only shows Windows boot option in a black screen. Grub version 2.0.4)
    Now I cannot boot openSuse."

    It is quite frightening for an inexperienced soul ("To the hell with these irresponsible programmers and their defective OSes, but are my files gone?").


    /dev/sda1 is the partition on which the root of Linux filesystem (/) exists. The size of this partition might be from 1 to 40 GB, often close to 8 GB. The filesystem type usually is ext4, btrfs, XFS, reiserfs. It is very unlikely to be vfat, NTFS, exFAT. Cannot be swap.

    /dev/sda2 is the vfat- or FAT32-formatted partition on which UEFI boot partition exists. It is a small partition normally, between 0.05 and 1 GB. This partition exists only if UEFI boot is used in the computer. Most modern computers use UEFI and most old computers (before 2010) don't.


    The exact names of disks and partitions (/dev/sda, /dev/sdb, /dev/sda1, ... ) can be found out by mounting all partitions in the computer one-by-one (in Live Linux), and analyzing their filesystem type, size and content. I suggest don't use
    Code:
    -t auto
    option for mounting. Also don't forget to unmount after analysis.

    In simple scenarios (one or two disks, Linux+Windows, no traces of previous OSes), identifying the needed partitions is easy, especially with help from Internet.

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
  •