Try running the mkconfig command in a root console instead of running “sudo” in a normal User console…
If that doesn’t work,
Then something happened when your kernel was installed.
Instead of chasing the problem,
I’d recommend force re-installing your kernel which I’d assume should re-write proper entries to your grub files…
ie.
Determine your exact kernel package name by running “zypper si kernel”
Then
That’s what is failing. The command “grub2-mkconfig” is failing because of that, so no new config is being generated.
I looked at “/usr/sbin/grub2-mkconfig”. That failing line is just
rm -f "${grub_cfg}.new"
At a quick scan, it looks as if “${grub_cfg}” is just supposed to be the path to the file “grub.cfg”. It is weird that it is too long.
As root, can you run the command:
sh -x /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Maybe first use the “script” command. And, when finished, use “exit” to leave “script”. That way the output will be in the file “typescript” in the current directory, where it can be examined. It should show what "${grub_cfg} is being expanded to. The last few lines in that “typescript” file are where to look.
Something is messed up on your system (which seems to be a virtual machine under “virtualbox”).
The error “/bin/rm: Argument list too long” means that the “rm” command was invoked, but the directory it’s pointing to has too many files to remove. You may need to use an “xargs rm” command against that directory or manually remove files in smaller batches. Problem is, I’m having problems locating the directory grub2-mkconfig is trying to clean out.
Verify your grub script hasn’t been altered with syntax errors
grub2-script-check /boot/grub2/grub.cfg
Although it’s probably not especially helpful,
Getting a readout of your grub.cfg output is probably something you should do to just verify it matches what you see and doesn’t have hidden lines or garbage
grub2-mkconfig
And,
An off the wall question… Is your root partition BTRFS and are you sure you have of available, unused space?
Yep, using the E and removed -5.1.16-default (no 5.2.x is listed on the Grub menu as I mentioned previously), I managed to log in with 5.2.3-1. Now I need to figure out how to fix the Grub menu to list the latest kernel version 5.2.3 and remove the old kernel versions on the Grub menu.
There’re a buntch of "vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 vga=gfx-1024x768x16 " stuffs in the 1st part of the output extended beyond the upper terminal. So that was the “Argument list too long” I think.
If it were me, I would probably reinstall to see if that solves the problem. Another alternative would be to report a bug. But I have not heard of others with the same problem, so it is probably specific to your system.
Are there any insanely long lines in /etc/default/grub or /boot/grub2/grub.cfg? If so, you could manually trim the replicated parameters and then try running grub2-mkconfig.
Xen is an open-source type-1 or baremetal hypervisor, which makes it possible to run many instances of an operating system or indeed different operating systems in parallel on a single machine (or host). Xen is the only type-1 hypervisor that is available as open source.
When you are requested to provide command output, you are expected to provide full command output, not your description what you have seen on screen at some point. Anyway, it looks like content of /etc/default/grub causes this issue. Provide full file (upload to https://susepaste.org/).
As mentioned previously, this situation occurred a few times in the past. After a fresh install of Tumbleweed went on rolling upgrade for a few months, this situation occurs. Then I have to do a fresh install of a new Tumbleweed release. It’s definitely weird.
Sorry, but the post here has a maximum length restriction, can’t post full output, and the 1st part of the output on the terminal was truncated by screen anyway. I’ll try to upload file if possible.
I suggest instead pastebin (susepaste) full versions of grub2-mkconfig.out and /etc/grub/default, any time they (or any kind of logging ouput) are bigger than a screen page or so here, and paste here only the URL of the upload. That way one can peruse (or save to disk for grepping) one file instead of trying to piece together multiple posts and/or pages that end and begin with to be continued and/or continuation, and similar benefit for web search tools and searchers, seeing what you saw.
What I meant with posting is provide an URL to the files such as http://mistelberger.net/bootinfoscript.out I am quite clueless regarding pastebin. Does one really need to paste large quantities of text or is there an easier way of uploading files?
You and I have no functional disagreement. Pastebinning functions e.g. as a substitute for a personal web server for sharing large files, such as logs, screenshots and bootinfoscript.sh ouput, to minimize the noise level in the involved thread. “Post”, without more, leads many to believe is meant copy and paste directly into the forum’s textarea input box much text that typically serves no lasting useful purpose. Susepaste is a cli utility to facilitate the temporary large file sharing that is pastebinning.