CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
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.
What about /dev/sda3? Is should show up as an LVM partition.
UEFI vs. legacy is a matter of personal preference. I see no advantages to using UEFI (and a few disadvantages), so I always go with Legacy.
However, I'd highly recommend using GPT instead of MBR. It has superior multi-partition support compared to MBR, and supports partitions larger than 2 Tb and drives larger than 4 Tb.
This is a server. It has 120 GB drives which are overkill.
Like I said, I can't chroot /mnt/sysimage because:
'/bin/bash': No such file or directory
The root fs on this server resides inside an LVM volume.
When you're in the rescue environment, is LVM even activated? What does ls /dev/mapper/ show?
What's the output of pvdisplay, vgdisplay, and lvdisplay?
It seems /mnt/sysimage is supposed to contain a mounted filesystem representing the root fs of the server. Is that the case? If not, then it's no wonder you can't chroot into it.
That's easily fixed, though: You just have to activate the volume group, mount the root fs to /mnt/sysimage, mount /dev/sda2 (the boot partition) to the now available directory /mnt/sysimage/boot, then chroot into /mnt/sysimage and finally mount /sys and /proc manually.
Yes, like I've been saying, upon loading the rescue OS, it can't see any image to repair. "No Linux partitions" All that grub2 work killed things that rendered this a bunch of files instead of a recognizable OS.
So you say I have to:
- activate the volume group
- mount the root fs to /mnt/sysimage
- mount /dev/sda2 boot partition to the directory /mnt/sysimage/boot
- chroot into /mnt/sysimage
- mount /sys
- mount/proc
I have no idea how to do any of those. So not easily fixed. Resetting the CMOS to get back into the BIOS was a bit much if you ask me.
If nothing happens, try running pvscan and then vgscan, then try again.
Quote:
Originally Posted by BeeRich
- mount the root fs to /mnt/sysimage
mount /dev/mapper/<something-or-other>centos-root /mnt/sysimage
Not exactly sure what the full name of the activated volume will be (except it will contain "centos-root") since I don't know the name of the Volume Group, but ls /dev/mapper/ should display it.
Quote:
Originally Posted by BeeRich
- mount /dev/sda2 boot partition to the directory /mnt/sysimage/boot
mount /dev/sda2 /mnt/sysimage/boot
Quote:
Originally Posted by BeeRich
- chroot into /mnt/sysimage
chroot /mnt/sysimage
Quote:
Originally Posted by BeeRich
- mount /sys
- mount/proc
mount -t proc proc /proc
mount -t sysfs sysfs /sys
- Nothing happened
- No matching physical volume found (pvscan)
- Reading volume groups from cache (vgscan)
Then nothing again, both without and with that last parameter.
"Nothing" may be OK, but the "no matching physical volume" message definitely isn't something I'd expect to see on a system using LVM.
If LVM is active, there should be links in /dev/mapper to the various volumes, but if LVM can't activate the volume group(s), the directory will only contain the character device "control". What does ls /dev/mapper/ show?
Is /dev/sda3 present, and is it an LVM partition? Please post the output from fdisk -l /dev/sda.
"Nothing" may be OK, but the "no matching physical volume" message definitely isn't something I'd expect to see on a system using LVM.
If LVM is active, there should be links in /dev/mapper to the various volumes, but if LVM can't activate the volume group(s), the directory will only contain the character device "control". What does ls /dev/mapper/ show?
Is /dev/sda3 present, and is it an LVM partition? Please post the output from fdisk -l /dev/sda.
ls /dev/mapper:
control
live-base
live-rw
/dev/sda3 is nor present, just sda1 (boot), and sda2 (EFI)
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.