Messages in this thread Patch in this message |  | | From | Arnd Bergmann <> | Subject | Re: klibc update | Date | Thu, 06 Feb 2003 02:45:24 +0100 |
| |
Greg KH wrote:
> Any help with trying to debug init/initramfs.c to figure out what is > going wrong would be greatly appreciated.
I've managed to mount the initramfs with MS_BIND into my root fs and found why /sbin/hotplug cannot be run currently. There is some off-by-one bug during file extraction that causes the first byte of the file to get left out. I.e. the file starts with "ELF\001" instead of "\577ELF".
This may or may not be related to another off-by-one bug that I'm seeing sometime when unpacking initramfs on s390x ("panic: length error").
The patch below is how I hacked prepare_namespace() to keep initramfs visible after boot.
Arnd <><
--- 1.33/init/do_mounts.c Sun Jan 5 16:28:41 2003 +++ edited/init/do_mounts.c Thu Feb 6 01:12:29 2003 @@ -892,6 +892,7 @@ mount_root(); out: sys_umount("/dev", 0); + sys_mount("/", "./initrd", NULL, MS_BIND, NULL); sys_mount(".", "/", NULL, MS_MOVE, NULL); sys_chroot("."); security_sb_post_mountroot(); --- 1.33/fs/namespace.c Thu Nov 28 00:11:14 2002 +++ edited/fs/namespace.c Thu Feb 6 01:59:20 2003 @@ -460,7 +460,7 @@ { int err; if (mnt->mnt_sb->s_flags & MS_NOUSER) - return -EINVAL; + ; // return -EINVAL; if (S_ISDIR(nd->dentry->d_inode->i_mode) != S_ISDIR(mnt->mnt_root->d_inode->i_mode)) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |