LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 09-26-2019, 10:44 AM   #46
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0

Quote:
Originally Posted by Ser Olmy View Post
Oh, I see; the drive we've been dealing with all this time is actually the 8 Gb USB stick you've been using to boot the system. And of course this is using EFI.

No wonder the LVM subsystem found no volumes; all this time we've been barking up the wrong tree. No worries, we'll just have to take a step back and try again.

The first question is: Where are your drives? It seems really odd that a CentOS-based rescue system would be unable to detect an AHCI disk controller.

See what the kernel log has to say about disk controllers and drives, and post the results: dmesg | grep "ata\|scsi"

Every supported disk controller is registered as a scsi controller, and there vill be a message saying something like "scsi host0: Fusion MPT SAS Host" (the last part will identify your actual hardware). Then there will be an "atax.yy" entry for every detected SATA drive, something like this: "ata2.00: ATA-8: HGST HTS721010A9E630, JB0OA3J0, max UDMA/133".

Also post the output from lspci as it will show the actual hardware present in your server. It should then be pretty straightforward to identify the disk controller and figure out what we have to do to load the requisite modules and have the drives show up.
Remember, it does say that I have no Linux partitions, right before I get into the shell. It reports (nothing to fix).

dmesg:
Firmware bug TSC_Deadline disabled...
Memory...
Write protecting hte kernel read-only data:12288k
iscsi: registered transport (tcp)
scsi host0: usb-storage 3-1:1.0
libata version 3.00 loaded
scsi 0:0:0:0: Direct-Access A-Data USB Flash Drive 0.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] Asking for cache data failed
EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
sd 0:0:0:0: Attached scsi generic sg0 type 0

Maybe this takes us back to the UEFI settings? Seems nothing is visible at all. I have two SSD's in there, one has the OS on it, the other is a storage unit that's linked to /home/backups as a share point.
 
Old 09-26-2019, 10:50 AM   #47
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
The internal drive isn't showing up. Either the drive died or a setting in the bios is wrong. Do you have an option in bios settings to restore defaults? If so, recommend trying that
OK I'm back into the UEFI (what I call BIOS) now. I loaded UEFI defaults and restarted.

OK, now we're making progress. I can chroot /mnt/sysimage now. Done.
 
Old 09-26-2019, 10:53 AM   #48
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
Quote:
Originally Posted by BeeRich View Post
Maybe this takes us back to the UEFI settings?
Actually it doesn't, because the UEFI/legacy setting doesn't affect how the disk controller is being presented to the system via the PCIe bus. (The "IDE / AHCI" settings discussed earlier does have an effect on this, though.)
Quote:
Originally Posted by BeeRich View Post
Seems nothing is visible at all. I have two SSD's in there, one has the OS on it, the other is a storage unit that's linked to /home/backups as a share point.
And the controller these drives are attached to should be visible somewhere.

What about the output from lspci?
 
Old 09-26-2019, 10:54 AM   #49
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Ser Olmy View Post
Actually it doesn't, because the UEFI/legacy setting doesn't affect how the disk controller is being presented to the system via the PCIe bus. (The "IDE / AHCI" settings discussed earlier does have an effect on this, though.)

And the controller these drives are attached to should be visible somewhere.

What about the output from lspci?
Sorry, resetting the UEFI defaults brought back the drives.
 
Old 09-26-2019, 10:57 AM   #50
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
Quote:
Originally Posted by BeeRich View Post
Sorry, resetting the UEFI defaults brought back the drives.
That's good news!

mount should now display the LVM volume being mounted as / with another partition (probably /dev/sda2) mounted as /boot.
 
Old 09-26-2019, 11:00 AM   #51
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,369

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Now that your drives are back post the output parted - l
 
Old 09-26-2019, 11:01 AM   #52
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Ser Olmy View Post
That's good news!

mount should now display the LVM volume being mounted as / with another partition (probably /dev/sda2) mounted as /boot.
/dev/mapper/centos-root on /
/dev/sda2 on /boot
/dev/sda1 on /boot/efi

OK, so are we back to the boot stuff with grub?
 
Old 09-26-2019, 11:11 AM   #53
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
Now that your drives are back post the output parted - l
Uh, that will take some time to type out. I can't export that text somehow, can I? Is there something that you want to see specifically?

/dev/sda is 120GB
Partition Table: gpt, no flags
 
Old 09-26-2019, 11:19 AM   #54
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
Quote:
Originally Posted by BeeRich View Post
/dev/mapper/centos-root on /
/dev/sda2 on /boot
/dev/sda1 on /boot/efi

OK, so are we back to the boot stuff with grub?
Indeed. This is actually going rather well.

