LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 07-04-2022, 08:06 AM   #1
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Rep: Reputation: 15
grub-rescue flashes then grub menu


I am running Slackware current with a 5.18.7 kernel. The motherboard it was running on has been switched, and because I was presented with a grub-rescue prompt (only after the motherboard switch, worked perfect prior to this) I chose to reinstall. Now what is happening is the grub-rescue prompt it displayed on the screen for a second or 2 and then the normal grub menu shows up and boots properly. I can't figure out how to fix this for the main drive was formatted and partitioned during install. It has 2 partitions on it a 4GB swap and the remainder of the 2TB drive for /. The second drive is also a 2TB drive both same make and model and has 1 partition on it /home which was not formatted during install, so all the files and so forth remain intact after the user is re-added. I should mention I am using grub version 2.06. Any help on this would be greatly appreciated.
 
Old 07-04-2022, 01:11 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,503

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Is this an EFI install? If so, you should also have a 2-500MB FAT32 partition. If it is EFI, can you select Slackware from the Boot Option in the BIOS firmware? If so, do you get the same problem? Never seen a problem like this before.
 
Old 07-05-2022, 06:28 PM   #3
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Original Poster
Rep: Reputation: 15
It did not prompt me to make an EFI partition during the reinstall, the old install did which was on the same drive, but I removed all partitions before creating the new one and all partitions (2) swap and / were formatted on the first drive. Reminance of the original install maybe?
 
Old 07-05-2022, 06:52 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
post the ouput of the following
Code:
cat /sys/firmware/efi
cat /etc/fstab
sudo parted -l
 
Old 07-05-2022, 09:18 PM   #5
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
(krazy@krazy.lan)-(~)(:#-)> cat /sys/firmware/efi
cat: /sys/firmware/efi: No such file or directory
/sys/firmware has acpi dmi & memmap in it
Quote:
(krazy@krazy.lan)-(~)(:#-)> cat /etc/fstab
/dev/sda1 swap swap defaults 0 0
/dev/sda2 / ext4 defaults 1 1
/dev/sdb1 /home ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0
Quote:
(krazy@krazy.lan)-(~)(:#-)> sudo parted -l
Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 4296MB 4295MB primary linux-swap(v1) swap
2 4296MB 2000GB 1996GB primary ext4


Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 2000GB 2000GB primary ext4
 
Old 07-06-2022, 04:02 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,503

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
The information in your last post shows you have a Legacy install rather than an EFI install. You have large drives but they both show as msdos partition table rather than GPT which would be expected on those size drives. Was this intentional? You indicate in your second post that you previous install had an EFI partition which you no longer have? I don't know that this is the source of your problem though.
 
Old 07-06-2022, 06:26 AM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
A uefi system will initially look for a bootloader at EFI/Boot/bootx64.efi on the efi partition if there are no nvram values. I suspect you had this file on the efi partition, was a renamed grubx64.efi file with the grub prefix set to a bad location causing the grubrescue error when the new mother board was installed. It may be possible that the remnants of the fat32 file system and the bootx64.efi file may still exist on what is now the swap partition, and the firmware/bios is picking it up while switching over to legacy mode. Note this is all conjecture and guess work.

Last edited by colorpurple21859; 07-06-2022 at 06:27 AM.
 
Old 07-06-2022, 08:28 PM   #8
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by yancek View Post
The information in your last post shows you have a Legacy install rather than an EFI install. You have large drives but they both show as msdos partition table rather than GPT which would be expected on those size drives. Was this intentional?
I have always have done the slackware default install
Quote:
Originally Posted by yancek View Post
You indicate in your second post that you previous install had an EFI partition which you no longer have? I don't know that this is the source of your problem though.
Yes my previous install had an EFI partition for the slackware install installed elilo. On the second install I did not install lilo i did the grub for I always install lilo then grub then remove lilo, this time i didnt install lilo and just installed grub.
 
Old 07-10-2022, 11:42 AM   #9
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Original Poster
Rep: Reputation: 15
Is there a way to fix this even if i have to do an install from from scratch from the Slackware 15 DVD and do something different when I prep the drives, even if I have to backup everything I have configured as well as second drive to a usb stick and partition and format both drives. For instance change partition table from msdos to GPT or partition with a EFI partition. Would just rather not waste time doing this and have same result would rather do it and have positive results.
 
Old 07-10-2022, 03:54 PM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Depending on how the uefi firmware is implemented this may work, and can be done from the running system:
create a 250M efi partition formatted as fat32 by reducing swap partition space. Create a /boot/efi and mount the efi partition to /boot/efi
Code:
grub-install --target=x86_64-efi --removable
Should be able to converted sda to gpt with gdisk without any problems.
To convert sdb to gpt may have to shrink the partition a small amount to allow for a gpt partition table at end of disk.

Last edited by colorpurple21859; 07-10-2022 at 03:56 PM.
 
Old 07-10-2022, 05:00 PM   #11
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Original Poster
Rep: Reputation: 15
I will try that in the morning, for it is not something i would like to do while connected remotely. Playing around with partitions is out of comfort zone on a running system, but will try it in the morning, I have between now and then to back everything up to a usb stick, then if something happens I loose nothing. Will post back my progress.
 
Old 07-10-2022, 05:06 PM   #12
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Original Poster
Rep: Reputation: 15
Tried running gdisk on /dev/sda remotely and got the following. Makes me think it be safer to back up both drives and do everything from scratch.

Code:
GPT fdisk (gdisk) version 1.0.9

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

Warning! Unable to generate a proper UUID! Creating an improper one as a last
resort! Windows 7 may crash if you save this partition table!
Warning! Unable to generate a proper UUID! Creating an improper one as a last
resort! Windows 7 may crash if you save this partition table!
Warning! Unable to generate a proper UUID! Creating an improper one as a last
resort! Windows 7 may crash if you save this partition table!

Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help):
 
Old 07-10-2022, 10:39 PM   #13
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,808
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Three different methods I can think of to make the UEFI BIOS forget what the original UEFI installation planted in NVRAM:
  • Boot installation media in UEFI mode; use efibootmgr to delete the existing UEFI entry
  • UEFI BIOS reset
  • Enter UEFI BIOS, find the entry(s) for UEFI on the first HD's former system partition, delete it
Disk size is a non-issue. 2TB (2000*10^9) disks are fully supported by legacy/MBR partitioning, as it is 2TiB (512*2^32) that is the maximum supported by legacy/MBR partitioning. 2TB disks are approximately 1.819TiB.

Last edited by mrmazda; 07-10-2022 at 10:40 PM.
 
Old 07-11-2022, 07:58 PM   #14
KrazyKanuk
Member
 
Registered: Sep 2007
Location: St. Catharines, Ontario
Distribution: Slackware 15/64 bit
Posts: 139

Original Poster
Rep: Reputation: 15
I did a reinstall and something flashes before the lilo menu, don't think it the grub2 rescue, but can't be sure. I will mark this solved and when i upgrade to current and install grub2 if it reappears I will come back and try mrmazda's BIOS suggestions. Thank you in for all your comments and suggestions it is greatly appreciated.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [Slackware Current] Cinnamon flashes my wallpaper first, then finishes loading with a black screen with desktop icons and a cursor TheAestheticFur Slackware 13 03-05-2022 09:37 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
NX Client suddenly won't open. It just flashes for one second then closes. xmrkite Linux - Software 3 12-31-2009 10:15 AM
Red Hat Linux 7.1 et startup...it flashes then closes ryanafleming Linux - Games 1 05-07-2006 02:04 AM
new install flashes.. tryin to start x.. then goes to console! hack0r Mandriva 2 09-20-2003 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration