From 398494568a5bcfebc25ba2cef79830353afb8ac9 Mon Sep 17 00:00:00 2001 From: Gary Duan Date: Tue, 25 Aug 2015 16:29:37 +0800 Subject: [PATCH] Contains the directory name of /sys and /proc When a ubuntu/IPA ramdisk is used to boot a baremetal machine with ironic agent-ilo driver, it fails at the point of mounting /proc and /sys. After the vmlinuz(kernel) is started and it tries to load the partitions on ramdisk. It need the directory of "/sys" and "/proc" to mount the corresponding filesystems. In order to fix this issue, the directories of "sys" and "proc" are retained but the subdirectories or files under them are empty. With this change, the directories of "/sys" and "/proc" shows up in the ramdisk and kernel will mount sys and proc filesystems on them respectively. Closes-Bug: #1488445 Change-Id: Iad5d62f373b73789118f23db4c932ea6e9a784c3 Signed-off-by: Gary Duan --- elements/ironic-agent/cleanup.d/99-ramdisk-create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/ironic-agent/cleanup.d/99-ramdisk-create b/elements/ironic-agent/cleanup.d/99-ramdisk-create index 7f8fcdbe..ae83338c 100755 --- a/elements/ironic-agent/cleanup.d/99-ramdisk-create +++ b/elements/ironic-agent/cleanup.d/99-ramdisk-create @@ -21,7 +21,7 @@ sudo ln -s ./sbin/init ./ # Remove python object files, they're not particularly useful for a ramdisk sudo find . -name "*.pyc" -or -name "*.pyo" -delete -sudo find . -path ./sys -prune -o -path ./proc -prune -o -path './tmp/*' -prune -o -path './boot/*' -prune -o -path './root/*' -prune -o -path './usr/lib/locale/*' -prune -o -path './usr/share/doc/*' -prune -o -path './usr/share/man/*' -prune -o -path './usr/share/info/*' -prune -o -path './usr/share/licenses/*' -prune -o -path './usr/share/misc/*' -prune -o -print | sudo cpio -o -H newc | gzip > ${IMAGE_PATH}.initramfs +sudo find . -path './sys/*' -prune -o -path './proc/*' -prune -o -path './tmp/*' -prune -o -path './boot/*' -prune -o -path './root/*' -prune -o -path './usr/lib/locale/*' -prune -o -path './usr/share/doc/*' -prune -o -path './usr/share/man/*' -prune -o -path './usr/share/info/*' -prune -o -path './usr/share/licenses/*' -prune -o -path './usr/share/misc/*' -prune -o -print | sudo cpio -o -H newc | gzip > ${IMAGE_PATH}.initramfs select_boot_kernel_initrd $TARGET_ROOT sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.kernel