[Solved] After successful-seeming install, boots to grub-rescue CLI??
-
- Posts: 36
- Joined: 2024-09-01 12:59
[Solved] After successful-seeming install, boots to grub-rescue CLI??
It took me about five tries to get the right combination of partition settings for /boot/efi, /, /home, and swap (label failed on swap the first time, etc.) on my Thinkpad T430 (Core i5 2.9 GHz, 16 GB RAM, ~300 GB platter drive with Win10 and previously Kubuntu 22.04, partitioned with 50 GB for /, ~28 for swap, and 160+ for /home) to get installation to complete. Once it did, I may have done something I shouldn't have by removing the USB stick before shutdown was completed, but that shouldn't damage anything on the hard disk, right? After hard restarting, I checked that the USB stick was okay (goes as far as the normal GRUB screen, at least), then restarted to Debian 12.7 KDE -- except now I'm looking at a grub-rescue command prompt. The error message above that reads "file 'boot/grub/i386-pc/normal.mod' not found."
I reformatted the old Ubuntu EFI boot partition, wiped the Ubuntu / and swap partitions and reformatted them, and kept my old /home.
Where did I go wrong? I need to know this before I install on my desktop machine, which has more than 1.5 TB of data that I don't have the resources to back up.
I booted the laptop back to the Live session (guess the USB image isn't damaged, anyway), and I find that boot partition (3 GB) contains an EFI folder, which contains boot and Debian. The boot folder is empty, while Debian contains BOOTx64.CSV, fbx64.efi, grub.cfg, grubx64x.efi, mmx64.efi, and shimx64.efi. Seemingly relevant, there is no boot/grub folder. Would update-grub from a chroot to the installed device fix this?
I reformatted the old Ubuntu EFI boot partition, wiped the Ubuntu / and swap partitions and reformatted them, and kept my old /home.
Where did I go wrong? I need to know this before I install on my desktop machine, which has more than 1.5 TB of data that I don't have the resources to back up.
I booted the laptop back to the Live session (guess the USB image isn't damaged, anyway), and I find that boot partition (3 GB) contains an EFI folder, which contains boot and Debian. The boot folder is empty, while Debian contains BOOTx64.CSV, fbx64.efi, grub.cfg, grubx64x.efi, mmx64.efi, and shimx64.efi. Seemingly relevant, there is no boot/grub folder. Would update-grub from a chroot to the installed device fix this?
Last edited by Silent Observer on 2024-11-30 19:09, edited 1 time in total.
- wizard10000
- Global Moderator
- Posts: 1152
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 121 times
- Been thanked: 201 times
Re: After successful-seeming install, boots to grub-rescue CLI??
Debian's installer will tell you when to remove the flash drive, it sound like grub was less-than-completely installed.Silent Observer wrote: 2024-11-29 00:44Where did I go wrong? I need to know this before I install on my desktop machine, which has more than 1.5 TB of data that I don't have the resources to back up.
...Would update-grub from a chroot to the installed device fix this?
update-grub won' fix it but reinstalling grub will.
Hope this helps -
we see things not as they are, but as we are.
-- anais nin
-- anais nin
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
Thanks, but a complete Debian reinstall, with correct handling of the USB stick, made no change. An attempt with Boot Repair also didn't help, so I reinstalled Debian again and still no change.
How would I go about reinstalling GRUB on a system that doesn't boot?
Also, why is the Debian KDE installer seemingly setting GRUB up to expect a 32-bit OS? Did I download the 32-bit version by mistake? But even if I did, that should run on a 64-bit Intel processor, should it not?
How would I go about reinstalling GRUB on a system that doesn't boot?
Also, why is the Debian KDE installer seemingly setting GRUB up to expect a 32-bit OS? Did I download the 32-bit version by mistake? But even if I did, that should run on a 64-bit Intel processor, should it not?
- wizard10000
- Global Moderator
- Posts: 1152
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 121 times
- Been thanked: 201 times
Re: After successful-seeming install, boots to grub-rescue CLI??
What happens if you chroot into the install and reinstall grub? Any errors generated would be helpful.
Without knowing which image you downloaded it'd be real tough to tell whether you're using a 32-bit .iso - did you use the default netinstall image linked on Debian's homepage or something else?
Without knowing which image you downloaded it'd be real tough to tell whether you're using a 32-bit .iso - did you use the default netinstall image linked on Debian's homepage or something else?
we see things not as they are, but as we are.
-- anais nin
-- anais nin
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
I've tried chroot (to the right place?) followed by sudo grub-install, which gave "command not found". I gave "sudo apt install grub" with seeming success, but then got "cannot find canonical location for 'overlay'". I've searched for more involved ways to install grub from the Live session, but they're for Ubuntu or other Debian-based distros, sometimes several years old, and invariably result in some kind of error message.
I've been using Linux for thirteen years, but I'm one who doesn't get under the hood unless necessary and I'll use a command or series of commands once, they fix the problem, and then I won't remember them some years later when a similar problem crops up.
I downloaded the 64-bit Debian KDE image from somewhere in Debian's pages a couple months ago, verified the checksum or SHA256 (don't recall which) after downloading, and burned the result to a USB with Kubuntu 22.04 "Startup Disk Creator" -- and it boots on both my desktop machine (AMD Fx8350 8 cores 4.1 GHz, 32 GB RAM, RTx2070, 1 TB platter drive, 256GB and 1 TB SSDs) and my T430 (no discrete graphics card, Core i5 2 cores, 4 threads, 2.9 GHz, 16 GB RAM, 300 GB platter drive, DVD-RW, with 32 GB SD card in external slot (been there for a long time, it's got Kerbal Space Program on it). Kernel version showing in the Info Center on the laptop is 6.0.25-amd64 -- which I wouldn't think would have anything invoking i386-pc software??
The fstab in the installed OS shows what I'd expect -- the /boot/efi, /, and /home, with correct formats. No entry shows for swap, but I can add that manually and with 16 GB the system ought to run for light use without swap.
/boot/efi has the structure I posted above. /boot in the main partition has /boot/efi (empty -- mount point for /boot/efi partition?), /boot/grub with the files and folders I'd expect after running Ubuntu flavors for years. This suggests that GRUB was installed, but perhaps not in the correct location (MBR vs. /boot/efi?).
I've been using Linux for thirteen years, but I'm one who doesn't get under the hood unless necessary and I'll use a command or series of commands once, they fix the problem, and then I won't remember them some years later when a similar problem crops up.
I downloaded the 64-bit Debian KDE image from somewhere in Debian's pages a couple months ago, verified the checksum or SHA256 (don't recall which) after downloading, and burned the result to a USB with Kubuntu 22.04 "Startup Disk Creator" -- and it boots on both my desktop machine (AMD Fx8350 8 cores 4.1 GHz, 32 GB RAM, RTx2070, 1 TB platter drive, 256GB and 1 TB SSDs) and my T430 (no discrete graphics card, Core i5 2 cores, 4 threads, 2.9 GHz, 16 GB RAM, 300 GB platter drive, DVD-RW, with 32 GB SD card in external slot (been there for a long time, it's got Kerbal Space Program on it). Kernel version showing in the Info Center on the laptop is 6.0.25-amd64 -- which I wouldn't think would have anything invoking i386-pc software??
The fstab in the installed OS shows what I'd expect -- the /boot/efi, /, and /home, with correct formats. No entry shows for swap, but I can add that manually and with 16 GB the system ought to run for light use without swap.
/boot/efi has the structure I posted above. /boot in the main partition has /boot/efi (empty -- mount point for /boot/efi partition?), /boot/grub with the files and folders I'd expect after running Ubuntu flavors for years. This suggests that GRUB was installed, but perhaps not in the correct location (MBR vs. /boot/efi?).
- wizard10000
- Global Moderator
- Posts: 1152
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 121 times
- Been thanked: 201 times
Re: After successful-seeming install, boots to grub-rescue CLI??
TryIf that doesn't work I'd suggest trying the recommended netinstall image here on [Debian's homepage](https://debian.org) - just click the link and it'll download the .iso
Code: Select all
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
we see things not as they are, but as we are.
-- anais nin
-- anais nin
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
You're assuming I know things I'm not sure of. Before that command, I'd "chroot /dev/sda" or "chroot /dev/sda3" (the /boot/efi partition) or "chroot /dev/sda5" (/ partition)? Or do I need to mount all those partitions first?
I tried mounting the relevant partitions (sda3, sda6, and sda7), then "chroot /sda6" (the newly installed root partition) and your command above; that got me "/usr/lib/grub/x86-64-efi/modinfo.sh doesn't exist." -- which it doesn't, either in /usr/lib or in /boot/efi/Debian or /boot/grub.
I saw no indication that most current .iso (12.8, last available when I downloaded was 12.7) is the one with KDE Plasma desktop. Is there a choice point in the install to select a DE, or will I have to download and install Plasma 5 and live with the duplication with (I presume) Gnome?
BTW, here's where I downloaded the Live KDE I'm working from at present (except in September it was 12.7): https://cdimage.debian.org/debian-cd/cu ... 64-kde.iso
I tried mounting the relevant partitions (sda3, sda6, and sda7), then "chroot /sda6" (the newly installed root partition) and your command above; that got me "/usr/lib/grub/x86-64-efi/modinfo.sh doesn't exist." -- which it doesn't, either in /usr/lib or in /boot/efi/Debian or /boot/grub.
I saw no indication that most current .iso (12.8, last available when I downloaded was 12.7) is the one with KDE Plasma desktop. Is there a choice point in the install to select a DE, or will I have to download and install Plasma 5 and live with the duplication with (I presume) Gnome?
BTW, here's where I downloaded the Live KDE I'm working from at present (except in September it was 12.7): https://cdimage.debian.org/debian-cd/cu ... 64-kde.iso
- wizard10000
- Global Moderator
- Posts: 1152
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 121 times
- Been thanked: 201 times
Re: After successful-seeming install, boots to grub-rescue CLI??
chroot instructions - https://wiki.debian.org/chroot
That image will install any desktop environment, you select it toward the end of the install. Just deselect GNOME and select KDE instead.I saw no indication that most current .iso (12.8, last available when I downloaded was 12.7) is the one with KDE Plasma desktop. Is there a choice point in the install to select a DE, or will I have to download and install Plasma 5 and live with the duplication with (I presume) Gnome?
we see things not as they are, but as we are.
-- anais nin
-- anais nin
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
Okay, let me give that one a try. I've also grabbed the 12.8 KDE Live, just in case I need to have a matching version live session available.
Off to check the SHA256, burn the USB, and try installing that.
But good grief, nothing in Linux just does one thing, does it? Every reference I've seen for chroot until now it was about what the name seems to imply: changing your root location (useful for working within the new install while still booted on the Live session). That link makes it look like something that's in the same class as installing Linux before there were automatic installers (I'm probably exaggerating, I never tried to use Linux until 2007 or so, with Live CDs).
Off to check the SHA256, burn the USB, and try installing that.
But good grief, nothing in Linux just does one thing, does it? Every reference I've seen for chroot until now it was about what the name seems to imply: changing your root location (useful for working within the new install while still booted on the Live session). That link makes it look like something that's in the same class as installing Linux before there were automatic installers (I'm probably exaggerating, I never tried to use Linux until 2007 or so, with Live CDs).
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
Well, that's interesting (in a "what a revoltin' development" sort of way).
I checked the SHA512 for the netinst you linked, it matches:
f4f7de1665cdcd00b2e526da6876f3e06a37da3549e9f880602f64407f602983a571c142eb0de0eacfc9c1d0f534e9339cdce04eb9daddc6ddfa8cf34853beed
But the installer won't run. It boots up to a GRUB, but whether I choose graphical installer or text installer, it just clears the menu and sits there for many minutes. At present, it's been close to fifteen minutes with the GRUB screen and a smaller echo of the background inside what had been the GRUB window. I'm about to try with the 12.8 KDE Live ISO and see if that works better. I've got the machine set to boot in UEFI first (then try legacy), all other settings same as the last couple years running Kubuntu 22.04.
I checked the SHA512 for the netinst you linked, it matches:
f4f7de1665cdcd00b2e526da6876f3e06a37da3549e9f880602f64407f602983a571c142eb0de0eacfc9c1d0f534e9339cdce04eb9daddc6ddfa8cf34853beed
But the installer won't run. It boots up to a GRUB, but whether I choose graphical installer or text installer, it just clears the menu and sits there for many minutes. At present, it's been close to fifteen minutes with the GRUB screen and a smaller echo of the background inside what had been the GRUB window. I'm about to try with the 12.8 KDE Live ISO and see if that works better. I've got the machine set to boot in UEFI first (then try legacy), all other settings same as the last couple years running Kubuntu 22.04.
- wizard10000
- Global Moderator
- Posts: 1152
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 121 times
- Been thanked: 201 times
Re: After successful-seeming install, boots to grub-rescue CLI??
What program are you using to write the .iso to the flash drive?
we see things not as they are, but as we are.
-- anais nin
-- anais nin
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
I'm using Startup Disk Creator as packaged with Kubuntu 22.04. The menu shortcut points to usb-creator-kde. It has worked for other things in the past, including Boot Repair and a couple other live USB setups.wizard10000 wrote: 2024-11-30 00:05 What program are you using to write the .iso to the flash drive?
BTW, I tried installing from the 12.8 Live KDE -- at least the Calamares installer ran and completed, but the end result is identical to before -- same error message instead of GRUB.
If you're going to tell me to use dd to write the USB key, please give the full command; I'm well aware how easily dd can hose my desktop trying to make a USB for use in installing my laptop.
- wizard10000
- Global Moderator
- Posts: 1152
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 121 times
- Been thanked: 201 times
Re: After successful-seeming install, boots to grub-rescue CLI??
I'm not sure whether startup disk creator is a problem but we've verified a couple different .iso multiple times and it's still not working.
Before we explore the dd thing perhaps try creating the USB with Balena Etcher or Ventoy? I know both of those work.
https://github.com/balena-io/etcher/releases/
Before we explore the dd thing perhaps try creating the USB with Balena Etcher or Ventoy? I know both of those work.
https://github.com/balena-io/etcher/releases/
we see things not as they are, but as we are.
-- anais nin
-- anais nin
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
Balena Etcher 1,19,25 (deb) won't install -- "unable to satisfy dependencies". Either it's too new for a 2 year old install of Kubuntu (with HWE), or it's looking for something that's not in Ubuntu repos (and doesn't tell me what I need to search for and install). The .zip, once extracted, does appear to start, anyway, but I need to go get breakfast. I'll try burning the USB and installing from it after that (couple hours, most likely).
- dilberts_left_nut
- Administrator
- Posts: 5465
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 21 times
- Been thanked: 93 times
Re: After successful-seeming install, boots to grub-rescue CLI??
You just need the bit after "# that was what needs be done only once"
You can also do 'cp debian.iso /dev/sdX' for whatever X your usb is.wizard10000 wrote: 2024-11-30 11:11 I'm not sure whether startup disk creator is a problem but we've verified a couple different .iso multiple times and it's still not working.
Before we explore the dd thing perhaps try creating the USB with Balena Etcher or Ventoy? I know both of those work.
https://github.com/balena-io/etcher/releases/
AdrianTM wrote:There's no hacker in my grandma...
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
I presume I'd need to format the USB key first...dilberts_left_nut wrote: 2024-11-30 13:31You can also do 'cp debian.iso /dev/sdX' for whatever X your usb is.
Anyway, key flashed from Etcher, starting up laptop with that key now. I used the previously SHA512 verified netinst; got the GRUB, selected "Graphical Install". So far, same as last attempt with this installer: hangs after clearing the GRUB menu.
Also, after restarting via power button, same result when selecting "Install" (presumably a text-screen version).
Not sure it matters, but I have Secure Boot disabled in BIOS settings; notes say to enable that I must set UEFI Only and CSM Support: No -- at present, I have both UEFI and Legacy boot enabled, with UEFI first and CSM Support: Yes. It's not clear to me from the notes if Linux would even be permitted with Secure Boot turned on, and I think my hard disk is MBR (it's the original Win10 installation from when I got the machine about nine years ago; I just shrank the Windows partition to make room when I first installed Kubuntu 14.04).
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
Tried enabling Secure Boot (UEFI Only and CSM: No) and look at that, the graphic installer started up. Let's see what I get from this.
Well. The partitioner could be a bit less cryptic (making it look/work like KDE Partition Manager or Gparted would be a big improvement), but I figured out it needs to have me delete a partition that's been used for something else before (which requires some care when I need to reuse the old /home) and it won't let me select a mount point for a partition I'm not reformatting (so I'll have to edit the fstab after installation to get my old /home where it was).
And after installation completed I had to (as I suspected) disable Secure Boot and restore "Both" to the Legacy/UEFI choice, which turned CSM back to YES. And now it's booting into Debian 12.8 KDE Plasma (Wayland)!
Well. The partitioner could be a bit less cryptic (making it look/work like KDE Partition Manager or Gparted would be a big improvement), but I figured out it needs to have me delete a partition that's been used for something else before (which requires some care when I need to reuse the old /home) and it won't let me select a mount point for a partition I'm not reformatting (so I'll have to edit the fstab after installation to get my old /home where it was).
And after installation completed I had to (as I suspected) disable Secure Boot and restore "Both" to the Legacy/UEFI choice, which turned CSM back to YES. And now it's booting into Debian 12.8 KDE Plasma (Wayland)!
- dilberts_left_nut
- Administrator
- Posts: 5465
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 21 times
- Been thanked: 93 times
Re: After successful-seeming install, boots to grub-rescue CLI??
No, you're cp'ing it directly to the block device, not to a filesystem.Silent Observer wrote: 2024-11-30 15:58I presume I'd need to format the USB key first...dilberts_left_nut wrote: 2024-11-30 13:31You can also do 'cp debian.iso /dev/sdX' for whatever X your usb is.
Good news.
The patchy implementation of uefi is certainly not the brave new world it was sold as...
AdrianTM wrote:There's no hacker in my grandma...
-
- Posts: 36
- Joined: 2024-09-01 12:59
Re: After successful-seeming install, boots to grub-rescue CLI??
You can say that again. Now I just have to get everything working in the new install, so I'll know what I'm doing before I do my desktop machine (which has several times as much 3rd party software installed, 5 KDE activities, and so on), which I can't have out of service for four or five days (my last 4-day weekend of the year is 3/4 over, won't have another one until Memorial Day unless I spend more than one vacation day). At least the desktop doesn't need to be able to boot both Windows and Debian; it's been Linux only since 2014. I only kept Windows on the laptop because it was installed and working when I got the machine. Still worked last time I used it, but it probably needs multiple days of updates and will nag me that it's EOL in less than a year and I should replace the machine so I can install Win11...dilberts_left_nut wrote: 2024-11-30 20:56The patchy implementation of uefi is certainly not the brave new world it was sold as...