Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
old ext2 partitions should be converted
If you use ext2 now, you can download kernel sources for your kernel, and follow the instructions for your distro to compile in ext3 support. Get the kernel sources for your distro. There should be a package called kernel sources.
cd /usr/src
tar -zxvf kernel-sources.tar.gz
or
tar -jxvf kernel-sources.tar.bz2
rm -r linux
ln -s kernel-source-directory linux
cd linux
cp /boot/config-2.x.y-ab-cd .config
make xconfig
pico Mak*
extraversion = date ##this will tail the kernel image with the date(i.e. 2.6.820050914) Then you will know for sure which files you are dealing with. The initrd-kernel-version image and the kernel image, vmlinuz-kernel-version will both wind up in /boot. If you forget the exact name, look there.
each distro has a little different way to actually compile and install a kernel. You have to find out what it is for your distro. Then you need to make an initrd image with:
Most distros will edit /boot/grub/menu.lst for the new kernel entry, but you should check.
pico /boot/grub/men*
check for a title with the new kernel. if there isn't one, you have to make it like this:
title linux-kernel-version
root hd(0,0) ##this is for the first disk, first partition. Go up one for second disk or partition.
kernel /boot/vmlinuz-kernel-version root=/dev/sda1, ro
initrd /boot/initrd-kernel-version
Please note:
This may not be exact. You can look at the entry for the old kernel, copy it, and change the title, kernel version, and initrd to what the new ones are. Leave the old one(s) there in case the new kernel doesn't work.
to convert ext2 to ext3:
tune2fs -j /dev/sda1
Change /etc/fstab line for sda1 to read ext3 instead of ext2
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Original Poster
Rep:
I've actually done it in debian with a 2.6.8 kernel. I had woody, installed the sarge kernel, and converted the filesystem. Here are the steps for a debian system to actually compile a kernel from pristine source found at kernel.org.
First of all, you should install the kernel package in debian, which most closely matches the source you will be compiling. Also, debian must have a debian kernel patches for the kernel-version you will be compiling. Debian says you cannot use the debian kernel patches with a pristine source from kernel.org. I'm not sure why they say this, but the whole purpose of the patches is to make a pristine kernel like a debian kernel.
Here is an example:
(if you are compiling a kernel with a different version than your currently running kernel)
<apt-get kernel-package-version>
reboot with the new kernel
(If you installed a 2.6.x kernel you already have ext3 support.
In that case all you need do is run the command line from the original message, and change fstab. If you are really dead set on compiling you own kernel, read on.)
put the pristine sources in the /usr/src directory.
decompress the compressed file with <tar zxvf <filename> or <tar jxvf<filename>
follow the instructions on how to do everything else to get the "linux" symbolic link, get the .config file, and configure the kernel.
If you have compiled the kernel once already you have to <make-kpkg clean>. If not, then <make-kpkg --added-patches=debian --revision=somethingunique kernel_image>.
This will make a debian kernel package with the debian patches in it. Remember, you have to install the debian kernel patches on the system first.
<cd ..>
<dpkg -i kernel-package>
<mkinitrd -o /boot/initrd.img-kernel-version kernel-version>
Then complete the steps from the original post
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.