summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-03-24 19:59:46 +0000
committerV3n3RiX <venerix@rogentos.ro>2016-03-24 19:59:46 +0000
commit07c7133ce8b132e8eb2267cd48433f1ed3bf1518 (patch)
tree5f213f17653032689a8eee48bcf6ff974e5be79a
parentb2bdc7785526cad341e7b336de013ca1890a5c26 (diff)
generate system initramfs during iso creation
-rwxr-xr-xiso326
-rwxr-xr-xiso646
-rwxr-xr-xlibvasile14
-rwxr-xr-xvasile10
4 files changed, 28 insertions, 8 deletions
diff --git a/iso32 b/iso32
index 7b12ef8..f8e132b 100755
--- a/iso32
+++ b/iso32
@@ -27,8 +27,12 @@ prepareisox86 () {
isostartx86
isoramfsx86
isostopx86
+ # generate system initramfs
+ isostartx86
+ systemramfsx86
+ isostopx86
# copy live initramfs
- mv ""$isosyncdirx86"/boot/"$isoramfsname"" ""$isorootdirx86"/boot/initrd"
+ mv ""$isosyncdirx86"/boot/"$isodracutrd"" ""$isorootdirx86"/boot/initrd"
# configure portage && give up control for package / desktop environment installation
isostartx86
isooverlaysx86
diff --git a/iso64 b/iso64
index e35b627..462c67b 100755
--- a/iso64
+++ b/iso64
@@ -28,8 +28,12 @@ prepareisox64 () {
isostartx64
isoramfsx64
isostopx64
+ # generate system initramfs
+ isostartx64
+ systemramfsx64
+ isostopx64
# copy live initramfs into cdroot
- mv ""$isosyncdirx64"/boot/"$isoramfsname"" ""$isorootdirx64"/boot/initrd"
+ mv ""$isosyncdirx64"/boot/"$isodracutrd"" ""$isorootdirx64"/boot/initrd"
# generate live efi image
isostartx64
isoefiimgx64
diff --git a/libvasile b/libvasile
index 1029690..e0a4ec9 100755
--- a/libvasile
+++ b/libvasile
@@ -282,11 +282,15 @@ isobuildsystemx64 () {
}
isoramfsx64 () {
- chroot "$isosyncdirx64" su - "$isouser" -c "$isoramfs"
+ chroot "$isosyncdirx64" su - "$isouser" -c "$isodracutcmd"
+}
+
+systemramfsx64 () {
+ chroot "$isosyncdirx64" su - "$isouser" -c "$dracutcmdx64"
}
isoefiimgx64 () {
- chroot "$isosyncdirx64" su - "$isouser" -c "$isoefiimg"
+ chroot "$isosyncdirx64" su - "$isouser" -c "$isoeficmd"
}
isochrootx64 () {
@@ -338,7 +342,11 @@ isobuildsystemx86 () {
}
isoramfsx86 () {
- linux32 chroot "$isosyncdirx86" su - "$isouser" -c "$isoramfs"
+ linux32 chroot "$isosyncdirx86" su - "$isouser" -c "$isodracutcmd"
+}
+
+systemramfsx86 () {
+ linux32 chroot "$isosyncdirx86" su - "$isouser" -c "dracutcmdx86"
}
isochrootx86 () {
diff --git a/vasile b/vasile
index 965b717..36005e7 100755
--- a/vasile
+++ b/vasile
@@ -62,9 +62,9 @@ export local isobuildgit="cd /opt && git clone https://gitlab.com/"$releasename"
export local isoportageconfig="ln -sf /opt/"$releasename"-build/conf/intel/portage /etc/portage"
export local isoenvupdate="/usr/sbin/env-update && . /etc/profile"
export local isoprofile="eselect profile set 1"
-export local isoramfs="dracut -N -a dmsquash-live -a pollcdrom -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver""
-export local isoramfsname="initramfs-"$kernelver".img"
-export local isoefiimg="grub2-mkimage -d /usr/lib64/grub/x86_64-efi -o bootx64.efi -O x86_64-efi ext2 fat udf btrfs ntfs reiserfs xfs hfsplus lvm ata part_msdos part_gpt part_apple bsd search_fs_uuid normal chain iso9660 configfile help loadenv reboot cat search memdisk tar boot linux chain"
+export local isodracutcmd="dracut -N -a dmsquash-live -a pollcdrom -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver""
+export local isodracutrd="initramfs-"$kernelver".img"
+export local isoeficmd="grub2-mkimage -d /usr/lib64/grub/x86_64-efi -o bootx64.efi -O x86_64-efi ext2 fat udf btrfs ntfs reiserfs xfs hfsplus lvm ata part_msdos part_gpt part_apple bsd search_fs_uuid normal chain iso9660 configfile help loadenv reboot cat search memdisk tar boot linux chain"
# x64 specific build variables
@@ -91,6 +91,8 @@ export local isoliveosdirx64=""$isorootdirx64"/LiveOS"
export local isosyncdirx64=""$isorootdirx64"/rootfs"
export local isobootdirx64=""$isorootdirx64"/boot/grub"
export local isoefibootdirx64=""$isorootdirx64"/efi/boot"
+export local dracutrdx64="initramfs-genkernel-"$isomainarchx64"-"$kernelver""
+export local dracutcmdx64="dracut -N -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver" "$dracutrdx64""
# x86 specific iso variables
@@ -104,6 +106,8 @@ export local isolivesqfsdirx86=""$isosupersquashdirx86"/LiveOS"
export local isoliveosdirx86=""$isorootdirx86"/LiveOS"
export local isosyncdirx86=""$isorootdirx86"/rootfs"
export local isobootdirx86=""$isorootdirx86"/boot/grub"
+export local dracutrdx86="initramfs-genkernel-"$isomainarchx86"-"$kernelver""
+export local dracutcmdx86="dracut -N -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --force --kver "$kernelver" "$dracutrdx86""
source /usr/lib/vasile/libvasile