LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Switch to generic kernel - unsuccessful (https://www.linuxquestions.org/questions/slackware-14/switch-to-generic-kernel-unsuccessful-4175493446/)

NikolaStanchev 02-02-2014 10:49 AM

Switch to generic kernel - unsuccessful
 
Hi, everyone! I am sorry in advance for my incompetence but i am stuck. I also know the fact that there are similar threads, for which i apologize one more time but i have project to work on and without solving this problem it will be hard to continue. I am running Slackware 14.1; kernel version 3.10.17. I installed it 2 days before and wanted to switch to the generic kernel but after i tried to do this, my system refused to boot the generic kernel. Running mkinitrd - getting this
Code:

ls: cannot access /sys/module/*_hcd/drivers/*: No such file or directory
Please help! Than you very much!

Bertman123 02-02-2014 11:47 AM

Switching to a generic kernel isn't too difficult, but can be challenging the first time you attempt it.

This first link helped me a lot in figuring it out.

http://mirrors.slackware.com/slackwa.../README.initrd

Make sure you install the three packages below (the generic kernel is probably already installed, but I installed it again anyway just to be safe). Once these packages are installed you can either follow the instructions in the link above, or the instructions in the link below - about half way down the page.

kernel-generic-smp-3.10.17_smp-i686-3.txz
kernel-modules-smp-3.10.17_smp-i686-3.txz
mkinitrd-1.4.8-i486-1.txz


http://docs.slackware.com/slackware:beginners_guide

NikolaStanchev 02-02-2014 12:01 PM

Quote:

Originally Posted by Bertman123 (Post 5109758)
Switching to a generic kernel isn't too difficult, but can be challenging the first time you attempt it.

This first link helped me a lot in figuring it out.

http://mirrors.slackware.com/slackwa.../README.initrd

Make sure you install the three packages below (the generic kernel is probably already installed, but I installed it again anyway just to be safe). Once these packages are installed you can either follow the instructions in the link above, or the instructions in the link below - about half way down the page.

kernel-generic-smp-3.10.17_smp-i686-3.txz
kernel-modules-smp-3.10.17_smp-i686-3.txz
mkinitrd-1.4.8-i486-1.txz


http://docs.slackware.com/slackware:beginners_guide

Will this solve this poblem?

55020 02-02-2014 01:40 PM

I understand from the other thread that you are using mkinitrd_command_generator.sh, not mkinitrd.

Here are two solutions.

(1) If you do not have LVM or LUKS or raid partitions, and you don't boot from a USB device, use mkinitrd - it's not difficult. See the file /boot/README.initrd .

or

(2) If you do have LVM or LUKS or raid partitions, but you don't boot from a USB device, edit /usr/share/mkinitrd/mkinitrd_command_generator.sh to comment out lines 453-455
Code:

# If we use any USB module, try to determine the Host Controller
# if echo $MLIST | grep -q "usb"; then
#  MLIST=$(add_usb_hcd)
# fi


NikolaStanchev 02-02-2014 02:31 PM

Quote:

Originally Posted by 55020 (Post 5109808)
I understand from the other thread that you are using mkinitrd_command_generator.sh, not mkinitrd.

Here are two solutions.

(1) If you do not have LVM or LUKS or raid partitions, and you don't boot from a USB device, use mkinitrd - it's not difficult. See the file /boot/README.initrd .

or

(2) If you do have LVM or LUKS or raid partitions, but you don't boot from a USB device, edit /usr/share/mkinitrd/mkinitrd_command_generator.sh to comment out lines 453-455
Code:

# If we use any USB module, try to determine the Host Controller
# if echo $MLIST | grep -q "usb"; then
#  MLIST=$(add_usb_hcd)
# fi


Thank you! Unfortunately, my computer did not manage to boot. I get:
Code:

[4.175116][<ffffffff8154fc46>]?rest_init+0x80/0x80
[4.175215]---[end trace 5b6473af4e8e4782]--


Bertman123 02-02-2014 05:36 PM

What steps are you taking to switch to a generic kernel?

Richard Cranium 02-02-2014 08:20 PM

Quote:

Originally Posted by 55020 (Post 5109808)
I understand from the other thread that you are using mkinitrd_command_generator.sh, not mkinitrd.

Here are two solutions.

(1) If you do not have LVM or LUKS or raid partitions, and you don't boot from a USB device, use mkinitrd - it's not difficult. See the file /boot/README.initrd .

or

(2) If you do have LVM or LUKS or raid partitions, but you don't boot from a USB device, edit /usr/share/mkinitrd/mkinitrd_command_generator.sh to comment out lines 453-455
Code:

# If we use any USB module, try to determine the Host Controller
# if echo $MLIST | grep -q "usb"; then
#  MLIST=$(add_usb_hcd)
# fi


Option #2 would sort of suck if you have a USB keyboard.

Richard Cranium 02-02-2014 08:29 PM

Quote:

Originally Posted by NikolaStanchev (Post 5109718)
Hi, everyone! I am sorry in advance for my incompetence but i am stuck. I also know the fact that there are similar threads, for which i apologize one more time but i have project to work on and without solving this problem it will be hard to continue. I am running Slackware 14.1; kernel version 3.10.17. I installed it 2 days before and wanted to switch to the generic kernel but after i tried to do this, my system refused to boot the generic kernel. Running mkinitrd - getting this
Code:

ls: cannot access /sys/module/*_hcd/drivers/*: No such file or directory
Please help! Than you very much!

Please boot using the huge kernel (which I assume you are able to do). Then please run the following command...
Code:

$ ls -1 /sys/module/
...and post the results here. Then please run the following command as root...
Code:

$ lsusb -v
...and also post those results here.

There's code in mkinitrd_command_generator.sh that tells me that it should not attempt to find USB controllers unless one of your important boot devices (keyboard or perhaps a disk drive) needs USB to function. You aren't the first one to have had this problem recently.

NikolaStanchev 02-03-2014 03:35 AM

2 Attachment(s)
Quote:

Originally Posted by Richard Cranium (Post 5109989)
Please boot using the huge kernel (which I assume you are able to do). Then please run the following command...
Code:

$ ls -1 /sys/module/
...and post the results here. Then please run the following command as root...
Code:

$ lsusb -v
...and also post those results here.

There's code in mkinitrd_command_generator.sh that tells me that it should not attempt to find USB controllers unless one of your important boot devices (keyboard or perhaps a disk drive) needs USB to function. You aren't the first one to have had this problem recently.

I hope it will be helpful.

Richard Cranium 02-03-2014 01:27 PM

OK, this is odd.

According to the lsusb output, you have an EHCI host controller on your system. You also don't appear to have a USB keyboard or a USB drive.

Your /sys/module listing also shows an ehci_hcd subdirectory.

I noticed some odd behavior while running some tests. I'm going to open another thread to ask about it (since it has something to do with what you're seeing). OK, there's something odd in my normal user's profile that changes the way my interactive shell works compared to running the same command within a shell script. A brand new user with no special changes to the account works as expected.

Please run the following command while logged in as root:
Code:

for i in $(ls -Ld /sys/module/*_hcd/drivers/*); do  ls -L ${i}; done
If you get something like...
Code:

~$ for i in $(ls -Ld /sys/module/*_hcd/drivers/*); do  ls -L ${i}; done
ls: cannot access /sys/module/ohci_hcd/drivers/pci:ohci_hcd/: No such file or directory
ls: cannot access /sys/module/ohci_hcd/drivers/platform:ohci-platform/: No such file or directory
~$

...then there is something strange in your shell environment.

NikolaStanchev 02-04-2014 02:44 PM

Quote:

Originally Posted by Richard Cranium (Post 5110600)
OK, this is odd.

According to the lsusb output, you have an EHCI host controller on your system. You also don't appear to have a USB keyboard or a USB drive.

Your /sys/module listing also shows an ehci_hcd subdirectory.

I noticed some odd behavior while running some tests. I'm going to open another thread to ask about it (since it has something to do with what you're seeing). OK, there's something odd in my normal user's profile that changes the way my interactive shell works compared to running the same command within a shell script. A brand new user with no special changes to the account works as expected.

Please run the following command while logged in as root:
Code:

for i in $(ls -Ld /sys/module/*_hcd/drivers/*); do  ls -L ${i}; done
If you get something like...
Code:

~$ for i in $(ls -Ld /sys/module/*_hcd/drivers/*); do  ls -L ${i}; done
ls: cannot access /sys/module/ohci_hcd/drivers/pci:ohci_hcd/: No such file or directory
ls: cannot access /sys/module/ohci_hcd/drivers/platform:ohci-platform/: No such file or directory
~$

...then there is something strange in your shell environment.

Code:

ls: cannot access /sys/module/*_hcd/drivers/*: No such file or directory

Richard Cranium 02-04-2014 10:38 PM

OK, try this:

As root, edit the file /usr/share/mkinitrd/mkinitrd_command_generator.sh and change line 238 from
Code:

for i in $(ls -Ld /sys/module/*_hcd/drivers/*); do
to
Code:

for i in $(/bin/ls -Ld /sys/module/*_hcd/drivers/*); do
and then run the /usr/share/mkinitrd/mkinitrd_command_generator.sh command to see if it works.

NikolaStanchev 02-05-2014 01:15 PM

Quote:

Originally Posted by Richard Cranium (Post 5111740)
OK, try this:

As root, edit the file /usr/share/mkinitrd/mkinitrd_command_generator.sh and change line 238 from
Code:

for i in $(ls -Ld /sys/module/*_hcd/drivers/*); do
to
Code:

for i in $(/bin/ls -Ld /sys/module/*_hcd/drivers/*); do
and then run the /usr/share/mkinitrd/mkinitrd_command_generator.sh command to see if it works.

doesn`t work

perbh 02-05-2014 01:40 PM

Just maybe the permission bits have been screwed up? (like no read access for anyone, including root)

Richard Cranium 02-05-2014 02:01 PM

As root, what do you get when you run...
Code:

for i in $(/bin/ls -Ld /sys/module/*_hcd/drivers/*); do  /bin/ls -L ${i}; done
..?

As root, what does the command...
Code:

alias
...return?

As root, what does the command...
Code:

/bin/ls -Ld /sys/module/ehci_hcd/drivers/*
...return?

I've seen an issue where a user had 'ls' aliased to something stupid, which would break some of the above commands. (That user, by the way, was my normal login user on my main system. I fixed that alias this morning due to this thread.)

NikolaStanchev 02-05-2014 04:14 PM

Quote:

Originally Posted by Richard Cranium (Post 5112260)
As root, what do you get when you run...
Code:

for i in $(/bin/ls -Ld /sys/module/*_hcd/drivers/*); do  /bin/ls -L ${i}; done
..?

As root, what does the command...
Code:

alias
...return?

As root, what does the command...
Code:

/bin/ls -Ld /sys/module/ehci_hcd/drivers/*
...return?

I've seen an issue where a user had 'ls' aliased to something stupid, which would break some of the above commands. (That user, by the way, was my normal login user on my main system. I fixed that alias this morning due to this thread.)

1.
Code:

/bin/ls: cannot access /sys/module/*_hcd/drivers/*: No such file or directory
2.nothing
3.
Code:

/bin/ls: cannot access /sys/module/ehci_hcd/drivers/*: No such file or directory
have no drivers directory

Richard Cranium 02-05-2014 04:39 PM

Didn't expect that answer for #3.

This should be the last request for output (since you're probably getting tired of running random commands).

What is the output of the command (run as root)
Code:

lspci -k
?

NikolaStanchev 02-10-2014 03:03 PM

Quote:

Originally Posted by Richard Cranium (Post 5112376)
Didn't expect that answer for #3.

This should be the last request for output (since you're probably getting tired of running random commands).

What is the output of the command (run as root)
Code:

lspci -k
?

Code:

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
        Subsystem: Hewlett-Packard Company Device 1858
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: i915
        Kernel modules: i915
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: mei_me
        Kernel modules: mei_me
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1f.0 ISA bridge: Intel Corporation 7 Series Chipset Family LPC Controller (rev 04)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: lpc_ich
        Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel modules: i2c_i801
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 07)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: r8169
        Kernel modules: r8169
02:00.0 Network controller: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe
        Subsystem: Hewlett-Packard Company Device 18ec
        Kernel driver in use: rt2800pci
        Kernel modules: rt2800pci
02:00.1 Bluetooth: Ralink corp. RT3290 Bluetooth
        Subsystem: Hewlett-Packard Company Device 18ec
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
        Subsystem: Hewlett-Packard Company Device 1858
        Kernel driver in use: rtsx_pci
        Kernel modules: rtsx_pci

Sorry for the late response.

Richard Cranium 02-11-2014 09:41 AM

BTW, I'm willing to work with you until we figure out what the problem is. If you have other things to do, found a workaround, or just don't want to spend time to debug this issue for whatever reason, I'm fine with that. Please just let me know.

Looking through the mkinitrd_command_generator.sh code, the portion of the script that blows up for you should only be run if the script concludes that you need a usb device of some sort. It looks for a USB keyboard input device and it also looks for a usb storage device (such as a usb stick/storage card).

Then again, from this post, you either rolled your own mkinitrd command or modified the script to not run "MLIST=$(add_usb_hcd)". If you did the last bit, then you might actually need the usb controller.

From your lsusb output given a while ago, you don't appear to have a usb keyboard; but, it's possible that the script is misinterpreting something. It's also possible that the function determine_blockdev_drivers is returning something with the string "usb" in it.

So, please modify /usr/share/mkinitrd/mkinitrd_command_generator.sh from
Code:

  439  # Determine the list of kernel modules needed to support the root device:
  440  MLIST=$(determine_blockdev_drivers)
  441 
  442  # Check if we are running in a kvm guest with virtio block device driver

to
Code:

  439  # Determine the list of kernel modules needed to support the root device:
  440  MLIST=$(determine_blockdev_drivers)
  441  echo $MLIST
  442 
  443  # Check if we are running in a kvm guest with virtio block device driver

(The line numbers are from my version of the file; they should match yours. The above is a copy from a vi edit buffer with ':set nu'.)

Then run /usr/share/mkinitrd/mkinitrd_command_generator.sh as root (sorry) and post the results. On my machine, I get
Code:

root@darkstar:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh
usb-storage:ehci-hcd:ehci-pci:aic7xxx:aic7xxx
#
# 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 3.10.17 -f xfs -r /dev/mdgroup/rootlv -m usb-storage:ehci-hcd:ehci-pci:aic7xxx:usbhid:hid_generic:ohci-hcd:xfs -L -R -u -o /boot/initrd.gz
root@darkstar:~#

...with the output of the echo command that I just added in bold. (I have a USB flash card reader plugged in to one of my hubs at the moment. I also have a USB keyboard, but that would be detected later in the script.)

If the output of that "echo $MLIST" command does not contain the string "usb" in it, then please provide the output of
Code:

cat /proc/bus/input/devices
since we appear to have an improperly detected USB keyboard.

NikolaStanchev 02-13-2014 02:41 PM

Of course, I am willing to work with you too but now I am not with this computer so I will post the output of the commands with delay. Will this be a problem for you? Thank you for the patience.

Richard Cranium 02-13-2014 05:18 PM

It is not a problem at all. Post the output when it is convenient for you.

eduardr 02-21-2014 08:29 PM

I tried a renaming of the ehci item, not sure if it's correct but error went away:

Instead of "for i in $(ls -Ld /sys/module/*_hcd"

used "for i in $(ls -Ld /sys/module/*_pci"

--Ed

BeaStiE35 03-14-2015 12:37 PM

Quote:

Originally Posted by NikolaStanchev (Post 5117120)
I am not with this computer so I will post the output of the commands with delay

You got to solve? and how ?? ... I'm in the same dilemma !

BeaStiE35 03-15-2015 10:45 AM

well... no help? ...

Alien Bob 03-15-2015 10:50 AM

Quote:

Originally Posted by BeaStiE35 (Post 5332494)
well... no help? ...

You usually don't get help if you dig up a year-old thread for your own purposes and then do not give any information about your own problem.
Open a new thread, explain what you want, what you tried, what errors you got and where you got stuck. People will certainly help you then.


All times are GMT -5. The time now is 10:31 PM.