-   Linux - Newbie (
-   -   old ext2 partitions should be converted (

AwesomeMachine 09-14-2005 10:15 PM

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


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:

mkinitrd -o /boot/initrd-kernel-version<space>lib-modules-directory-for-your-new-kernel.

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


If you find this thread useful please reply

Charred 09-15-2005 04:23 AM

And it goes off the zero-replies list.

A bit of a broken pencil, don't you think?

Nevermind, I figured out the motivation behind the thread.

MensaWater 09-15-2005 08:24 AM

My kitty's breath smells like cat food.

pddm 09-15-2005 08:28 AM

How secure is it?

I have a 80GB Hard Drive with 60GB of music I would like to convert, but I am afraid I could loose it.

Has anybody tried it? How did it perform?

AwesomeMachine 09-16-2005 01:47 AM

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

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 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

All times are GMT -5. The time now is 12:52 AM.