LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   14.2 install goes normally, but will not reboot, gives grub command line instead (https://www.linuxquestions.org/questions/slackware-installation-40/14-2-install-goes-normally-but-will-not-reboot-gives-grub-command-line-instead-4175692274/)

colorpurple21859 03-23-2021 06:49 PM

Did you run
Code:

mount --bind /dev /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/dev
and the same for /proc, /sys, and /run before chrooting into slackware? After chroot run
Code:

sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14
to get a good starting initrd.gz. If it still doesn't boot you may have to add more modules to the mkinitrd command.

porphyry5 03-24-2021 03:03 PM

Quote:

Originally Posted by colorpurple21859 (Post 6233443)
Did you run
Code:

mount --bind /dev /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/dev
and the same for /proc, /sys, and /run before chrooting into slackware? After chroot run
Code:

sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14
to get a good starting initrd.gz. If it still doesn't boot you may have to add more modules to the mkinitrd command.

I didn't, spent quite some time trying to figure that out, because there are examples both ways on the net, but nowhere explained why it was one way or the other, so decided it had to depend on whether the chrooted fs was already mounted, which is what applied in my case. In any case, the result does not boot.
But now,
Code:

~ $ sudo mount --bind /dev /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/dev
[sudo] password for q:
~ $ sudo mount --bind /proc /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/proc
~ $ sudo mount --bind /sys /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/sys
~ $ sudo mount --bind /run /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/run
~ $ sudo chroot /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f
/ # sudo sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:

mkinitrd -c -k 4.4.14 -f ext4 -r /dev/mmcblk0p2 -m usb-storage:xhci-hcd:mmc_core:sdhci:sdhci-pci:xhci-pci:ohci-pci:ehci-pci:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
/ # mkinitrd -c -k 4.4.14 -f ext4 -r /dev/mmcblk0p2 -m usb-storage:xhci-hcd:mmc_core:sdhci:sdhci-pci:xhci-pci:ohci-pci:ehci-pci:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
OK: /lib/modules/4.4.14/kernel/drivers/usb/storage/usb-storage.ko added.
OK: /lib/modules/4.4.14/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/4.4.14/kernel/drivers/mmc/core/mmc_core.ko added.
OK: /lib/modules/4.4.14/kernel/drivers/mmc/core/mmc_core.ko added.
  60-odd similar lines elided
OK: /lib/modules/4.4.14/kernel/fs/ext4/ext4.ko added.
38703 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
/ #

seems much more agreeable than yesterday. But concerning the last line, run lilo again. Not lilo, but elilo was run on the original install, which command does not exist in this slackware fs, so no need to run it again?

But as both systems have versions of /boot/grub/grub.cfg decided to update grub, 1st on the lubuntu system which produced no change at all in its grub.cfg. Then on the slackware fs I got
Code:

/media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f $  sudo mount --bind /dev /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/dev
/media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f $ sudo mount --bind /proc /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/proc
/media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f $  sudo mount --bind /sys /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/sys
/media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f $ sudo mount --bind /run /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/run
/media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f $  sudo chroot /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f
/ # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-huge-4.4.14
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-huge
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-generic-4.4.14
Found initrd image: /boot/initrd.gz
Found linux image: /boot/vmlinuz-generic
Found initrd image: /boot/initrd.gz
done
/ # exit

This has produced a much improved grub.cfg, but with no ubuntu entries at all. So now I'll see what happens with a normal boot.

colorpurple21859 03-24-2021 03:56 PM

What are you using for the primary boot loader?

porphyry5 03-24-2021 05:36 PM

Quote:

Originally Posted by colorpurple21859 (Post 6233793)
What are you using for the primary boot loader?

As far as I know, grub is the only boot loader on both systems, but I've now got the lubuntu grub.cfg to find slackware properly by adding
Code:

GRUB_DISABLE_OS_PROBER=false
to lubuntu's /etc/default/grub and rerunning grub-mkconfig.

At the boot menu selecting Slackware now runs far longer before crashing, right after processing usb sticks. So I think now I'll follow your earlier recommendation to update kernel and packages.

colorpurple21859 03-25-2021 06:24 AM

Did you try all the menu entries for slackware? What are the last few lines before it stops?

porphyry5 03-26-2021 02:35 PM

Quote:

Originally Posted by colorpurple21859 (Post 6233988)
Did you try all the menu entries for slackware? What are the last few lines before it stops?

With my HD, which is actually a 256gb usb stick, plugged into a 3.2 port, it stops at Kernel Panic, no menu.
With no external devices, it stops at command line, in something called BusyBox, which I didn't investigate, needing to look it up on the web to find how it works.

Trying to update existing packages not going well. Not understanding why can't find libaudit file in chroot when file exists and lib directory is mounted.
Code:

~ $ sudo mount --bind /usr /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/usr
~ $ sudo mount --bind /lib /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/lib
~ $ sudo chroot /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f
/ #  sudo slackpkg update gpg
sudo: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such file or directory
/ # exit
~ $ cd /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f
/media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f $ sudo find . -iname '*libaudit*'
[sudo] password for q:
./lib/x86_64-linux-gnu/libaudit.so.1
./lib/x86_64-linux-gnu/libaudit.so.1.0.0
./usr/share/doc/libaudit1
./usr/share/doc/libaudit-common
./usr/share/man/man5/libaudit.conf.5.gz
/media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f $


colorpurple21859 03-26-2021 05:11 PM

Quote:

sudo mount --bind /usr /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/usr
~ $ sudo mount --bind /lib /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/lib
This is wrong, the only directories that you mount bind before chroot is /dev /proc /sys /run. Those directories normally will be empty if mounted and viewed from another distro/live iso.

porphyry5 03-26-2021 07:02 PM

Quote:

Originally Posted by colorpurple21859 (Post 6234509)
This is wrong, the only directories that you mount bind before chroot is /dev /proc /sys /run. Those directories normally will be empty if mounted and viewed from another distro/live iso.

Yes, that made a great difference, if only to show me that I can have internet access only through lubuntu. So now I'm thinking download the latest packages through lubuntu and then using removepkg and installpkg. Is this feasible?

colorpurple21859 03-26-2021 07:29 PM

Quote:

if only to show me that I can have internet access only through lubuntu.
Copy ubuntu /etc/resolv.conf to slackware/etc see it that will allows running slackpkg from within chroot.

colorpurple21859 03-26-2021 08:57 PM

Quote:

it stops at command line, in something called BusyBox,
I don't think updates will fix this.
post slackware /etc/fstab and
Code:

lsblk -f

Didier Spaier 03-27-2021 08:09 AM

Nothing new: https://www.linuxquestions.org/quest...6/#post5750043

You are not the first to come across this issue: https://forum.salixos.org/viewtopic....p=46513#p46511

porphyry5 03-27-2021 01:30 PM

2 Attachment(s)
Quote:

Originally Posted by colorpurple21859 (Post 6234555)
I don't think updates will fix this.
post slackware /etc/fstab and
Code:

lsblk -f

Code:

/ # cat /etc/fstab
/dev/mmcblk0p2  /                ext4        defaults        1  1
/dev/mmcblk0p3  /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      defaults        0  0
/ # lsblk -f
NAME        FSTYPE LABEL UUID                                MOUNTPOINT
mmcblk0                                                       
├─mmcblk0p3  ext4        2ae29942-2e4d-480f-8447-bd4760dfe640
├─mmcblk0p1  vfat        D766-8D60                           
├─mmcblk0p4  ext4        465abeaa-ce77-48bc-8fe7-b8bd718a351e
└─mmcblk0p2  ext4        5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f
mmcblk0boot0                                                 
mmcblk0boot1                                                 
sda                                                           
└─sda1      ext4  256GB 2b068e6d-e967-44a4-85eb-3f4d219a5d03
/ #

Also have dmesg for the 2 attempts to boot slackware that I described. slboot.1 has no usb slots occupied, slboot.2 has my HD in usb 3.x and a wifi dongle in usb 2.x

porphyry5 03-27-2021 02:11 PM

Quote:

Originally Posted by colorpurple21859 (Post 6234534)
Copy ubuntu /etc/resolv.conf to slackware/etc see it that will allows running slackpkg from within chroot.

Don't think its that simple, slackware doesn't have systemd, and lubuntu seems pretty secretive about the content of netif/
Code:

/etc $ readlink -f resolv.conf
/run/systemd/resolve/stub-resolv.conf

/etc $ cd /run/systemd/resolve/
/run/systemd/resolve $ ls
netif/  resolv.conf  stub-resolv.conf
/run/systemd/resolve $ cd netif
bash: cd: netif: Permission denied
/run/systemd/resolve $ sudo cd netif
sudo: cd: command not found
/run/systemd/resolve $ ls netif/*
ls: cannot access 'netif/*': Permission denied
/run/systemd/resolve $ sudo ls netif/*
ls: cannot access 'netif/*': No such file or directory
/run/systemd/resolve $ cat stub-resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0
search caferoma

But if slackware uses a link like lubuntu, and one knew the name it would use for that link, it might work?

colorpurple21859 03-27-2021 07:00 PM

Change your /etc/fstab to this for the / and /home lines to use uuids

Code:

UUID=5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f    /              ext4        defaults      1  1
uuid=2ae29942-2e4d-480f-8447-bd4760dfe640  /home            ext4        defaults      1  2

Quote:

Don't think its that simple, slackware doesn't have systemd,
coping using file manager won't work, from a terminal will
Code:

sudo cp /etc/resolv.conf /media/q/5bb5deec-0a16-4c5b-bc55-8d2fb1a8047f/etc/resolv.conf
add a wait and these modules to your mkinitrd command
Code:

-w 15 -m cqhci:uas:mmc_block

porphyry5 03-28-2021 02:20 PM

Quote:

Originally Posted by colorpurple21859 (Post 6234857)
add a wait and these modules to your mkinitrd command
Code:

-w 15 -m cqhci:uas:mmc_block

New initrd.gz created
Code:

/ # mkinitrd -c -k 4.4.14 -f ext4 -r /dev/mmcblk0p2 -m usb-storage:xhci-hcd:mmc_core:sdhci:sdhci-pci:xhci-pci:ohci-pci:ehci-pci:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -w 15 -m cqhci:uas:mmc_block -u -o /boot/initrd.gz
OK: /lib/modules/4.4.14/kernel/drivers/usb/storage/usb-storage.ko added.
OK: /lib/modules/4.4.14/kernel/drivers/usb/storage/uas.ko added.
OK: /lib/modules/4.4.14/kernel/drivers/mmc/core/mmc_core.ko added.
OK: /lib/modules/4.4.14/kernel/drivers/mmc/card/mmc_block.ko added.
34647 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
/ #

fstab and copy successful, and slackpkg update gpg connects successfully, but wants an insecure connection
Code:

/ # slackpkg update gpg

mkdir: cannot create directory ‘/home/q/.gnupg’: No such file or directory
                        Downloading http://mirrors.slackware.com/slackware/slackware64-14.2/GPG-KEY...
--2021-03-28 11:23:57--  http://mirrors.slackware.com/slackware/slackware64-14.2/GPG-KEY
Resolving mirrors.slackware.com (mirrors.slackware.com)... 207.223.116.213
Connecting to mirrors.slackware.com (mirrors.slackware.com)|207.223.116.213|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://mirrors.slackware.com/slackware/slackware64-14.2/GPG-KEY [following]
--2021-03-28 11:23:59--  https://mirrors.slackware.com/slackware/slackware64-14.2/GPG-KEY
Connecting to mirrors.slackware.com (mirrors.slackware.com)|207.223.116.213|:443... connected.
ERROR: cannot verify mirrors.slackware.com's certificate, issued by ‘CN=R3,O=Let's Encrypt,C=US’:
  Unable to locally verify the issuer's authority.
To connect to mirrors.slackware.com insecurely, use `--no-check-certificate'.

slackpkg does not accept '--no-check-certificate', as a parameter, so will try adding it to the 'mirrors.slackware.com' line in /etc/slackpkg/mirrors. But it will not accept any uncommented line containing anything other than an url.

Checking those dmesg files I attached, they're pretty useless, don't include the part at the end where it all goes wrong. Also, slackware was generating error messages before it crashed that dmesg does not show. /var/log contains nothing created on 3/27. Is there any way of capturing the boot process record to a file as it proceeds? Otherwise, the only thing I can think of is to photograph the screen as it runs.

Tried booting slackware with new initrd: it fails now with
Code:

mount can't find /mnt in fstab
ERROR: no /sbin/init on rootdev
Trying to mount /dev on /mnt/dev

Typing exit got the Busybox again

So I added a UUID line for /mnt in slacware's /etc/fstab and tried again. Same result, same message no /mnt in fstab.


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