[CentOS] kernel 2.6.9-42.0.2.plus.c4 not working properly(2.6.9-34.108.plus.c4

Fri Sep 8 02:37:59 UTC 2006
John Summerfield <debian at herakles.homelinux.org>

Alok Garg wrote:
> I also have 2 ntfs partiotions that i need to access. I dont think 
> statndard
> kernel will support them. Is there any other way of adding xfs support to
> plus kernel.
> 
>
What I have been doing on FC3 on my laptop where I need to read NTFS is 
to build my own kernel from the official src.rpm with a script imilar to 
this (the latest is probably on my laptop, and that's packed up ready to 
go):

Beware of probably line-wraps;
---- cut -----
#!/bin/bash
set -xe
rpmbuild=rpmbuild\ --define\ "_topdir${HOME}/redhat"
rpm=rpm\ --define\ "_topdir${HOME}/redhat"
if [ -n "$1" ] ; then
	K=$1
else
	K=$(dir -d1rt ~/Fedora/kernel*src.rpm 
~/RH/FC3/updates/SRPMS/kernel*src.rpm  | tail -1)
fi
DirName=$(rpm -qp --qf '%{name}-%{version}\n' ${K})
${rpm} -i ${K}
date=$(date "+%a %b %d %Y")
sed -r <redhat/SPECS/kernel-2.6.spec >redhat/SPECS/kernel-2.6-dl.spec \
	-e 's=FC\>=dl=g'		\
	-e 's=FC2\>=dl2=g'	\
	-e 's=FC3\>=dl3=g'	\
	-e 's=%define builddoc 0=%define builddoc 1=' \
	-e "s=%changelog=%changelog\n* ${date} John Summerfield 
<summer at herakles.homelinux.org>\n- autobuild for dl  %{release}\n="
:
:
:
:
diff -u redhat/SPECS/kernel-2.6.spec redhat/SPECS/kernel-2.6-dl.spec || :
${rpmbuild} -bp --target i686 redhat/SPECS/kernel-2.6-dl.spec

echo Fixing configs
(
	set -x
	cd $(find ~/redhat -type d -name ${DirName})/lin*
	ls -la
	for f in configs/*.config
		do :
			make -s mrproper
			sed <   $f >.config \
				-e 's+# CONFIG_NTFS_FS is not 
set+CONFIG_NTFS_FS=m\nCONFIG_NTFS_DEBUG=n\nCONFIG_NTFS_RW=y+'

			grep -q 'CONFIG_NTFS_FS is not set' .config && exit
			grep -4 NTFS .config
#			make -s oldconfig
			cp -bvp .config ~/redhat/SOURCES/$(basename $f)
			head -9 $f .config ~/redhat/SOURCES/$(basename $f)
			mv -b .config $f
		done
	)

echo Fixed configs

BO="-ba"
for arch in i686
	do :
		 ${rpmbuild} ${BO}  --clean --target ${arch} 
redhat/SPECS/kernel-2.6-dl.spec
		 BO="-bb --rmsource"
	done
---- cut ----

It's way more elaborate than you need, and you, of course, wll need to 
add xfs.

You could also turn stuff off if you wish, but I'd not demodularise it 
lest initscripts breaks.



-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/

Please do not reply off-list