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 <duanlg@live.cn>
This commit is contained in:
Gary Duan 2015-08-25 16:29:37 +08:00
parent 626bf5d68e
commit 398494568a
1 changed files with 1 additions and 1 deletions

View File

@ -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