FS#23467 - [mkinitcpio] 0.6.9-1: /init crashes when parsing command line parameters
Attached to Project:
Arch Linux
Opened by Karl Kochs (K4ph) - Sunday, 27 March 2011, 17:14 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 25 April 2011, 21:45 GMT
Opened by Karl Kochs (K4ph) - Sunday, 27 March 2011, 17:14 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 25 April 2011, 21:45 GMT
|
Details
Description: mkinitcpio 0.6.9-1 creates a kernel-panic after
reboot
Additional info: * package version mkinitcpio 0.6.9-1 and kernel 2.6.38.1-1 * config and/or log files etc. Steps to reproduce: installing mkinitcpio 0.6.9-1 and running mkinitcpio -p kernel26 ended in a kernal panic after reboot. Downgrading to mkinitcpio 0.6.8-2 and another mkinitcpio -p kernel26 fixed the issue. |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Monday, 25 April 2011, 21:45 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio 0.6.11-1
Monday, 25 April 2011, 21:45 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio 0.6.11-1
Maybe we can start with the symptoms: I need the full contents of the screen when the panic occurs.
:: Loading Initramfs
:: Starting udevd...
done.udev[45]: starting version 166
/init: eval: line 1: syntax error: unexpected "("
Kernel panic - not syncing: Attempted to kill init!
Pid:1, comm init Not tainted 2.6.38-ARCH #1
I downgraded to core/mkinitcpio-0.6.8-2 and it worked. mkinitcpio.conf is below (comments removed)
MODULES="ahci libahci ehci-hcd ext2 btrfs vfat crc32c"
BINARIES=""
FILES=""
HOOKS="base udev autodetect scsi sata btrfs filesystems"
EDIT: Hm, you are not the original reporter. I feel confident that he experiences the same problem though.
BOOT_IMAGE=(hd0,gpt4)/vmlinuz26 root=/dev/sda6 rootfstype=btrfs ro
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
/init: eval: line 1: syntax error: unexpected "("
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.38-ARCH #1
Call Trace:
[<ffffffff813a90d0>] ? panic+0x9b/0x1a8
[<ffffffff8105cc04>] ? do_exit+0x8a4/0x8b0
[<ffffffff8105cf4f>] ? do_group_exit+0x3f/0xa0
[<ffffffff8105cfc2>] ? sys_exit_group+0x12/0x20
[<ffffffff8100ae12>] ? system_call_fastpath+0x16/0x1b
Again, rescuebooting LTS and downgrading mkinitcpio to 0.6.8-2 and another mkinitcpio -p kernel26 fixed this for me.
linux (hd0,gpt4)/vmlinuz26 root=/dev/sda3 rootfstype=ext4 ro nomodeset
initrd (hd0,gpt4)/kernel26.img
Using
set root=(hd0,gpt4)
linux /vmlinuz26 root=/dev/sda3 rootfstype=ext4 ro nomodeset
initrd /kernel26.img
corrected the problem (ie. no brackets in the kernel commandline, otherwise /init in the initramfs fails). Dave (falconindy) pointed out http://projects.archlinux.org/mkinitcpio.git/commit/?id=42e8dba5dce4879e4a372c5c2fb5446b4e8bb16c commit to be the exact cause of the problem.
Installed from Archboot CD, but I suspect this may be true for grub2-bios in general...
It automatically setup my /boot/grub/grub.cfg as so (this is only from memory so maybe not completely right):
# (0) Arch Linux
menuentry "Arch Linux" {
search --label --no-floppy --set=root boot
linux $(boot)/vmlinuz26 root=/dev/sda3 rootflags=,subvol=master,compress=lzo rootfstype=btrfs ro radeon.modeset=1 quiet init=/bin/systemd
initrd /kernel26.img
The auto-search thing worked before one of the latest upgrades...then I got the same error as above. the '(' caused kernel panic. Fixed by simply removing the search line and the $(boot)
After installing 0.6.10-1, doing a mkinitcpio -p kernel26 (I use x86_64), I got again after a reboot the kernel panic ...
panic
do_exit
do_group_exit
sys_exit_group
system_call_fastpath
The eval is again the problem, I'll need to do more to fix this entirely.
So, I think that we need to enforce usage of octal escapes for spaces (similar to fstab), otherwise there's no sane way of parsing strings. /usr/bin/printf as well as busybox's printf both support the %b formatter mentioned below in the SO link.
http://stackoverflow.com/questions/993452/splitting-proc-cmdline-arguments-with-spaces
patching file /sbin/mkinitcpio
Hunk #1 FAILED at 31.
1 out of 1 hunk FAILED -- saving rejects to file /sbin/mkinitcpio.rej
That's what I got, trying to patch it with the 3.2 KiB patch. Am I patching it the wrong way?
Tested it first successfully with kernel26 x86_64.
After that I tested also:
kernel26-lts x86_64
kernel26-mainline x86_64
kernel26-lqx x86_64
and last but not least ...
kernel26 i686 (on my wifes netbook).
It's a solution - and it works!