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.
All works as expected until I actually try to configure grub:
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.
I tried Cafe’s instructions again, but this time also added
mount /boot
Then I tried ‘grub2-mkconfig’ and got a respose:
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)
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.
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:
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:/>
Boot the live media.
Mount your root partition at “/mnt”
Mount your “/boot” at “/mnt/boot”
Mount any other important partitions.
Then:
# mount --bind /dev /mnt/dev
# mount --bind /sys /mnt/sys
# mount --bind /proc /mnt/proc
# chroot /mnt
If grub2 is already installed, then:
# 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.
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.
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.
OK, I’m not exactly sure what it was that I did to make it work, but I kept playing with the mount locations and the ‘grub2-mkconfig’ worked without errors. Sorry, I know that’s not very helpful for the next reader…
Anyway, when my system finally booted again, I had nearly 4,000 packages in need of update (mostly, the texlive stuff. I do a lot with LaTeX). I did a ‘zypper dup’ and left while the system updated.
I rebooted and still had another 700+ package in need of update but I just updated those through Yast.
Other than having to go back and rework the video configurations I think I’m in pretty good shape now. (I have the Ivy bridge and an Nvidia card; the kernel really wants to use Nouveau. …but that’s another issue entirely and I’ve solved it before so I think I’ll be OK.)
Appreciate all the help from both arvidjaar and nrickert.