Missing (or replaced?) Grub - Ununtu Multiboot in old Dell Laptop
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
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.
Missing (or replaced?) Grub - Ununtu Multiboot in old Dell Laptop
Ubuntu (Studio) 22.04 LTS
After a restart, my GRUB seems to have been replaced with some other one that defaults to Ubuntu installation process.
GRUB was written on the original installation of this Ubuntu Studio.
This happened after a simple reboot of the machine. No further OS installs have been performed so I cant think of a reason the GRUB would be compromised.
However, I did happen to accidentally kick the makeshift table that the machine sits on, during the previous boot.
There is a selection on the current (wrong) GRUB that says "Boot from next volume" which when selected boots up Windows 10 just fine. And this Win 10 operates just fine.
Ive never had to recover a GRUB and my Linux skills are weak.
The correct grub lists Windows 10, two different Ubuntus and a Kubuntu.
Well anyway, the five options in the current grub are:
•Try or Install Ubuntu Studio
I attempted this to try to write a new grub on a different partition, but the install process goes on indefinately listing a bunch of errors along the way.
•Ubuntu Studio (safe graphics)
Same results as above.
•OEM install (for manufacturers)
•Boot from next volume
This option successfully loads Windows 10 everytime.
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368
Rep:
Hi,
Try this first..
When booting, repeatedly press the 'esc' key.
If you are dropped to a Grub menu, press 'c' to obtain the Grub command prompt.
When at the Grub prompt, enter the following.
Drives count from 0, partitions from 1. If you don't know which partition is which, then just repeat the command, starting from 1 and work upwards.
i.e. (hd0,1)/ then (hd0,2)/ and so on.
Here, this produces a directory listing of the third partition of the first (detected) hard drive (assuming that a valid filesystem exists).
Code:
ls (hd0,3)/
Look for the output that indicates a Linux system top level directory structure ('bin', 'boot', 'dev', 'etc' and so on.)
Assuming that (hd0,3) is the required partition. Now enter this:
Code:
set root=hd0,3
set prefix=($root)/boot/grub
configfile $prefix/grub.cfg
The system **should** boot properly now. It will boot via the system's local 'grub.cfg'.
**IF** the system boots properly now, then open a terminal and run:
Code:
sudo update-grub
This update will overwrite the existing 'grub.cfg' file with a new one. You may or may not have other OS's detected. This is easy to correct if you need this. Just ask here.
Can you post here exactly what you find please.
B.
EDIT: The commands that are entered at the Grub prompt are transient. If the machine is rebooted **without** fixing the boot problem (reinstall Grub etc.) then these steps will need to be repeated.
Last edited by bodge99; 12-23-2022 at 06:37 PM.
Reason: Clarification regarding Grub prompt commands.
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368
Rep:
Hi,
I forgot to add..
If it turns out that there is a problem with your Ubuntu installation, then just repeat the manual Grub boot from one of the other system partitions..
This should allow you to boot the one of the other Ubuntu's.
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368
Rep:
Hi,
Try a Grub directory listing of (hd0,10)/ and see what it shows..
I've got a suggestion regarding your multiboot environment which might help a little in the future.. Of course I'll wait until the current crisis is sorted..
IM IN!!! Now talking to you from within the needed OS!
Second attempt, though, because when I rebooted after the first try, the grub problem came back the same. I believe that was my error, mistaking what I thought was my console processes completed.
So here I am in the second attempt, but have not yet rebooted to confirm remedy.
Here's the console's spitout:
[sudo] password for studioworker:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-52-lowlatency
Found initrd image: /boot/initrd.img-5.15.0-52-lowlatency
Found linux image: /boot/vmlinuz-5.15.0-52-lowlatency
Found initrd image: /boot/initrd.img-5.15.0-52-lowlatency
Found linux image: /boot/vmlinuz-5.13.0-28-lowlatency
Found initrd image: /boot/initrd.img-5.13.0-28-lowlatency
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 20.04.3 LTS (20.04) on /dev/sda11
Found Ubuntu 20.04.4 LTS (20.04) on /dev/sda7
Adding boot menu entry for UEFI Firmware Settings
done
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368
Rep:
Hi,
Glad to hear that you are making progress..
A couple of points to mention, as you appear to be using a standard multibooting setup.
For Ubuntu's (and derivatives) there is an initial 'grub.cfg' within the ESP partition. The full path from a running system is '/boot/efi/EFI/ubuntu/grub.cfg'. This 'grub.cfg' points to the target installations local 'grub.cfg' (at '/boot/grub/grub.cfg'). The partition is identified by its filesystem UUID.
It **is** possible for this UUID to be pointing at the wrong filesystem.. The local 'grub.cfg' here then points somewhere else. All good fun where one systems Grub installation is used to start a kernel on a different filesystem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.