RE: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001
Russell, et al Still a draft! Please note questions and also corrected typo in 2 libc6 !--\*#-REBUILD KERNEL#*\--! References: read (/usr/src/linux/ and this documentation may not be present if you have not previously rebuilt your kernel; they come in the kernel source package you will need to begin): /usr/src/linux/Documentation/initrd.txt /usr/src/linux/Documentation/modules.txt /usr/src/linux/README /usr/src/linux/README.Debian http://qref.sourceforge.net/Debian/reference/ch-kernel.en.html http://infocom.cqu.edu.au/Units/aut99/85321/Resources/Print_Resources/Textbo ok/chap13/ http://www.google.com/search?q=%22kernel+headers%22+linus+quotehl=enlr=ie =UTF-8start=10sa=N http://www.linuxfromscratch.org/faq/#AEN334 http://www.uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html Bear in mind that debian does things a bit differently than other distros. What is that difference? In essence, in stead of reconfiguring the kernel and replacing it directly, the reconfigured kernel is made into a package (.deb) primarily so that the rebuild will remain integrated into the debian package system so that future updates of the kernel can be made using dpkg. (I have stated this in these boldly confident terms not being sure that this is the essence at all...hoping for confirmation or education...mo) ---Step-by-Step--- [ ]1. Download the latest kernel to /usr/src/linux/kernel/ (if no /usr/src/linux/kernel dir exists, make it. Question: the kernel source package downloaded directly to /usr/src for me...is it safe to move the source tar.bz2 to /usr/src/linux (for order under src)? before unpacking it) and unpack it. [ ]2. Make sure [ ]bin86 [ ]libc6-dev [ ]debianutils [ ]make [ ]bzip2 and [ ]kernel-package are installed. [ ]3. (on 2nd and subsequent rebuilds) Copy configuration file to /usr/src/linux/kernel_version_source_directory/ [ ]4. # cd to /usr/src/linux/kernel_version_source_directory # make menuconfig and make your selections [ ]5. # make-kpkg clean # make-kpkg -revision=!--insert your own personal rebuild version number here: i.e.: -revision=0001) --initrd kernel_image [ ]6. A new kernel.version-0001_i386.deb will be placed in the /usr/src/linux directory (or one up from where the sources are held) [ ]7. Install the new kernel using # dpkg -i kernel.~.deb !--\*#--#*\--! -Original Message- From: Russell [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 13, 2002 8:20 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Kernel Panic~: Rebuild Kernel: miniHOWTO draft Michael Olds wrote: Russell, Torsten, et al: This is the method I have written up in my notes for a Debian Style Kernel Rebuild. My feeling after all this is that this is something that as hair raising as it might seem for beginners, should be one of the first things we learn, not to be delayed. It would be good if a step by step like this were made for recovering using the suggested recovery disk (including link to source) !--\*#-REBUILD KERNEL#*\--! 1. Download the latest kernel SOURCE package for your hardware architecture (i.e. PIII, 4, etc) (??what about these headers or is that only for the non-Debian way?) to /usr/src/linux/kernel/ (if no /usr/src/linux/kernel dir exists, make it) and unpack it. It's 'bad' to put things 2. Make sure bin86 lib6c-dev debianutils make bzip2 and kernel-package are installed. 3. (on 2nd and subsequent rebuilds) Copy configuration file to /usr/src/linux/kernel_version_source_directory/ 4. # cd to /usr/src/linux/kernel_version_source_directory # make menuconfig and make your selections 5. # make-kpkg clean # make-kpkg -revision=0001 --initrd kernel_image 6. A new kernel.version-0001_i386.deb will be placed in the /usr/src/linux directory (or one up from where the sources are held) 7. Install the new kernel using # dpkg -i kernel.~.deb !--\*#--#*\--! -Original Message- From: Michael Olds [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 13, 2002 6:53 AM To: Russell; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Kernel Panic was: System is too Big; son of make menuconfig Thanks Russell and Torsten, Last night I did a re-install...not a huge loss in that this is still in the learning/setup phase...and all of this was in the service of setting up some kind of backup routine. Suggestion for the KDE folk, by the way: 1. Give us a way to use just the desktop without installing all the related programs...kate, konquoror, kword, konsole...in fact the whole Linux setup should be different as far as these desktop things are concerned...we should be being given a choice of desktop setups, then for the one we choose, a second set of choices as to what to include. I don't mean that the options are there, scattered around throughout the available packages, but that we should start with a dialog about what to
RE: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001
Russel...noted and I will do a revision shortly...however I got as far as making the package with the --initrd option and managed to control my fingers long enough to read the caution about editing lilo at the end...so I have not installed my package. I am using ext3, and I am not sure if it was you, but someone this morning said I needed to go initrd. But I see my current setup using the bf24 kernel does not use initrd (or, at least it is not mentioned in lilo.conf and I can't find the image in /boot)(but the new kernel is not bf24 it is 2.4.18) But I do remember using it in the setup before the most recent install (very confused at this point). I am reading round that on a one-box system it shouldn't be needed...I do have SCSI support enabled (for scsi emulation) as a module. So the question is: do I need it, and if so, how do I go about getting it in there? Best Wishes! Mike Olds www.buddhadust.org -Original Message- From: Russell [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 13, 2002 4:38 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001 Michael Olds wrote: Russell, et al Still a draft! Please note questions and also corrected typo in 2 libc6 !--\*#-REBUILD KERNEL#*\--! References: read (/usr/src/linux/ and this documentation may not be present if you have not previously rebuilt your kernel; they come in the kernel source package you will need to begin): /usr/src/linux/Documentation/initrd.txt /usr/src/linux/Documentation/modules.txt /usr/src/linux/README /usr/src/linux/README.Debian http://qref.sourceforge.net/Debian/reference/ch-kernel.en.html http://infocom.cqu.edu.au/Units/aut99/85321/Resources/Print_Resources/Textbo ok/chap13/ http://www.google.com/search?q=%22kernel+headers%22+linus+quotehl=enlr=ie =UTF-8start=10sa=N http://www.linuxfromscratch.org/faq/#AEN334 http://www.uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html Bear in mind that debian does things a bit differently than other distros. What is that difference? In essence, in stead of reconfiguring the kernel and replacing it directly, the reconfigured kernel is made into a package (.deb) primarily so that the rebuild will remain integrated into the debian package system so that future updates of the kernel can be made using dpkg. (I have stated this in these boldly confident terms not being sure that this is the essence at all...hoping for confirmation or education...mo) The way that kernel headers are handled on a debian system may be different to other distros, so clarification would be worthwhile just to avoid confusion. ---Step-by-Step--- [ ]1. Download the latest kernel to /usr/src/linux/kernel/ (if no /usr/src/linux/kernel dir exists, make it. In the links above, Linus says it's bad to do builds in /usr/src, whereas i think the debian manual says to do it that way. An explanation for this would avoid confusion. Question: the kernel source package downloaded directly to /usr/src for me...is it safe to move the source tar.bz2 to /usr/src/linux (for order under src)? before unpacking it) and unpack it. I've been unpacking the source into /usr/src/kernel-source-2.4.18 and symlinking /usr/src/linux to /usr/src/kernel-source-2.4.18. That way, you can have multiple source trees in /usr/src and just change the /usr/src/linux symlink to the new tree. [ ]2. Make sure [ ]bin86 [ ]libc6-dev [ ]debianutils [ ]make [ ]bzip2 and [ ]kernel-package are installed. IIRC, don't use gcc 3.x, but something like gcc 2.95. [ ]3. (on 2nd and subsequent rebuilds) Copy configuration file to /usr/src/linux/kernel_version_source_directory/ Don't think that's needed. [ ]4. # cd to /usr/src/linux/kernel_version_source_directory # make menuconfig and make your selections If you're using --initrd, make sure Compressed ROM file system support is built in, or you'll get a kernel panic (need CramFS). [ ]5. # make-kpkg clean # make-kpkg -revision=!--insert your own personal rebuild version number here: i.e.: -revision=0001) --initrd kernel_image If you don't want --initrd, leave out that option, and make sure /etc/lilo.conf doesn't have it either for that build. [ ]6. A new kernel.version-0001_i386.deb will be placed in the /usr/src/linux directory (or one up from where the sources are held) [ ]7. Install the new kernel using # dpkg -i kernel.~.deb -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001
Michael Olds wrote: Russel...noted and I will do a revision shortly...however I got as far as making the package with the --initrd option and managed to control my fingers long enough to read the caution about editing lilo at the end...so I have not installed my package. I am using ext3, and I am not sure if it was you, but someone this morning said I needed to go initrd. But I see my current setup using the bf24 kernel does not use initrd (or, at least it is not mentioned in lilo.conf and I can't find the image in /boot)(but the new kernel is not bf24 it is 2.4.18) But I do remember using it in the setup before the most recent install (very confused at this point). I am reading round that on a one-box system it shouldn't be needed...I do have SCSI support enabled (for scsi emulation) as a module. So the question is: do I need it, and if so, how do I go about getting it in there? read: http://qref.sourceforge.net/Debian/reference/ch-kernel.en.html it says: mv /usr/src/linux/arch/i386/boot/bzImage to /boot/whatever name I have /usr/src/linux as a symlink to /usr/src/kernel-source-2.4.18 I'm using ext3, and you don't need initrd. IIRC, you only need initrd if your filesystem is a module and not compiled into the kernel, so at least CramFS needs to be built in if nothing else is. Backup your HDD. If you get a kernel panic because of lilo, you can usually still boot in using the downloaded debian rescue disk. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
RE: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001
Russell, Ok...I am going to remake my package...without initrd as I thought it not such a good idea to have my main file system as a module and so included it in the kernel. You say: Backup your HDD. Easy for you to say: I come from Windows where I press two buttons on Drive Image to backup my whole system. Here I have been working for a month just to try and set up so I can use partimage! Best Wishes! Mike Olds www.buddhadust.org -Original Message- From: Russell [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 13, 2002 6:12 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001 Michael Olds wrote: Russel...noted and I will do a revision shortly...however I got as far as making the package with the --initrd option and managed to control my fingers long enough to read the caution about editing lilo at the end...so I have not installed my package. I am using ext3, and I am not sure if it was you, but someone this morning said I needed to go initrd. But I see my current setup using the bf24 kernel does not use initrd (or, at least it is not mentioned in lilo.conf and I can't find the image in /boot)(but the new kernel is not bf24 it is 2.4.18) But I do remember using it in the setup before the most recent install (very confused at this point). I am reading round that on a one-box system it shouldn't be needed...I do have SCSI support enabled (for scsi emulation) as a module. So the question is: do I need it, and if so, how do I go about getting it in there? read: http://qref.sourceforge.net/Debian/reference/ch-kernel.en.html it says: mv /usr/src/linux/arch/i386/boot/bzImage to /boot/whatever name I have /usr/src/linux as a symlink to /usr/src/kernel-source-2.4.18 I'm using ext3, and you don't need initrd. IIRC, you only need initrd if your filesystem is a module and not compiled into the kernel, so at least CramFS needs to be built in if nothing else is. Backup your HDD. If you get a kernel panic because of lilo, you can usually still boot in using the downloaded debian rescue disk. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001
Michael Olds wrote: Russell, Ok...I am going to remake my package...without initrd as I thought it not such a good idea to have my main file system as a module and so included it in the kernel. You say: Backup your HDD. Easy for you to say: I come from Windows where I press two buttons on Drive Image to backup my whole system. Here I have been working for a month just to try and set up so I can use partimage! I learnt some bash scripting and made this to backup onto a removeable hard-disk (had some help from a previous poster on this group). Don't use it until you understand how it works and what it assumes. I use it from /root, and just type ./backup #!/bin/sh # Copy everything (almost) from the system to a backup removeable hard-disk # Assumptions: # The spare hard-disk has enough capacity # The spare disk is suitably partitioned and set up. # # The spare disk won't be bootable unless lilo is run separately, # which i haven't got around to doing yet # The backup /boot partition: HDD_BOOT=hdc1 # The backup root / partition: HDD_MAIN=hdc3 # Mount /boot partition if [ ! -d /mnt/bootpart ] then mkdir /mnt/bootpart fi if ! grep -qs /dev/$HDD_BOOT /proc/mounts then if ! mount -t ext2 /dev/$HDD_BOOT /mnt/bootpart then echo Removeable /dev/$HDD_BOOT not working exit 1 fi fi # Mount main partition if [ ! -d /mnt/mainpart ] then mkdir /mnt/mainpart fi if ! grep -qs /dev/$HDD_MAIN /proc/mounts then if ! mount -t ext2 /dev/$HDD_MAIN /mnt/mainpart then echo Removeable $HDD_MAIN not working exit 1 fi fi # Copy everything on main partition # Strip some top level directories we don't want to copy FILES=$( chroot / ls ) for i in $FILES do if [ -d /$i ] then echo Updating /$i else echo Updating $i fi case $i in boot) if ! rsync -a --delete /boot /mnt/bootpart then echo Failed to update /boot exit 1 fi;; cdrom) echo /$i | cpio -pdm /mnt/mainpart continue;; proc) echo /$i | cpio -pdm /mnt/mainpart continue;; floppy) echo /$i | cpio -pdm /mnt/mainpart continue;; mnt) echo /$i | cpio -pdm /mnt/mainpart continue;; esac if ! rsync -a --delete /$i /mnt/mainpart then echo Failed to update /$i exit 1 fi done echo System backup successful exit 0 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Kernel Panic~: Rebuild Kernel: miniHOWTO draft .001
Russell wrote: Michael Olds wrote: Russell, Ok...I am going to remake my package... ... echo System backup successful exit 0 I forgot to update the script. Change ext2 to ext3 if that's what you have. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]