From c4ff05e3d371b664094c337b0c224dfa1b8c32aa Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 2 Jan 2016 01:36:40 +0000 Subject: after a closer look, fedora seems to keep live rootfs as ext4, so we should do the same --- iso32 | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'iso32') diff --git a/iso32 b/iso32 index a7c0ad1..fe194f6 100755 --- a/iso32 +++ b/iso32 @@ -6,7 +6,11 @@ kernelconfig checkroot makeisox86 () { + # create an empty 15GB ext4 fs were our rootfs will stay + dd if=/dev/zero of=""$isosyncdirx86".img" bs=50M count=300 + mkfs.ext4 ""$isosyncdirx86".img" # create live iso layout + mkdir -p "$isosyncdirx86" mkdir -p "$isostagingdirx86" mkdir -p "$isobootdirx86" mkdir -p "$isoliveosdirx86" @@ -14,7 +18,9 @@ makeisox86 () { mkdir -p "$isolivesqfsdirx86" # mount && copy our core stage 4 image mount -t squashfs "$chrootx86" "$isostagingdirx86" + mount -t ext4 ""$isosyncdirx64".img" "$isosyncdirx86" rsync -aHAXr --progress "$isostagingx86/" "$isosyncdirx86/" + # copy our kernel into cdroot cp -avx ""$isosyncdirx86"/boot/"$isokernelnamex86"" ""$isorootdirx86"/boot/vmlinuz" # configure portage && give up control for package / desktop environment installation isostartx86 @@ -22,13 +28,13 @@ makeisox86 () { isobuildsystemx86 isochrootx86 isostopx86 - # squash live environment - mksquashfs "$isosyncdirx86" ""$isosyncdirx86".img" -b 1048576 -comp xz -Xdict-size 100% - # move our squashed live environment on place + # umount rootfs before compression + umount -l "$isosyncdirx86" > /dev/null 2>&1 + # move rootfs in place mv ""$isosyncdirx86".img" "$isolivesqfsdirx86" - # squash it again to be detected by dmsquash-live - mksquashfs "$isosupersquashdirx86" ""$isorootdirx86"/squashfs.img" - # and again, move our double squashed live environment on place + # squash rootfs with best compression + mksquashfs "$isosupersquashdirx86" ""$isorootdirx86"/squashfs.img" -b 1048576 -comp xz -Xdict-size 100% + # move squashed rootfs in place mv ""$isorootdirx86"/squashfs.img" "$isoliveosdirx86" } @@ -39,10 +45,11 @@ bootcorex86 () { } cleanupisox86 () { + umount "$isostagingdirx86" rm -rf "$isosyncdirx86" + rm -rf "$isostagingdirx86" rm -rf "$bootcorepath" rm -rf "$isosupersquashdirx86" - umount "$isostagingdirx86" } main () { -- cgit v1.2.3