diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-03-24 19:59:46 +0000 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-03-24 19:59:46 +0000 |
commit | 07c7133ce8b132e8eb2267cd48433f1ed3bf1518 (patch) | |
tree | 5f213f17653032689a8eee48bcf6ff974e5be79a | |
parent | b2bdc7785526cad341e7b336de013ca1890a5c26 (diff) |
generate system initramfs during iso creation
-rwxr-xr-x | iso32 | 6 | ||||
-rwxr-xr-x | iso64 | 6 | ||||
-rwxr-xr-x | libvasile | 14 | ||||
-rwxr-xr-x | vasile | 10 |
4 files changed, 28 insertions, 8 deletions
@@ -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 @@ -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 @@ -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 () { @@ -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 |