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.)


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