summaryrefslogtreecommitdiff
path: root/iso64
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 /iso64
parent1c1caee4431148fdfd6eeb74dcf0c100232506c8 (diff)
after a closer look, fedora seems to keep live rootfs as ext4, so we should do the same
Diffstat (limited to 'iso64')
-rwxr-xr-xiso6421
1 files changed, 14 insertions, 7 deletions
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 () {