You are not logged in.
Pages: 1
Hello together,
to speed up my old notebook I compiled a zen kernel (using PKGBUILD), but when I try to boot it, the following failure appears:
"Kernel panic - not syncing: No init found. Try passing init=option to kernel [..]"
When passing init=/sbin/init:
"Failed to execute /sbin/init"
I really hope somebody is able to help me, google wasn't. Thanks!
Offline
For some reason PKGBUILDs of the zen kernels use their own mkinitcpio config files - might be your problem.
Offline
Thank you for the fast answer.
If that's the problem, what should I do to fix this?
Offline
Compare /etc/mkinitcpio.conf and /etc/mkinitcpio-zen.conf. You can run "mkinitcpio -k 2.6.34-ZEN -c /etc/mkinitcpio.conf -g /boot/kernel26-zen.img" to build a mkinitcpio image for the zen kernel using mkinitcpio.conf.
Did you change the config file from AUR in any way? If it's not mkinitcpio's fault, then maybe you removed too much from the config.
Offline
Thanks a lot. Output:
niklas@nikis-laptop ~ % sudo mkinitcpio -k 2.6.34-ZEN -c /etc/mkinitcpio.conf -g /boot/kernel26-zen.img
Passwort:
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
FATAL: Could not load /lib/modules/2.6.34-ZEN/modules.dep: No such file or directory
find: "/lib/modules/2.6.34-ZEN": No such file or directory
FATAL: Could not load /lib/modules/2.6.34-ZEN/modules.dep: No such file or directory
find: "/lib/modules/2.6.34-ZEN": No such file or directory
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [filesystems]
:: Generating image '/boot/kernel26-zen.img'...SUCCESS
Content of /lib/modules:
2.6.34
2.6.34-ARCH
I used the zen-kernel-seed and modified it to work with my system. Maybe I didn't include all necessary drivers, I'll check that.
Offline
Apparently, your zen kernel is called 2.6.34, not 2.6.34-ZEN. You can pacman -Ql package_name_of_the_zen_kernel to see its files.
What AUR or ABS "package" did you use to build your kernel?
Offline
mkinitcpio worked, but I still can't boot correctly (same failure).
I used http://aur.archlinux.org/packages.php?ID=30330 + the BFQ patches like described in the comments.
When I missed some drivers, can you give me a hint where I've got to look for? I used the zen-seed & lspci -n & http://kmuto.jp/debian/hcl/ when I was building the config. Once again, thank you for the help.
Offline
You're probably missing something which has to do with the disk/disk controller. You can use "localmodconfig" instead of "menuconfig" or similar to get a config crafted for your computer.
Offline
Ok, I changed menuconfig to localmodconfig, compiled, and it's the same as before. "Kernel Panic [..]".
My PKGBUILD:
# Contributor: Lex Rivera aka x-demon <aur@x-demon.org>
# Maintainer: Lex Rivera aka x-demon <aur@x-demon.org>
pkgname=kernel26-zen
pkgver=2.6.34
_basever=2.6.34
_zenver=1
_archver=1
pkgrel=1
pkgdesc="The Linux Kernel and modules with stable ZEN patch (non-git)"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://zen-kernel.org"
provides=(kernel26=${pkgver})
backup=('etc/mkinitcpio.d/${pkgname}.preset' 'etc/mkinitcpio.d/${pkgname}-fallback.conf' 'etc/mkinitcpio-zen.conf')
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio')
makedepends=('xz-utils')
optdepends=('crda: to set the correct wireless channels of your country')
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500')
install=kernel26-zen.install
### User defined variables ####
_menuconfig="1" #
_keep_source_code="0" #
_zen_patch="1" #
_arch_patch="0" #
###############################
source=(http://www.kernel.org/pub/linux/kernel/v2.6/linux-${_basever}.tar.bz2
# ZEN patches
[url]http://downloads.zen-kernel.org/${_basever}/${_basever}-zen${_zenver}.patch.lzma[/url]
[url]http://algo.ing.unimo.it/people/paolo/disk_sched/patches/2.6.34-zen1/0001-block-prepare-I-O-context-code-for-BFQ.patch[/url]
[url]http://algo.ing.unimo.it/people/paolo/disk_sched/patches/2.6.34-zen1/0002-block-add-cgroups-kconfig-and-build-bits-for-BFQ.patch[/url]
[url]http://algo.ing.unimo.it/people/paolo/disk_sched/patches/2.6.34-zen1/0003-block-introduce-the-BFQ-I-O-scheduler.patch[/url]
# configurations
config
config.x86_64
${pkgname}.preset
mkinitcpio-${pkgname}.conf)
md5sums=('10eebcb0178fb4540e2165bfd7efc7ad'
'91f1bd0cbff61ebbc379e76667cc0070'
'f675ee850b0aab8c6c1f334604a60b87' # BFQ1
'cbe4ca99568682bb120a3c1c0638858a' # BFQ2
'341209b854e5ef4fcd515b44efa0d66c' # BFQ3
'36137735314f869aae68d0ce0955c019' # config
'4a496d5ee8025f123a4be6d3184cf2b9'
'0ab28c6ef83545539d7282fd1e249d00'
'deeade3bcf70f4a13beeca6c3287c7ca')
build() {
KARCH=x86
cd ${srcdir}/linux-${_basever} || return 1
# Applying ZEN patch
if [ "$_zen_patch" == "1" ]; then
echo "Applying ${_basever}-zen${_zenver}.patch"
lzma -df ${srcdir}/${_basever}-zen${_zenver}.patch.lzma
cd ${srcdir}/linux-${_basever} || return 1
patch -Np1 -i ${srcdir}/${_basever}-zen${_zenver}.patch || return 1
fi
# Applying ZEN drm-next patch
if [ "$_arch_patch" == "1" ]; then
echo "Applying patch-${pkgver}-${_archver}-ARCH"
cd ${srcdir}/linux-${_basever} || return 1
patch -Np1 -i ${srcdir}/patch-${pkgver}-${_archver}-ARCH || return 1
fi
patch -Np1 -i ${srcdir}/0001-block-prepare-I-O-context-code-for-BFQ.patch || return 1
patch -Np1 -i ${srcdir}/0002-block-add-cgroups-kconfig-and-build-bits-for-BFQ.patch || return 1
patch -Np1 -i ${srcdir}/0003-block-introduce-the-BFQ-I-O-scheduler.patch || return 1
# remove extraversion
sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile
# load configuration for i686 or x86_64
if [ "$CARCH" = "x86_64" ]; then
cat ../config.x86_64 > ./.config
else
cat ../config > ./.config
fi
# get kernel version
make prepare
_kernver="$(make kernelrelease)"
# configure kernel
if [ "$_menuconfig" = "1" ]; then
make localmodconfig
fi
yes "" | make config
# fuck CONFIG_LOCALVERSION_AUTO!
sed -i 's|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|' .config
if [ "$_keep_source_code" = "1" ]; then
echo -n "Copying source code..."
# Keep the source code
cd ${startdir} || return 1
mkdir -p ${pkgdir}/usr/src || return 1
cp -a ${srcdir}/linux-${_basever} ${pkgdir}/usr/src/linux-${_kernver} || return 1
#Add a link from the modules directory
mkdir -p ${pkgdir}/lib/modules/${_kernver} || return 1
cd ${pkgdir}/lib/modules/${_kernver} || return 1
rm -Rf source
ln -s ../../../usr/src/linux-${_kernver} source || return 1
echo "OK"
fi
cd ${srcdir}/linux-${_basever}
# build kernel
make bzImage modules || return 1
mkdir -p ${pkgdir}/{lib/modules,boot}
make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1
install -D -m644 System.map ${pkgdir}/boot/System.map26-zen
install -D -m644 arch/${KARCH}/boot/bzImage ${pkgdir}/boot/vmlinuz26-zen
install -D -m644 Makefile ${pkgdir}/usr/src/linux-${_kernver}/Makefile
install -D -m644 kernel/Makefile ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
install -D -m644 .config ${pkgdir}/usr/src/linux-${_kernver}/.config
install -D -m644 .config ${pkgdir}/boot/kconfig26-zen
install -D -m644 vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
#install teh headers!
mkdir -p ${pkgdir}/lib/modules/${_kernver}
cd ${pkgdir}/lib/modules/${_kernver}
rm -f source build
ln -sf ../../../usr/src/linux-${_kernver} build
cd ${srcdir}/linux-$_basever
install -D -m644 Makefile \
${pkgdir}/usr/src/linux-${_kernver}/Makefile
install -D -m644 kernel/Makefile \
${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
install -D -m644 .config \
${pkgdir}/usr/src/linux-${_kernver}/.config
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
done
# copy arch includes for external modules
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
# fix permissions on scripts dir
chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
if [ "$CARCH" = "i686" ]; then
cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
fi
cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
# add headers for lirc package
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
done
# add docbook makefile
install -D -m644 Documentation/DocBook/Makefile \
${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
# add dm headers
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
# add inotify.h
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
# add wireless headers
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
# add dvb headers for external modules
# in reference to:
# [url]http://bugs.archlinux.org/task/9912[/url]
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
# add dvb headers for external modules
# in reference to:
# [url]http://bugs.archlinux.org/task/11194[/url]
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
# add dvb headers for [url]http://mcentral.de/hg/~mrec/em28xx-new[/url]
# in reference to:
# [url]http://bugs.archlinux.org/task/13146[/url]
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
# add xfs and shmem for aufs building
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
# add headers vor virtualbox
# in reference to:
# [url]http://bugs.archlinux.org/task/14568[/url]
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
# add headers for broadcom wl
# in reference to:
# [url]http://bugs.archlinux.org/task/14568[/url]
cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
# copy in Kconfig files
for i in `find . -name "Kconfig*"`; do
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
done
chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
# remove unneeded architectures
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
# install fallback mkinitcpio-kernel26-zen.conf file and preset file for kernel
install -m644 -D ${srcdir}/${pkgname}.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset || return 1
install -m644 -D ${srcdir}/mkinitcpio-${pkgname}.conf ${pkgdir}/etc/mkinitcpio-zen.conf || return 1
# set correct depmod command for install
sed \
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${pkgname}/g" \
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-i ${startdir}/${pkgname}.install
sed \
-e "s|source .*|source /etc/mkinitcpio.d/${pkgname}.kver|g" \
-e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
-e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
-i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
if [ "$_keep_source_code" = "0" ]; then
# remove unneeded architectures
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
fi
# Delete firmware directory
rm -rf ${pkgdir}/lib/firmware
}
And when I'm compiling, it always aborts at
cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
'cause there are no files in /src/include/config/dvb/. I copied the ones from my kernel-header and it works fine, but I thought maybe this has something to do with my problem.
I appreciate your help.
Offline
If it aborts, then it doesn't finish creating the package...? If it finishes correctly and pacman -Ql kernel26-zen shows similar stuff pacman -Ql kernel26 would show and you have proper entry in menu.lst, I don't know what's the problem.
I can give you my kernel26-zen-2.6.34-1-i686.pkg.tar.gz package if you want (and use i686), built with a more or less stock config. You can also just try building the package as it is in AUR, without modifying the config.
Offline
WeeMan - please use forum code tags, not quote tags, when posting PKGBUILDs etc.
I have fixed it for you this time.
Offline
Sorry for that, I did not now the scrollbar only shows up when using the code-tag.
My menu.lst file:
# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst
# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,1)
# /dev/sda3 (hd0,2)
#
# FRAMEBUFFER RESOLUTION SETTINGS
# +-------------------------------------------------+
# | 640x480 800x600 1024x768 1280x1024
# ----+--------------------------------------------
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
# +-------------------------------------------------+
# for more details and different resolutions see
# [url]http://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution[/url]
# general configuration:
timeout 5
default 0
color light-blue/black light-cyan/blue
# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*
# (0) Arch Linux
title Arch Linux Zen Kernel
root (hd0,0)
kernel /vmlinuz26-zen root=/dev/sda1 ro vga=791
initrd /kernel26-zen.img
# (1) Arch Linux
title Arch Linux Zen Kernel Fallback
root (hd0,0)
kernel /vmlinuz26-zen root=/dev/sda1 ro vga=791
initrd /kernel26-zen-fallback.img
# (2) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/0e005641-5ab2-4dfd-b820-6efea6e48391 ro vga=791
initrd /kernel26.img
# (3) Arch Linux
title Arch Linux Fallback
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/0e005641-5ab2-4dfd-b820-6efea6e48391 ro vga=791
initrd /kernel26-fallback.img
Offline
Are you positive your root partition is on /dev/sda1? You could try root=/dev/disk/by-uuid/0e005641-5ab2-4dfd-b820-6efea6e48391 instead, as in the stock kernel entry.
Offline
Yes, /dev/sda1 is my root partition, but I changed menu.lst and rebooted:
VFS: Can not open root device "dev/disk/by-uuid/0e005641-5ab2-4dfd-b820-6efea6e48391" or unknown-block(0,0)
Please append a correct root boot option; here are the available partitions:
0800 19535040 sda driver sd
9891 104391 sda1
[..]
It's like somebody doesn't want me to switch the kernel :-D.
Offline
whenever I tried to have the zen kernel build via packer or PKGBUILD it always failed
finally i compiled it myself
Here is the 2.6.34 zen kernel source I use; they are livecd kernel kits with source
http://multidistro.com/NFLUXNEW/SQ4/kki … -arch.html
if you just want kernel source its here;
http://multidistro.com/NFLUXNEW/SQ4/kkits/x86.html
works great on both ARCH and slackware!
Offline
Does it already include BFQ? If not, how can I patch the source to use it?
Thanks a lot for all the help.
Offline
no, I think it doesn't as it is now, the source .config in mine is setup for everything
just do
make menuconfig and choose whatever
it is the same exact kernel source from AUR
however; I found these bfq patches for it
http://algo.ing.unimo.it/people/paolo/d … 6.34-zen1/
Last edited by 72linus (2010-08-18 11:09:03)
Offline
ok, so I just applied the patches and am gonna compil kernel
patch -p1 < ../0001-block-prepare-I-O-context-code-for-BFQ.patch
patch -p1 < ../0002-block-add-cgroups-kconfig-and-build-bits-for-BFQ.patch
patch -p1 < ../0003-block-introduce-the-BFQ-I-O-scheduler.patch
and i adjust the IO Schedulers section of kernel and set bfq to y??
thats what i did
is bfq that much better than cfq or what?
Offline
Got things working. I compiled from source und used localmodconfig, not as lightweight as i wanted but ok.
Thanks for all the help!
[SOLVED]
Last edited by WeeMan (2010-08-29 11:18:36)
Offline
Pages: 1