Hello, There seems to be problem in the cpio unpack in the kernel in initramfs. I have an empty "/sys" directory in my cpio archive, but it never shows up in my extracted initramfs. I've confirmed that extracting the archive again with cpio results in a correct tree, but it doesn't appear on boot when extracted by the kernel. Any ideas? I poked a bit, but I haven't really sat down to try to understand the cpio state machine in initramfs.c I've tried sys directories outside of / and they seem to work. I thought it might be due to having multiple empty directories in a row (alphabetically), but that doesn't seem to matter. thanks mh -- Martin Hicks Wild Open Source Inc. mort@wildopensource.com 613-266-2296
Martin Hicks wrote:>There seems to be problem in the cpio unpack in the kernel in >initramfs. I have an empty "/sys" directory in my cpio archive, but it >never shows up in my extracted initramfs. > >I've confirmed that extracting the archive again with cpio results in a >correct tree, but it doesn't appear on boot when extracted by the >kernel. > >Any ideas? > >Yep. The function name_to_dev_t in do_mounts.c creates and deletes a /sys directory to mount sysfs onto. This function is called from prepare_namespace which is called from the init function. It's also called from md_setup_drive. Putting a single empty file in there should keep the directory from being deleted but still let the temporary mount of sysfs succeed. John