blob: f265e7200cd8238a4e56284a4e05144269649731 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/usr/bin/env bash
# Vasile needs root privileges and a proper kernel to run
kernelconfig
checkroot
makeisox64 () {
# create live iso layout
mkdir -p "$isostagingdirx64"
mkdir -p "$isobootdirx64"
mkdir -p "$isoefibootdirx64"
mkdir -p "$isoliveosdirx64"
mkdir -p "$isosupersquashdirx64"
mkdir -p "$isolivesqfsdirx64"
# mount && copy our core stage 4 image
mount -t squashfs "$chrootx64" "$isostagingdirx64"
rsync -aHAXr --progress "$isostagingdirx64/" "$isosyncdirx64/"
cp -avx ""$isosyncdirx64"/boot/"$isokernelnamex64"" ""$isorootdirx64"/boot/vmlinuz"
# configure portage && give up control for package / desktop environment installation
isostartx64
isooverlaysx64
isobuildsystemx64
isochrootx64
isostopx64
# squash live environment
mksquashfs "$isosyncdirx64" ""$isosyncdirx64".img" -b 1048576 -comp xz -Xdict-size 100%
# move our squashed live environment on place
mv ""$isosyncdirx64".img" "$isosupersquashdirx64"
# squash it again to be detected by dmsquash-live
mksquashfs "$isosupersquashdirx64" ""$isorootdirx64"/squashfs.img"
# and again, move our double squashed live environment on place
mv ""$isorootdirx64/"squashfs.img" "$isoliveosdirx64"
}
bootcorex64 () {
# configure live bootloader
git clone https://gitlab.com/rogentos/boot-core.git "$bootcorepath"
cp -avx "$bootcorefiles" "$isorootdirx64"
}
cleanupisox64 () {
rm -rf "$isosyncdirx64"
rm -rf "$isosupersquashdirx64"
rm -rf "$bootcorepath"
umount "$isostagingdirx64"
}
main () {
chrootchecksumx64
makeisox64
bootcorex64
cleanupisox64
}
main
|