LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-28-2008, 12:42 AM   #1
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Rep: Reputation: 15
Unhappy 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
 
Old 08-28-2008, 12:57 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
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.

See if you have a "mkinitramfs" script:

man mkinitramfs
 
Old 08-28-2008, 02:02 AM   #3
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
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..
 
Old 08-28-2008, 03:46 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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

Last edited by keefaz; 08-28-2008 at 03:48 AM.
 
Old 08-28-2008, 03:29 PM   #5
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
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
 
Old 08-28-2008, 03:40 PM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Please post your /etc/lilo.conf and the results from ls -al /boot.

You shouldn't have to reinstall.
 
Old 08-28-2008, 06:52 PM   #7
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
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

image=/boot/vmlinuz-custom
label="newkernel"
root=/dev/sda3
read-only

image=/boot/vmlinuz-generic-smp-2.6.24.5-smp
label="generic-smp"
initrd = /boot/initrd.gz
root=/dev/sda3
read-only

image=/boot/vmlinuz-huge-smp-2.6.24.5-smp
label="hugesmp"
root=/dev/sda3
read-only

image=/boot/vmlinuz.old
label="vmlinuz.old"
root=/dev/sda3
read-only
ls -al/boot
root@slack-1:/home/rick# ls -al /boot
total 25376
drwxr-xr-x 3 root root 4096 2008-08-28 16:13 .
drwxr-xr-x 21 root root 4096 2008-08-28 17:52 ..
lrwxrwxrwx 1 root root 37 2008-08-22 22:31 README.initrd -> /usr/doc/mkinitrd-1.3.2/README.initrd
-rw-r--r-- 1 root root 1356986 2008-08-27 02:32 System.map-custom
lrwxrwxrwx 1 root root 28 2008-08-27 02:35 System.map-custom-System.map -> System.map-custom-System.map
-rw-r--r-- 1 root root 844024 2008-04-30 15:02 System.map-generic-2.6.24.5
-rw-r--r-- 1 root root 880187 2008-04-30 14:19 System.map-generic-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 1282875 2008-04-30 15:15 System.map-huge-2.6.24.5
-rw-r--r-- 1 root root 738942 2008-08-27 00:20 System.map-huge-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 512 2008-08-22 22:43 boot.0803
-rw-r--r-- 1 root root 137 2008-08-22 22:42 boot_message.txt
lrwxrwxrwx 1 root root 28 2008-08-22 22:42 config -> config-huge-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 83612 2008-08-27 02:33 config-custom
-rw-r--r-- 1 root root 82369 2008-04-30 15:02 config-generic-2.6.24.5
-rw-r--r-- 1 root root 82657 2008-04-30 14:19 config-generic-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 82208 2008-04-30 15:15 config-huge-2.6.24.5
-rw-r--r-- 1 root root 39842 2008-08-27 00:20 config-huge-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 5040 2008-04-01 03:39 diag1.img
drwxr-xr-x 10 root root 4096 2008-08-28 16:01 initrd-tree
-rw-r--r-- 1 root root 789616 2008-08-28 16:01 initrd.gz
-rw------- 1 root root 160256 2008-08-28 16:13 map
-rw-r--r-- 1 root root 15754 2008-02-21 19:08 slack.bmp
lrwxrwxrwx 1 root root 26 2008-08-26 20:27 system.map -> system.map-custom-2.6.24.5
-rw-r--r-- 1 root root 1262776 2008-08-27 01:25 vmlinuz
-rw-r--r-- 1 root root 3980184 2008-08-27 02:31 vmlinuz-custom
-rw-r--r-- 1 root root 2055544 2008-04-30 15:02 vmlinuz-generic-2.6.24.5
-rw-r--r-- 1 root root 2167384 2008-04-30 14:19 vmlinuz-generic-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 4205208 2008-04-30 15:15 vmlinuz-huge-2.6.24.5
-rw-r--r-- 1 root root 4369880 2008-04-30 14:42 vmlinuz-huge-smp-2.6.24.5-smp
-rw-r--r-- 1 root root 1351288 2008-08-27 00:19 vmlinuz.old
root@slack-1:/home/rick#
i hope this provides an answer.
Rick
 
Old 08-28-2008, 09:22 PM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
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 ?
 
Old 08-30-2008, 10:50 AM   #9
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
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
 
Old 08-30-2008, 11:55 AM   #10
rixtr66
Member
 
Registered: Aug 2008
Location: Portland,ME.
Distribution: Slackware
Posts: 102

Original Poster
Rep: Reputation: 15
ok i cant get the wifi in slackware working right now,but i pasted the results to the desktop and copied them from ubuntu.
here are the out puts;

root@slack-1:/home/rick# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d8a1f

Device Boot Start End Blocks Id System
/dev/sda1 1 4664 37463548+ 83 Linux
/dev/sda2 9328 9729 3229065 5 Extended
/dev/sda3 * 4665 9047 35206447+ 83 Linux
/dev/sda4 9048 9327 2249100 82 Linux swap
/dev/sda5 9328 9729 3229033+ 82 Linux swap

Partition table entries are not in disk order
root@slack-1:/home/rick#
and here is the other;

root@slack-1:/home/rick# cat /etc/fstab
/dev/sda4 swap swap defaults 0 0
/dev/sda3 / ext3 defaults 1 1
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
root@slack-1:/home/rick#

hope this helps!
Rick
 
Old 08-30-2008, 12:06 PM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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)
 
Old 08-30-2008, 01:31 PM   #12
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
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.
 
Old 08-30-2008, 02:36 PM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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)
 
Old 04-14-2016, 06:39 PM   #14
alberich
Member
 
Registered: Apr 2016
Location: Bavaria
Distribution: Slackware
Posts: 140

Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
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)
Thanks, I was wondering about that.

I also made the initrd for Slackware generic kernel. http://ftp.swin.edu.au/slackware/sla.../README.initrd

But I want to keep a whole load of kernels in future in case.

At first I made a Recovery boot mode http://docs.slackware.com/howtos:sla...ry_boot_option

I backed up whole /boot/ aditionally, also /lib/.

I had trouble twice because I failed to handle the fact that I was compiling for the very version of the running Kernel.

The second time I renamed the kernel source folder, but the scripts won't make anything out of that. It's necessary to activate CONFIG_LOCALVERSION string, so the modules won't be messed with.
http://docs.slackware.com/slackbook:linux_kernel
http://docs.slackware.com/howtos:sla...kernelbuilding

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.
 
Old 04-15-2016, 05:41 AM   #15
alberich
Member
 
Registered: Apr 2016
Location: Bavaria
Distribution: Slackware
Posts: 140

Rep: Reputation: Disabled
I found out to handle mkinitrd and initrd with multiple initrd-enabled kernels in /boot/

Good info: http://majek.mamy.to/en/initrd-in-slackware/

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.

Last edited by alberich; 04-15-2016 at 06:23 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubles using cron+tar for automated backup magli Linux - Software 18 07-14-2009 05:40 PM
How To Dual Boot Win Xp And Suse 10.2 Without Making Troubles ? DOTT.EVARISTI Linux - Software 1 04-05-2007 05:40 AM
Making a Backup Harddrive mepenn Fedora 4 01-27-2007 11:45 AM
Tape backup troubles... Argh WorldBuilder Linux - General 6 03-19-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration