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?


All times are GMT -5. The time now is 07:59 PM.