LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   3.2.29 kernel and Lilo (https://www.linuxquestions.org/questions/slackware-14/3-2-29-kernel-and-lilo-4175437571/)

michijo 11-17-2012 08:58 AM

3.2.29 kernel and Lilo
 
Slackware 14 uses 3.2.29 kernel. in my boot directory after upgrading are vmlinuz-generic-smp-3.2.29-smp and vmlinuz-huge-smp-3.2.29-smp, etc. Is there a difference in these, and which should lilo point to?

NorthBridge 11-17-2012 10:32 AM

See the "switch to a generic kernel" part on this page, it explains them very well.

In short, you want a generic kernel running the system after you're done with the installation, since it runs a little bit faster and loads fewer things.

michijo 11-17-2012 06:32 PM

Quote:

Originally Posted by NorthBridge (Post 4831408)
See the "switch to a generic kernel" part on this page, it explains them very well.

In short, you want a generic kernel running the system after you're done with the installation, since it runs a little bit faster and loads fewer things.

Ah, somehow I messed up. I think I did it right, but there is a kernel panic and now I cant boot. I am using an Ubuntu livedisk to access my slackware data, so I was able to edit the lilo.conf. But now I cant set it to the MBR due to the inability to run the command "lilo -v" from inside the livedisk.

Any way to manually move the new lilo conf to MBR? For now I cant bootmy computer either way.

michijo 11-17-2012 06:58 PM

Ive been using these directions that I found on a different threadZ

Code:

~#mkdir /slacktemp                  #temporary mount point
~#mount /dev/your_device /slacktemp  #the device you installed to
~#chroot /slacktemp                  #change to yours
~#cd /slacktemp/etc                  #change to directory with lilo.conf
~#vi lilo.conf                      #edit lilo.conf, if need be
~#lilo -v -t -b /dev/your_device    #sda, hda this will only test
~#lilo -v -b /dev/your_device        #this will write to your boot device

So far I was able to mount my slackware inside an Ubuntu liveCD that I happened to have around. Then I was able to chroot it. Finally I am able to run lilo! Very tricky! But there is an error:

"Fatal: Default image doesn't exist."

Not sure what that means. It says it added

Code:

Boot image: /boot/vmlinuz-generic-3.2.29
Added 3.2.29

then it errors.

colorpurple21859 11-17-2012 07:42 PM

You need to create an initrd.gz for the generic kernel to work
Add an entry to similar to this
Code:

image = /boot/vmlinuz
  root = /dev/sda?
  label = Linux
  read-only

reboot, use this entry to boot slackware. Then run this
Code:

sh /usr/share/mkinitrd/mkinitrd_command_generator.sh
to find out what is needed to run mkinitrd. After creating an initrd.gz. Edit you generic entry to look like this
Code:

image = /boot/vmlinuz-generic-3.2.29
  initrd = /boot/initrd.gz
  root = /dev/sda?
  label = slack
  read-only

rerun lilo then the generic kernel should work. Vmlinuz is linked to the huge kernel

michijo 11-17-2012 07:44 PM

why cant I use /dev/root anymore? It returns

Code:

Fatal: Illegal 'root=' specification: /dev/root
This always worked before. I am going to use it anyway and see if it works.

michijo 11-17-2012 07:51 PM

Quote:

Originally Posted by colorpurple21859 (Post 4831689)
You need to create an initrd.gz for the generic kernel to work
Add an entry to similar to this
Code:

image = /boot/vmlinuz
  root = /dev/sda?
  label = Linux
  read-only

reboot, use this entry to boot slackware. Then run this
Code:

sh /usr/share/mkinitrd/mkinitrd_command_generator.sh
to find out what is needed to run mkinitrd. After creating an initrd.gz. Edit you generic entry to look like this
Code:

image = /boot/vmlinuz-generic-3.2.29
  initrd = /boot/initrd.gz
  root = /dev/sda?
  label = slack
  read-only

rerun lilo then the generic kernel should work. Vmlinuz is linked to the huge kernel

I did that before actually. I ran that command and used the output. Well, trying your smp edition.

colorpurple21859 11-17-2012 07:53 PM

use it if it works

michijo 11-17-2012 07:54 PM

Quote:

Originally Posted by colorpurple21859 (Post 4831698)
use it if it works

I didnt include this originally:

initrd = /boot/initrd.gz

I think that is what was missing! The output from lilo is different now. Thanks!

colorpurple21859 11-17-2012 08:06 PM

I
Quote:

didnt include this originally:

initrd = /boot/initrd.gz
Yeah that was the problem, glad you got it working,

michijo 11-17-2012 08:29 PM

Quote:

Originally Posted by colorpurple21859 (Post 4831704)
I Yeah that was the problem, glad you got it working,

It doesnt kernel panic now, but I still cant boot that generic kernel. It gives an error related to not being able to find "mnt" or to mount /dev/sda2 as root, even though that is root. It also said could not find "init". That is from what I remember. I installed a non-generic kernel in order to get around using that suck livedisk. Though I restarted so many times with that livedisk I became proficient at mounting and chrooting folders and filesystems as root. Good experience, but I would rather just avoid such troubles. Never realized what chroot was for.

colorpurple21859 11-17-2012 09:02 PM

at the lilo prompt hit tab select the entry for the generic kernel type root=/dev/sda2 then boot if it works then add the line
Code:

append =  "root=/dev/sda2"
to the generic entry

michijo 11-18-2012 09:23 AM

Quote:

Originally Posted by colorpurple21859 (Post 4831726)
at the lilo prompt hit tab select the entry for the generic kernel type root=/dev/sda2 then boot if it works then add the line
Code:

append =  "root=/dev/sda2"
to the generic entry

Nope, the error is the same:
Code:

mounting /dev/sda2 on /mnt failed: no such device

No /sbin/init found on rootdev (or not mounted)

Trouble ahead

Cant access TTY


michijo 11-18-2012 12:48 PM

I am sure it is /dev/sda2, because the command

# df -h

produces sda2 in the '/' root.

colorpurple21859 11-18-2012 01:16 PM

Are you able to boot slackware with the huge kernel?

michijo 11-18-2012 02:17 PM

Quote:

Originally Posted by colorpurple21859 (Post 4832124)
Are you able to boot slackware with the huge kernel?

Yes, I am using a custom kernel right now. Earlier I commented out the custom kernel thoughtlessly, expecting the generic kernel to work, so I had to use a livedisk to uncomment the custom kernel via some tricky chroot of my /dev/sda2 into the livedisk environment, which I found interesting.

I am not sure what is going on, since when I run 'lilo -v' it gives me verbose information and updates my lilo to MBR without any errors or warnings.

I am thinking to keep the custom kernel and forget this issue.

colorpurple21859 11-18-2012 04:05 PM

If your custom kernel works and the generic kernel doesn't, there must be something missing/wrong with your initrd.gz for the generic kernel.

michijo 11-18-2012 06:10 PM

Quote:

Originally Posted by colorpurple21859 (Post 4832205)
If your custom kernel works and the generic kernel doesn't, there must be something missing/wrong with your initrd.gz for the generic kernel.

I only used the commands to automatically create the initrd.gz. So it is only what the system told me.

Though it can be maybe that the custom kernel I made has created an initrd.gz incompatible with the 3.2.29 generic kernel?

colorpurple21859 11-18-2012 08:54 PM

try booting the huge kernel rerun the scripts to create an initrd.gz for the generic kernel and see if that helps. The only possible problem with this is if you are using an initrd.gz to boot your custom kernel.

stfwala 11-18-2012 09:40 PM

My new redhat 9 installation is not booting, it says: <0>kernel panic: Attempted to kill init!
I've tried different machines but will get the same error. How should i correct this

colorpurple21859 11-18-2012 09:53 PM

@ stfwala you need to start a new thread with your question to prevent confusion. This is a Slackware problem and not any way related to a redhat problem.

michijo 11-18-2012 10:17 PM

Quote:

Originally Posted by colorpurple21859 (Post 4832300)
try booting the huge kernel rerun the scripts to create an initrd.gz for the generic kernel and see if that helps. The only possible problem with this is if you are using an initrd.gz to boot your custom kernel.

No, I would not use an initrd.gz to start the custom kernel, as I already have an entry for it in the lilo.conf. I'll try this with huge.

michijo 11-19-2012 01:33 PM

Quote:

Originally Posted by colorpurple21859 (Post 4832300)
try booting the huge kernel rerun the scripts to create an initrd.gz for the generic kernel and see if that helps. The only possible problem with this is if you are using an initrd.gz to boot your custom kernel.

Yes, the solution was that. The creation of a custom kernel unrelated to the huge kernel that comes with the generic results in a bad initrd.gz.

I switched to the huge kernel, then ran the command:

/usr/share/mkinitrd/mkinitrd_command_generator.sh

This produced the right initrd.gz. So I learned from this, the initrd.gz for a generic can only be produced with the right huge kernel related to it, and not with a custom kernel.


All times are GMT -5. The time now is 05:54 PM.