LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Boot Problems (https://www.linuxquestions.org/questions/centos-111/boot-problems-4175661877/)

BeeRich 10-02-2019 10:57 AM

Boot Problems
 
Hi folks. Moved on from other threads where I migrated my CentOS7 to another SSD. I'm having some boot issues which is booting into emergency mode for some reason.

I've taken out all extra drives (backups, etc.) and just have my boot volume in there, which is /dev/sda. Even with /etc/fstab volumes in there, this boot process is taking some time, up over a minute, and into emergency mode.

Code:

$ journalctl -xb
tmpfs: Bad mount option huge
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled
...
Timed out waiting for device <../../dm-2>
...
Timed out waiting for device dev-sdc.device
...
Failed to start Security Auditing Service
...

Usually it boots almost instantly, and now it is quite slow, with a problematic boot into emergency mode.

How can I fix this? Where should I start looking? Drives plugged in or not, same issue.

business_kid 10-02-2019 01:46 PM

If booting is the issue, that's before any logging. Why not talk to us about grub, or whatever RH is booting with these days?

colorpurple21859 10-02-2019 02:11 PM

I think it is a continuation of this thead https://www.linuxquestions.org/quest...ve-4175661696/ which is a continuation of this thread
https://www.linuxquestions.org/quest...de-4175661645/ after the original booting problem was fixed in this thread https://www.linuxquestions.org/quest...or-4175661425/

BeeRich 10-02-2019 07:02 PM

Quote:

Originally Posted by colorpurple21859 (Post 6042969)
I think it is a continuation of this thead https://www.linuxquestions.org/quest...ve-4175661696/ which is a continuation of this thread
https://www.linuxquestions.org/quest...de-4175661645/ after the original booting problem was fixed in this thread https://www.linuxquestions.org/quest...or-4175661425/

Oh indeed it is. Booting was fixed on the old volume (why the BIOS would screw with volumes, is very strange), but I am trying to migrate a system to a new volume. Apparently that is not heard of, or was spoken about 8 years ago, according to the things I'm finding.

It boots to the new drive, but it boots into emergency mode. I've read that the logs are where the problems are noted, so that's where I went. I copied a volume that works, then booting up on the new volume, everything is moved around. I've changed the /etc/fstab file and it's all a mess. I've watched countless videos on all this, read up on many sites, pdfs, and I have no clue what's wrong, nor how /etc/fstab doesn't mention a volume I have, yet it's not posing any problems.

As to business_kid's question, what is it you want to know about grub? It seems like a dynamic script from what I see. If you expect hard entries, I've never seen anything like that in the old (current boot) volume, nor the new one. I thought grub would know about the OS versions that got copied over. I guess that was an oversight on my part. Should I just install grub that was installed on the original? Did the rsync not copy that over?

I'm new to this OS. I didn't know such simple processes would have little reference online. That's why I'm in here asking questions.

BeeRich 10-02-2019 07:05 PM

Quote:

Originally Posted by business_kid (Post 6042959)
If booting is the issue, that's before any logging. Why not talk to us about grub, or whatever RH is booting with these days?

I have absolutely no clue what RH is booting with these days. That's why I'm on LinuxQuestions.org. I copied a full boot volume from a resurrected volume that boots fine. I changed the UEFI (BIOS, whatever you want to call it), and it boots into emergency mode. I don't know why. There is no grubquestions.org. Heh.

berndbausch 10-02-2019 07:15 PM

Perhaps we can say more when we see your /etc/fstab. This is a guess: Your computer seems to go to emergency mode because /dev/sdc is in fstab but can't be found. If that is correct, consider using the filesystem's UUID instead of the device file name.

As an initial workaround, you can also add nofail to the mount options in fstab to ignore such errors.

You may find additional information in the kernel message buffer (dmesg command). Look for storage-related messages.

The lsblk command and the /sys/block directory tell you the list of storage devices as the kernel sees them. A look at this list might clue you in as well.

business_kid 10-03-2019 03:39 AM

Quote:

Originally Posted by BeerRich
There is no grubquestions.org. Heh.

Was that a joke? :-o.
No grubquestions.org, but you are presenting a booting problem without giving us your boot configuration. I was asking to see your /etc/lilo.conf, or /boot/grub/grub.cfg.

If your distro uses UUIDS, we will also need the output of
Code:

ls -l /dev/disk/by-uuid

hazel 10-03-2019 06:38 AM

Quote:

Originally Posted by BeeRich (Post 6043056)

As to business_kid's question, what is it you want to know about grub? It seems like a dynamic script from what I see. If you expect hard entries, I've never seen anything like that in the old (current boot) volume, nor the new one. I thought grub would know about the OS versions that got copied over. I guess that was an oversight on my part. Should I just install grub that was installed on the original? Did the rsync not copy that over?

GRUB doesn't know anything about your OS versions until you run the update-grub script (which you must do as root). Then the ancillary scripts should sniff out your systems and create a proper grub.cfg file in the /boot directory. This is used by the actual GRUB program to create a menu dynamically at boot time.

I think it is grub.cfg that Business_kid would like to see.

BeeRich 10-03-2019 07:13 AM

Quote:

Originally Posted by hazel (Post 6043313)
GRUB doesn't know anything about your OS versions until you run the update-grub script (which you must do as root). Then the ancillary scripts should sniff out your systems and create a proper grub.cfg file in the /boot directory. This is used by the actual GRUB program to create a menu dynamically at boot time.

I think it is grub.cfg that Business_kid would like to see.

OK, I'm going to try that and post all the info about volumes later on. I've not tripped over update-grub yet.

colorpurple21859 10-03-2019 10:21 AM

I don't think centos uses update-grub to generate a grub.cfg, uses
Code:

grub-mkconfig -o <some location>
to generate grub.cfg

hazel 10-03-2019 10:30 AM

Actually all distros use grub-mkconfig. update-grub is just a wrapper which installs the generated file in its proper place.

colorpurple21859 10-03-2019 10:41 AM

Quote:

Actually all distros use grub-mkconfig. update-grub is just a wrapper which installs the generated file in its proper place.
That is true, I think update-grub is a ubuntu/Debian based thingy.

BeeRich 10-04-2019 02:49 PM

Quote:

Originally Posted by business_kid (Post 6043254)
Was that a joke? :-o.
No grubquestions.org, but you are presenting a booting problem without giving us your boot configuration. I was asking to see your /etc/lilo.conf, or /boot/grub/grub.cfg.

If your distro uses UUIDS, we will also need the output of
Code:

ls -l /dev/disk/by-uuid

OK, here are the reports. First, with sdb plugged in and everything running as it should without sdb wanted/needed.

Code:

$ lsblk
NAME                MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                    8:0    0 111.8G  0 disk
├─sda1                8:1    0  200M  0 part /boot/efi
├─sda2                8:2    0    1G  0 part /boot
└─sda3                8:3    0 110.6G  0 part
  ├─centos-root      253:0    0    50G  0 lvm  /
  ├─centos-swap      253:1    0  7.7G  0 lvm  [SWAP]
  └─centos-home      253:3    0  52.9G  0 lvm  /home
sdb                    8:16  0 111.8G  0 disk
└─shadowneb-shadow_n 253:2    0  110G  0 lvm  /home/backups
sdc                    8:32  0 232.9G  0 disk

$ cat /etc/fstab                                                # WITH sdb installed
# /etc/fstab
# Created by anaconda on Mon Sep 10 16:27:03 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

/dev/mapper/centos-root /                      xfs    defaults        0 0
/dev/sda2                /boot                  xfs    defaults        0 0
/dev/sda1                /boot/efi              vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/centos-home /home                  xfs    defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0

# RF mods for /dev/sdb backup disk:
UUID=4fba19c4-01e1-4afd-b541-2682b80983cd /home/backups ext4 defaults        0 0

$ ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Oct  2 11:55 04fde641-f537-49b4-a617-451e4325c92c -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct  2 11:55 0a7ca014-5aff-419d-b393-5e5cac26f182 -> ../../dm-3
lrwxrwxrwx 1 root root 10 Oct  2 11:55 33669fd2-6177-4f9e-a06c-e9c9d9270f2d -> ../../dm-1
lrwxrwxrwx 1 root root 10 Oct  2 11:55 3979-7E7E -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  2 11:55 4fba19c4-01e1-4afd-b541-2682b80983cd -> ../../dm-2
lrwxrwxrwx 1 root root 10 Oct  2 11:55 bde0e85d-4653-451c-a6a5-8222fc3825ee -> ../../dm-0
lrwxrwxrwx 1 root root  9 Oct  2 11:55 f2450034-7cd0-459a-aa6b-49ce4d45bcde -> ../../sdc

Booted up without sdb installed, into emergency mode with no network. That last feedback is what changes when I take the sdb out:

Code:

NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda              8:0    0 111.8G  0 disk
├─sda1            8:1    0  200M  0 part /boot/efi
├─sda2            8:2    0    1G  0 part /boot
└─sda3            8:3    0 110.6G  0 part
  ├─centos-root 253:0    0    50G  0 lvm  /
  ├─centos-swap 253:1    0  7.7G  0 lvm  [SWAP]
  └─centos-home 253:2    0  52.9G  0 lvm  /home
sdb              8:16  0 232.9G  0 disk


# /etc/fstab
# Created by anaconda on Mon Sep 10 16:27:03 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

/dev/mapper/centos-root /                      xfs    defaults        0 0
/dev/sda2                /boot                  xfs    defaults        0 0
/dev/sda1                /boot/efi              vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/centos-home /home                  xfs    defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0

# RF mods for /dev/sdb backup disk:
UUID=4fba19c4-01e1-4afd-b541-2682b80983cd /home/backups ext4 defaults        0 0

total 0
lrwxrwxrwx 1 root root 10 Oct  4 15:30 04fde641-f537-49b4-a617-451e4325c92c -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct  4 15:30 0a7ca014-5aff-419d-b393-5e5cac26f182 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Oct  4 15:30 33669fd2-6177-4f9e-a06c-e9c9d9270f2d -> ../../dm-1
lrwxrwxrwx 1 root root 10 Oct  4 15:30 3979-7E7E -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  4 15:30 bde0e85d-4653-451c-a6a5-8222fc3825ee -> ../../dm-0
lrwxrwxrwx 1 root root  9 Oct  4 15:30 f2450034-7cd0-459a-aa6b-49ce4d45bcde -> ../../sdb

I'm thinking the /home/backups is not in the second version at all, but I don't know how the system got that entry. Anyway, I think a redo of the grub.cfg. Should I post both grub files?

BeeRich 10-04-2019 03:21 PM

Both shorter versions of /boot/grub2/grub.cfg, first with drive installed, second without:

Code:

sudo grep menuentry /boot/grub2/grub.cfg
if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
  menuentry_id_option=""
export menuentry_id_option
menuentry 'CentOS Linux (3.10.0-1062.1.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1062.1.1.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.27.2.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.21.3.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.21.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.21.2.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.12.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.12.2.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (0-rescue-9153e7856d4d46ebaa8964a718ba2ce2) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-9153e7856d4d46ebaa8964a718ba2ce2-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {

Without:
Code:

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
  menuentry_id_option=""
export menuentry_id_option
menuentry 'CentOS Linux (3.10.0-1062.1.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1062.1.1.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.27.2.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.21.3.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.21.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.21.2.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (3.10.0-957.12.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.12.2.el7.x86_64-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {
menuentry 'CentOS Linux (0-rescue-9153e7856d4d46ebaa8964a718ba2ce2) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-9153e7856d4d46ebaa8964a718ba2ce2-advanced-bde0e85d-4653-451c-a6a5-8222fc3825ee' {


jsbjsb001 10-05-2019 06:07 AM

Quote:

Originally Posted by colorpurple21859 (Post 6043416)
That is true, I think update-grub is a ubuntu/Debian based thingy.

As far as I know it is, CentOS doesn't use update-grub, it only uses grub-mkconfig


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