You are not logged in.
Pages: 1
Issue: kernel panic "no init found". Kernel and initrd were loading but kernel was unable to run the init inside initrd.
Background: arch setup as nfs diskless client - after an upgrade the system would kernel panic. When I extracted the initramfs-linux.img I found that the files had lost their executable bits - especially /init
....
drwxr-xr-x 2 root root 27 2011-11-08 16:06 hooks
-rw------- 1 root root 3512 2011-11-08 16:06 init
-rw------- 1 root root 5021 2011-11-08 16:06 init_functions
drwxr-xr-x 5 root root 4096 2011-11-08 16:06 lib
drwxr-xr-x 2 root root 6 2011-11-08 16:06 new_root
....
root@server# ll sbin
total 308
-rw------- 1 root root 30472 2011-11-08 16:06 blkid
-rw------- 1 root root 128776 2011-11-08 16:06 modprobe
-rw------- 1 root root 149380 2011-11-08 16:06 udevadm
root@server# ll bin
total 368
-rw------- 1 root root 338548 2011-11-08 16:06 busybox
-rw------- 1 root root 19936 2011-11-08 16:06 ipconfig
-rw------- 1 root root 15228 2011-11-08 16:06 nfsmount
Fixed by editing /sbin/mkinitcpio and changing bsdcpio to regular cpio around line 358:
===========
bsdcpio $( (( QUIET )) && echo '--quiet' ) -0oH newc |
== changed to ==
cpio $( (( QUIET )) && echo '--quiet' ) -0oH newc |
===========
My guess is bsdcpio doesn't work well on nfs root filesystem???
Offline
Hmmm... to be honest, I have no idea. What kind of mount options are on the root? Can you reproduce this for a single file? e.g.
$ printf '/usr/bin/pacman\0' | bsdcpio -0oH newc > foo
$ bsdcpio -iv --quiet --list < fooI'd be curious to see a stack trace of the bsdcpio operation in this case if it does fail... I'm trying to follow bsdcpio back into libarchive and not really getting a feel for where the perms come from when it writes to the archive.
In the end, it'd be awfully nice of you to bring this up with libarchive upstream since I don't have an easy way to reproducing this. I chose bsdcpio over cpio because libarchive is already installed on 100% of Arch machines.
Last edited by falconindy (2011-11-09 01:53:48)
Offline
For reference, upstream is usually really responsive if you give them a good report. If you can narrow this down to a couple of commands to reproduce that would be the most ideal situation, and then file an issue here: http://code.google.com/p/libarchive/issues/list
Offline
Pages: 1