Try (re)installing the grub EFI modules (as described by this post earlier in the thread).
 
Old 09-26-2019, 11:25 AM   #55
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Ser Olmy View Post
Indeed. This is actually going rather well.

Try (re)installing the grub EFI modules (as described by this post earlier in the thread).
Fat lady is at lunch, so no singing yet. Heh.

OK, did this:

yum -y reinstall grub2-tools grub2-efi shim grub2-efi-modules grub2-efi-x64-modules
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg


Got this:

Generating grub conf file...
Script `/boot/efi/EFI/centos/grub.cfg.new' contains no commands and will do nothing
Syntax errors are detected in generated GRUB config file
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report...


I had a look at a previous grub file and it was long, not some tiny .conf setup. Now this install is on the rescue image, correct?

I have to jump out to lunch for 30 min or so. Back at it after.
 
Old 09-26-2019, 11:38 AM   #56
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,369

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
without the usb plugged in, when you first boot, what key you press to get the option to select the usb, is there an option to select an efi file to boot from?
 
Old 09-26-2019, 11:56 AM   #57
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
without the usb plugged in, when you first boot, what key you press to get the option to select the usb, is there an option to select an efi file to boot from?
Nothing. I always have that USB drive for the rescue OS. Otherwise it says Reboot and Select Proper Boot device or Insert Boot Media in selected Boot device and press a key
 
Old 09-26-2019, 01:24 PM   #58
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Actually, there are two grub files in that directory from a year ago. Can I reuse one of those?

/boot/efi/EFI/centos
total 6908
-rwx------. 1 root root 134 Feb 22 2019 BOOT.CSV
-rwx------. 1 root root 134 Feb 22 2019 BOOTX64.CSV
drwx------. 2 root root 4096 Sep 25 08:59 fonts
-rwx------. 1 root root 7622 Sep 25 07:59 grubARCHIVE.cfg
-rwx------. 1 root root 7735 Sep 25 08:40 grub.cfg
-rwx------. 1 root root 5919 Sep 28 2018 grub.cfg.1545302006.rpmsave
-rwx------. 1 root root 7622 Aug 20 13:17 grub.cfg.1569254432.rpmsave
-rwx------. 1 root root 151 Sep 26 12:18 grub.cfg.new
-rwx------. 1 root root 1024 Sep 23 12:02 grubenv
-rwx------. 1 root root 1090976 Aug 8 07:31 grubx64.efi
-rwx------. 1 root root 1151864 Feb 22 2019 mmx64.efi
-rwx------. 1 root root 1151864 Feb 22 2019 MokManager.efi
-rwx------. 1 root root 1205248 Feb 22 2019 shim.efi
-rwx------. 1 root root 1198984 Feb 22 2019 shimx64-centos.efi
-rwx------. 1 root root 1205248 Feb 22 2019 shimx64.efi
 
Old 09-26-2019, 01:41 PM   #59
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
Quote:
Originally Posted by BeeRich View Post
Actually, there are two grub files in that directory from a year ago. Can I reuse one of those?
Possibly, as long as the kernel/initrd files they point to are still present on the system.

And if none of them work, one of them can surely be edited to match whatever currently exists in the /boot directory. After all, at one point, probably prior to an update, they did work with your system.

Keep in mind, though, that these files were autogenerated, and as such are bound to contain tons of superfluous fluff, even though a working grub.cfg only needs to contain less than ten lines of text per kernel image.
 
Old 09-26-2019, 01:53 PM   #60
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Ser Olmy View Post
Possibly, as long as the kernel/initrd files they point to are still present on the system.

And if none of them work, one of them can surely be edited to match whatever currently exists in the /boot directory. After all, at one point, probably prior to an update, they did work with your system.

Keep in mind, though, that these files were autogenerated, and as such are bound to contain tons of superfluous fluff, even though a working grub.cfg only needs to contain less than ten lines of text per kernel image.
OK, that didn't work. Replaced it with the latest .rpmsave file. You say one can be generated to match whatever is in /boot. Not sure what you mean by that.
 
  


Reply

Tags
boot loader, centos7, grub2



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any problem if I install CENTOS7 Workstation over CENTOS7 Server? Rich Strebendt Linux - Software 5 05-03-2018 11:05 PM
How to update GRUB2 for dual boot centos7/Ubuntu 14.04.. crocodilehunter Linux - Laptop and Netbook 3 03-19-2016 04:51 PM
dual boot error (UEFI secure boot restricting installing centos7 over windows8) praduman1417 Linux - Newbie 3 12-24-2015 08:55 AM
kcm-grub2 - No valid GRUB2/BURG installation could be detected cristi92b Linux - Newbie 2 06-14-2012 08:01 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 05:05 AM.

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