i need help making a backup kernel,newbie troubles!
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i need help making a backup kernel,newbie troubles!
so far i love slackware its a challenge and im learning quickly,i havent touched my ubuntu install since i installed slackware!anyway,i compiled a new kernel for my laptop,acer aspire 5315,w/intel celeron550 2ghz1024L2cache,2gb memory.(el cheapo)but i think its unstable,the cpu runs around 16 to 30% all the time and i cant use compiz like i could with the generic kernel,so maybe it wasnt the greatest build but it was my first successfull build.but i dont have a back up,i screwed that up compiling my kernel.i tried the probe button in lilo and a few kernels popped up,so i chose generic smp and huge smp as backups,and wrote them to the lilo conf.
and ran lilo,but when i tried them i got a kernel panic.obviously i dont know what im doing yet!how can i make back up kernels correctly,do i get them off the cd?are they built in somewhere,perhaps /usr/src/linux.or do i have to compile them?sorry for the amature questions,but how else am i going to learn.i have read alot of documentation but i havent found anything on this particular subject other than compiling.any help would be appreciated!!
Rick
You probably missed the bit where you were supposed to create an "initramfs" image for your kernels using the tools provided by your distro. If you try to boot a kernel without the initramfs image and that kernel hasn't got all the drivers you need for the basic system to run, you will get a kernel panic. You need to create an initramfs image for each kernel you want to boot.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Quote:
See if you have a "mkinitramfs" script:
In Slackware you should have a mkinitrd script. Have a look at /boot/README.initrd for help with creating a Slackware initial ram disk needed by the generic kernel.
That being said, the huge kernel should boot OK without one..
As other said, you need an initrd with the default slack kernel
The initrd is an image file of a virtual partition, when the kernel loads, this partition is mounted in RAM, before the root partition. This virtual partition contains drivers that are required by the kernel to mount the root partition
The initrd is convenient because the kernel file is smaller this way and loads faster. If you have all drivers built in the kernel, the kernel file would be heavy and load slower (dunno running performance wise, surelly slower too). With the initrd, the kernel loads only required drivers to boot
So in short, each time you want to use the slackware stock kernel, you have to use the initrd
ok i used the mkinitrd script and edited lilo,then ran lilo,when irun the generic smp kernel it stops and i get this error;
no /sbin/init found on root dev trouble ahead?and when i run huge smp i get the kenel that failed?instead of huge smp.do i have to reinstall?
because something isnt right,now what can i do?
Rick
ok bgeddy here are the outputs;
/etc/lilo.conf
boot="/dev/sda3"
lba32
prompt
timeout="300"
root=/dev/sda3
vga="791"
bitmap = /boot/slack.bmp
default=newkernel
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Rick - well the good news is the stock kernel file sizes and dates look OK in boot so hopefully they're intact. If not we can reinstall them no problem from your install media.
Now for the bad news ! Sorry to have to ask this but could you post the output (as root) of "fdisk -l" and "cat /etc/fstab" ?
BTW - how are you booting the machine to run these commands ? Will one of your lilo menu options boot OK or are you perhaps booting from a CD/DVD ?
bgeddy;im using the newkernel to boot,its one i compiled,it works but its alittle unstable.i will get you the outputs you asked for ina little bit,i dont have internet right now,itll take 7 days to get it hooked up,(i moved),right now im using wifi in ubuntu,i havent got the wifi in slack working yet,as soon as i do ill post the outputs.or ill paste the out puts on the desktop and copy them from ubuntu.by the way why wont the i1915 video drivers work?they areb the ones i need.
Rick
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Quote:
I don't use lilo, but the first line in lilo.conf:
boot="/dev/sda3"
.. shouldn't be boot="/dev/sda" ?
(sorry if I am wrong, just wanted to help checking)
keefaz: Thanks for the input. I noticed this too - however - you may install lilo to a partition rather than the MBR as long as that partition is flagged bootable - thats why I asked for fdisk -l result. Admittedly I always install lilo to my MBR and let it handle all OS's as I have less problems with this but I assume the OP had a reason to install to the root partition.
rixtr66: I suggest you reinstall the stock kernels and modules (just to be on the safe side) and run lilo as your compilation may have messed something up. As previously stated, they look OK but something odd is going on if a system that once worked OK is now kernel panicking with the stock kernels just because you recompiled your kernel..
To do this first put your install DVD/CD1 in the optical drive,then as root type :
Code:
mount /dev/your_optical_drive_device /mnt/dvd
upgradepkg --reinstall /mnt/dvd/slackware/a/kern*smp*.tgz
lilo -v
Obviously replace your_optical_drive_device with the relevant hd?,sd? or sr? name. Next try to boot the huge kernel.
BTW - you have two swap drives - you could have shared the one between Ubuntu and Slackware but never mind for now !
Quote:
by the way why wont the i1915 video drivers work?
Not sure - I'd start another thread if I were you as someone else may share you problem and never find your solution if we solve it here.
If it is a custom kernel, why not configure ex3 driver as built-in rather than as module ?
This could you save effort as you don't need an initrd if the filesystem type driver is built-in, with the hard drive interface (IDE chipset, SCSI...) built in too of course (I think they are built in default config for the generic smp)
I wonder, did you make the initrd under your running custom kernel ? If yes, that could explain a possible compatibility issue with the modules in the initrd and the generic-smp kernel. The mkinitrd script takes modules from current kernel if you don't use the option -k 2.6.24.5-smp, but I don't know, maybe you did this right (used the -k option)
The mkinitrd script takes modules from current kernel if you don't use the option -k 2.6.24.5-smp, but I don't know, maybe you did this right (used the -k option)
What I still don't get, is how LILO will handle different versions of initramd'd Kernels. Because mkinitrd put's all this stuff in folder /boot/initrd-tree. Without a hint of differentiation. In the manpage I couldn't find something.
One needs to set CLEAR_TREE="0" in /etc/mkinitrd.conf
The /boot/initrd-tree can be used for all initrd-enabled kernels. Differing version modules are kept in /boot/initrd-tree/lib/modules/kernel[CONFIG_LOCALVERSION string], similar to /lib/modules
I guess without the CLEAR_TREE="0" it could happen that needed modules for some kernel version would be deleted, if initrd is rebuild with a new specimen of a kernel of the same version, that doesn't need one or more of the modules in question?
It is also interesting to think about SOURCE_TREE and OUTPUT_IMAGE switches in that context.
And never forget to use the -k function in mkinitrd, if making from a booted environment with differing kernel version.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.