summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-01-02 01:36:40 +0000
committerV3n3RiX <venerix@rogentos.ro>2016-01-02 01:36:40 +0000
commitc4ff05e3d371b664094c337b0c224dfa1b8c32aa (patch)
tree980d435d5d9ee2de398d8c49e7dc39a6df234697
parent1c1caee4431148fdfd6eeb74dcf0c100232506c8 (diff)
after a closer look, fedora seems to keep live rootfs as ext4, so we should do the same
-rwxr-xr-xiso3221
-rwxr-xr-xiso6421
2 files changed, 28 insertions, 14 deletions
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 () {
diff --git a/iso64 b/iso64
index 4b55ef8..364c9ac 100755
--- a/iso64
+++ b/iso64
@@ -6,7 +6,11 @@ kernelconfig
checkroot
makeisox64 () {
+ # create an empty 15GB ext4 fs were our rootfs will stay
+ dd if=/dev/zero of=""$isosyncdirx64".img" bs=50M count=300
+ mkfs.ext4 ""$isosyncdirx64".img"
# create live iso layout
+ mkdir -p "$isosyncdirx64"
mkdir -p "$isostagingdirx64"
mkdir -p "$isobootdirx64"
mkdir -p "$isoefibootdirx64"
@@ -15,7 +19,9 @@ makeisox64 () {
mkdir -p "$isolivesqfsdirx64"
# mount && copy our core stage 4 image
mount -t squashfs "$chrootx64" "$isostagingdirx64"
+ mount -t ext4 ""$isosyncdirx64".img" "$isosyncdirx64"
rsync -aHAXr --progress "$isostagingdirx64/" "$isosyncdirx64/"
+ # copy our kernel into cdroot
cp -avx ""$isosyncdirx64"/boot/"$isokernelnamex64"" ""$isorootdirx64"/boot/vmlinuz"
# configure portage && give up control for package / desktop environment installation
isostartx64
@@ -23,13 +29,13 @@ makeisox64 () {
isobuildsystemx64
isochrootx64
isostopx64
- # squash live environment
- mksquashfs "$isosyncdirx64" ""$isosyncdirx64".img" -b 1048576 -comp xz -Xdict-size 100%
- # move our squashed live environment on place
+ # unmount rootfs before compression
+ umount -l "$isosyncdirx64" > /dev/null 2>&1
+ # move rootfs in place
mv ""$isosyncdirx64".img" "$isolivesqfsdirx64"
- # squash it again to be detected by dmsquash-live
- mksquashfs "$isosupersquashdirx64" ""$isorootdirx64"/squashfs.img"
- # and again, move our double squashed live environment on place
+ # squash rootfs with best compression
+ mksquashfs "$isosupersquashdirx64" ""$isorootdirx64"/squashfs.img" -b 1048576 -comp xz -Xdict-size 100%
+ # move squashed rootfs in place
mv ""$isorootdirx64/"squashfs.img" "$isoliveosdirx64"
}
@@ -40,10 +46,11 @@ bootcorex64 () {
}
cleanupisox64 () {
+ umount "$isostagingdirx64"
rm -rf "$isosyncdirx64"
+ rm -rf "$isostagingdirx64"
rm -rf "$isosupersquashdirx64"
rm -rf "$bootcorepath"
- umount "$isostagingdirx64"
}
main () {