[SOLVED] Repairing the booting system with Boot-repair
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am working on Ubuntu BionicBeaver 18.04.3.
The boot of my computer has stopped to work for an unknown reason, I am now limited to the GNU GRUB window.
I have tried to initialize the kernel, as written here:
Unfortunately, the Boot-repair tool installation is not working.
Code:
ubuntu@ubuntu:~$ sudo apt-get install -y boot-repair
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
boot-repair : Depends: boot-sav but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
based on one of your previous threads ti will be something like this if your not at a grub-rescue> prompt
The "grub> ls" should show what to set the "set root=" to
Code:
grub> insmod lvm
grub> ls
grub> set root=(ubuntu--vg)
grub> linux /vmlinuz root=/dev/mapper/─ubuntu--vg-root
grub> initrd /initrd.img
grub> boot
Hello colorpurple21859, thanks for your answer.
I think I have already tried these command, but you can maybe help me to understand what is it going on.
On the GNU GRUB screen, with minimal BASH-like commands:
Quote:
grub> insmod lvm
grub> ls
(hd0) (hd0,gpt2) (hd0,gpt1)
grub> set root=(ubuntu--vg)
grub> linux /vmlinuz root=/dev/mapper/─ubuntu--vg-root
error: no server is specified.
grub> initrd /initrd.img
error: you need to load the kernel first
grub> boot
error: you need to load the kernel first
For information I have searched for the vmlinuz and initrd.img. They do not exist.
I can access to my computer via a booting memory stick, but the commands do not help.
Quote:
ubuntu@ubuntu:~$ insmod lvm
insmod: ERROR: could not load module lvm: No such file or directory
ubuntu@ubuntu:~$ set root=(ubuntu--vg)
bash: syntax error near unexpected token `('
ubuntu@ubuntu:~$ linux /vmlinuz root=/dev/mapper/-ubuntu--vg-root
linux: command not found
ubuntu@ubuntu:~$ initrd /initrd.img
initrd: command not found
ubuntu@ubuntu:~$ boot
Command 'boot' not found, did you mean:
command 'brot' from deb fortunes-de
command 'boog' from deb alliance
command 'hboot' from deb lam-runtime
command 'boom' from deb alliance
command 'boom' from deb doomsday
command 'boom' from deb prboom-plus
command 'booth' from deb booth
The Ubuntu site below explains how to install boot-repair by first adding the repository necessary. The info you posted above does not tell us whether you used that step. At the site below, a 2nd option is explained and you should use that method as it is more current.
But vmlinuz and initrd are not in the boot repository, nor anywhere in the accessible gpt1 and gpt2 folders.
You are using LVM which generally means a separate boot partition on which you would have the vmlinuz and initrd files. Have you mounted those partitions from another OS installed or live and checked to see that those files do or do not exist? If you have and they are not there, you won't be able to boot until that problem is remedied.
If you are using a system on a usb/memory stick, you need to be root (use sudo) to run those commands and also to chroot so that you are running those commands on the system rather that the live usb/memory stick.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.