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

Thread: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

  1. #1

    Default Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Last night I upgraded from 12.3 to 13.1 using the repo update method (change repos from 12.3 to 13.1 then zypper dup). During the install, I had a message that grub2 could not be installed.

    Now my system boots to the 'grub rescue' prompt.

    I followed the instructions from this post: https://forums.opensuse.org/content/...vd-rescue.html

    All works as expected until I actually try to configure grub:

    Code:
    Rescue:/> grub2-mkconfig -o /boot/grub2/grub.cfg
    /usr/bin/grub2-editenv: error: cannot open '/boot/grub2/grubenv.new' No such file or directory
    /usr/bin/grub2-mkconfig: line 253: boot/grub2/grub.cfg.new: No such file or directory
    Do I need to re-install Grub2? I don't think I know how to do that from outside the system.

  2. #2

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Oh. I think I may be on to something...

    I tried Cafe's instructions again, but this time also added

    Code:
    mount /boot
    Then I tried 'grub2-mkconfig' and got a respose:

    Code:
    cat: write error: No space left on device
    So, I'm wondering if the problem all along was that there isn't enough space on my boot partition to update Grub2 in the first place (though, there is not complaint if I re-install Grub)

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,677
    Blog Entries
    3

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Quote Originally Posted by CWDillon View Post
    Last night I upgraded from 12.3 to 13.1 using the repo update method (change repos from 12.3 to 13.1 then zypper dup). During the install, I had a message that grub2 could not be installed.
    Do you have a separate "/boot" partition?

    If you do, then check whether it is full. That would explain your symptoms.

    If it is full, then you probably need to delete some old kernels to make space. While in rescue mode, and while you are in that chroot environment, you can run "yast" in a terminal. Go to software manager, search for kernel, check the installed versions, and delete the older versions that you don't need.

    Or, more crudely, just delete the old kernels and "initrd" files for those kernels from "/boot". Once you have the system up and running, use Yast from within the system to clean up remaining remnants of the old kernels.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  4. #4

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Thanks, nrickert

    Don't know whether this represents progress or not, but it's different...

    I tried first through Yast but still could see linux 3.7 kernels if I looked into the /boot dir. So I used your 'more crude' method and just deleted the 3.7 kernels and initrd files.


    This time, when I try to run 'grub2-mkconfig' I get a different response:


    Code:
    Rescue:/> grub2-mkconfig -o /boot/grub2/grub-cfg
    Generating grub.cfg ...
    Found theme: /boot/grub2/themes/openSUSE/theme.txt
    Found linux image: /boot/vmlinuz-3-11.6.4-desktop
    Found initrd image: /boot/initrd-3.11.6-4-desktop
    Found linux image: /boot/vmlinuz-3-11.6.4-default
    Found initrd image: /boot/initrd-3.11.6-4-default
    Found linux image: /boot/vmlinuz-3.11/6-4-xen
    Found initrd image: /boot/initrd-3.11.6-4-xen
    ERROR: opening path /mounts/initsys/sys/block
    ERROR: failed to discover devices
    ERROR: opening path /mounts/initsys/sys/block
    ERROR: failed to discover devices
    ERROR: opening path /mounts/initsys/sys/block
    ERROR: failed to discover devices
    ERROR: opening path /mounts/initsys/sys/block
    ERROR: failed to discover devices
      /dev/mapper/control: mknod failed: No such file or directory
      Failure to communicate with kernel device-mapper driver.
      Check that device-mapper is available in the kernel.
      No volume groups found
    Found Windows 7 (loader) on /dev/sda1
    done
    Rescue:/>
    Does that mean something useful to you?

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,677
    Blog Entries
    3

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Quote Originally Posted by CWDillon View Post
    Does that mean something useful to you?
    You probably didn't do the rescue properly.

    From memory:

    Boot the live media.
    Mount your root partition at "/mnt"

    Mount your "/boot" at "/mnt/boot"

    Mount any other important partitions.

    Then:
    Code:
    # mount --bind /dev  /mnt/dev
    # mount --bind /sys  /mnt/sys
    # mount --bind /proc  /mnt/proc
    # chroot /mnt
    If grub2 is already installed, then:
    Code:
    # grub2-mkconfig -o /boot/grub2/grub.cfg
    If you are not sure whether it is already installed, you might instead need to run yast (at the command line) and go into the bootloader section. Or possibly use "/usr/sbin/grub2-install" and I think that might need to be told where to install.

    Your error message suggests to me that you skipped one of those "--bind" mounts.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  6. #6

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    OK, that makes some sense (probably, you've guessed by now that I really have very little idea what I'm doing).

    I tried verbatim what you suggested but ran into an error

    My boot partition is at /sdb1 and my root partition is at /sdb3 so I did:

    Code:
    mount /dev/sdb3 /mnt
    mount /dev/sdb1 /boot
    mount --bind /dev /mnt/dev
    mount --bind /sys /mnt/sys
    mount --bind /proc /mnt/proc
    Then,

    Code:
    chroot /mnt
    grub2-mkconfig -o /boot/grub2/grub.cfg
    and I get the same error as before.

    The bootloader is set to boot from the master boot record, which seems right but I added also to boot from the boot partition (it'll try those in order, correct?)

    Anyway, grub2-install (as well as 'grub2-install.unsupported') is visible in /usr/sbin/

    I'd kind of like to learn how to fix this but I may be time ahead if I just install 13.1 over the top of the existing and spend the weekend re-installing/configuring software.

  7. #7

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Correction:
    That was...

    Code:
    mount /dev/sdb3 /mnt
    mount /dev/sdb1 /mnt/boot

  8. #8

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    I went back out to the rescue disk prompt and added:

    Code:
    mount --bind /boot /mnt/boot
    chroot /mnt
    grub2-mkconfig -o /boot/grub2/grub.cfg
    and I get

    Code:
    /usr/sbin/grub2-probe: error: failed to get canonical path of 'tmpfs'.

    I'm assuming 'tmpfs' refers to the swap partition. Do I need to mount the swap partition too?

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,677
    Blog Entries
    3

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Quote Originally Posted by CWDillon View Post
    I'm assuming 'tmpfs' refers to the swap partition. Do I need to mount the swap partition too?
    No, that should not be needed. Something else is wrong, but I'm not sure what at the moment.

    If your installed system is 64-bit, then your rescue boot (live CD or whatever) must also be 64-bit. Similarly, if the installed system is 32-bit, then the rescue boot must be 32-bit.

    I'm not sure if that is the problem, but I would expect weird messages if you have an architecture mismatch.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  10. #10
    Join Date
    Sep 2012
    Posts
    7,102

    Default Re: Upgrading 12.3 -> 13.1 (repo update method); now with broken grub

    Quote Originally Posted by CWDillon View Post
    I went back out to the rescue disk prompt and added:

    Code:
    mount --bind /boot /mnt/boot
    Code:
    /usr/sbin/grub2-probe: error: failed to get canonical path of 'tmpfs'.
    Do I need to mount the swap partition too?
    No, this message simply means that your /boot is not mounted on real device and remains just a directory on RAM disk (used by rescue system as root).

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
  •