Ubuntu Server boots to grub rescue after every kernel upgrade, have to revert to older kernel to boot, wrong disk in grub?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Still no go; I ended up adding "/dev/sda" to the end since that didn't specify a target.
If I throw in the 64GB SSD, what would the procedure be for converting that to boot? I think I understand the general idea, but I want to make sure...
1) Partition the SSD, make a 1GB efi partition at the front, then make a 16mb partition after that. efi partition is FAT32 and flagged as boot, 16MB partition is cleared, labeled bios-boot, and has the bios_grub flag
2) Confirm the lettering (I'm guessing the new drive will be /dev/sdb) and repeat the grub-install commands to remove the modules, targeting /dev/sdb
I should be able to blow away /dev/sda1 and /dev/sda3 in that case, correct? I feel like I should do that first, extend /dev/sda2 so it takes the whole virtual disk, but then reboot because it'll now be known as /dev/sda1. Then, in a fresh live-environment cycle, I'd need to confirm all drive letters. How do I specify that /dev/sda will contain root?
flag the efi partition esp. Mount /dev/sda2 /mnt, mount the new ssd efi partition to /mnt/boot/efi. On the first run do grub-install --boot-directory=/mnt/boot /dev/<ssd drive> .
If it was me I wouldn't do any partition changes on /dev/sda until the system was booting
Last edited by colorpurple21859; 10-23-2020 at 01:27 PM.
That is a good possibility, however if your fstab and grub.cfg uses uuids that shouldn't be an issue. Just hate adding a new issue before fixing the old issue.
This may work better to reinstall grub by chrooting into the system from live iso.
Code:
mount /dev/sda2 /mnt
mount /dev/<efi partition> /mnt/boot/efi
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt
grub-install /dev/<drive with efi partition?>
exit
reboot
I embraced legacy boot, cleared out those partitions, made a 16MB bios_grub partition, booted into the live environment, did boot-repair, and it's now up and running perfectly.
Thanks for all the help; I've learned a bunch and appreciate your time!
I don't think it really matters if one uses efi mode or legacy mode to boot a system as long as the system boots. The issue usually comes in when mixing uefi and legacy on a a multiboot system or when the system is using one and the live iso is using the other when attempting a fix. It is easier fixing a legacy boot from efi booted iso, then the other way around
AT least you got it working again.
Last edited by colorpurple21859; 10-24-2020 at 08:59 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.