676b1b738d
This element creates kernel and ramdisk files based on Fedora, example: disk-image-create -a i386 -o test fedora ironic-agent disable-selinux Change-Id: Ifa133d1680b81cb87d32a405aa7d7b40fe91f835
20 lines
440 B
Bash
Executable file
20 lines
440 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
[ -n "$TARGET_ROOT" ]
|
|
|
|
source $_LIB/img-functions
|
|
|
|
WORKDIR=$(pwd)
|
|
cd $TARGET_ROOT
|
|
|
|
echo "#disabled" > ./tmp/fstab.new
|
|
sudo mv ./tmp/fstab.new ./etc/fstab
|
|
sudo ln -s ./sbin/init ./
|
|
|
|
sudo find . -path ./sys -prune -o -path ./proc -prune -o -print | sudo cpio -o -H newc | gzip > $WORKDIR/$IMAGE_NAME.initramfs
|
|
|
|
select_boot_kernel_initrd $TARGET_ROOT
|
|
sudo cp $BOOTDIR/$KERNEL $WORKDIR/$IMAGE_NAME.vmlinuz
|