26 changed files with 91 additions and 223 deletions
@ -1,8 +1,9 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
# Several packages need to be installed to use Dockerfile.py |
# Several packages need to be installed to use Dockerfile.py |
||||
# It creates a local container that you can use to build minios-live |
# It creates a local container that you can use to build minios-live |
||||
apt install -y docker.io python3-pip |
apt install -y docker.io |
||||
systemctl start docker |
systemctl start docker |
||||
systemctl enable docker |
systemctl enable docker |
||||
|
apt install -y python3-pip |
||||
pip3 install pydocker |
pip3 install pydocker |
||||
python3 ./Dockerfile.py |
python3 ./Dockerfile.py |
@ -1,6 +1,6 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
#docker run -d --name mlc --privileged -v /build:/build local/mlc /build/slax/autoinstall - |
#docker run -d --name mlc --privileged -v /build:/build local/mlc /build/slax/autoinstall - |
||||
docker run --rm -it --privileged -v /build:/build local/mlc /build/slax/autoinstall - |
#docker run --rm -it --privileged -v /build:/build local/mlc /build/slax/autoinstall - |
||||
#docker run --rm -it --privileged -v /build:/build local/mlc /build/slax/autoinstall build_modules_chroot - |
#docker run --rm -it --privileged -v /build:/build local/mlc /build/slax/autoinstall build_modules_chroot - |
||||
#docker run -it --name mlc --privileged -v /build:/build local/mlc |
docker run -it --name mlc --privileged -v /build:/build local/mlc |
||||
#docker run -d --name mlc --privileged -v /build:/build local/mlc |
#docker run -d --name mlc --privileged -v /build:/build local/mlc |
@ -1,93 +0,0 @@ |
|||||
#!/bin/bash |
|
||||
# Linux Live Kit version 7 |
|
||||
|
|
||||
export PATH=.:./tools:../tools:/usr/sbin:/usr/bin:/sbin:/bin:/ |
|
||||
|
|
||||
CHANGEDIR=$(dirname $(readlink -f $0)) |
|
||||
echo "Changing current directory to $CHANGEDIR" |
|
||||
CWD="$(pwd)" |
|
||||
cd $CHANGEDIR |
|
||||
|
|
||||
. ./config || exit 1 |
|
||||
. ./livekitlib || exit 1 |
|
||||
|
|
||||
# only root can continue, because only root can read all files from your system |
|
||||
allow_only_root |
|
||||
|
|
||||
# check for mksquashfs with xz compression |
|
||||
if [ "$(mksquashfs 2>&1 | grep "Xdict-size")" = "" ]; then |
|
||||
echo "mksquashfs not found or doesn't support -comp xz, aborting, no changes made" |
|
||||
echo "you may consider installing squashfs-tools package" |
|
||||
exit 1 |
|
||||
fi |
|
||||
|
|
||||
MKISOFS=$(which mkisofs) |
|
||||
if [ "$MKISOFS" = "" ]; then |
|
||||
MKISOFS=$(which genisoimage) |
|
||||
fi |
|
||||
if [ "$MKISOFS" = "" ]; then |
|
||||
echo "Cannot found mkisofs or genisoimage, stop" |
|
||||
exit 3 |
|
||||
fi |
|
||||
|
|
||||
# build initramfs image |
|
||||
if [ "$SKIPINITRFS" = "" ]; then |
|
||||
echo "Building intramfs image..." |
|
||||
cd initramfs |
|
||||
INITRAMFS=$(./initramfs_create) |
|
||||
cd .. |
|
||||
fi |
|
||||
|
|
||||
# create live kit filesystem (cpio archive) |
|
||||
rm -Rf "$LIVEKITDATA" |
|
||||
BOOT="$LIVEKITDATA"/"$LIVEKITNAME"/boot |
|
||||
mkdir -p "$BOOT" |
|
||||
mkdir -p "$BOOT"/../changes |
|
||||
mkdir -p "$BOOT"/../modules |
|
||||
|
|
||||
if [ "$INITRAMFS" != "" ]; then |
|
||||
mv "$INITRAMFS" $BOOT/initrfs.img |
|
||||
fi |
|
||||
|
|
||||
# BIOS / MBR booting |
|
||||
cp -r bootfiles/* $BOOT |
|
||||
cat bootfiles/syslinux.cfg | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" > $BOOT/syslinux.cfg |
|
||||
cat bootfiles/bootinst.bat | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" | sed -r "s:\\\\boot\\\\:\\\\$LIVEKITNAME\\\\boot\\\\:" > $BOOT/bootinst.bat |
|
||||
cp $VMLINUZ $BOOT/ || exit |
|
||||
|
|
||||
# UEFI booting |
|
||||
mkdir -p $BOOT/EFI/Boot |
|
||||
cp bootfiles/EFI/Boot/syslinux.efi $BOOT/EFI/Boot/bootx64.efi |
|
||||
cp bootfiles/EFI/Boot/{ldlinux.e64,menu.c32,libutil.c32,vesamenu.c32,libcom32.c32} $BOOT/EFI/Boot |
|
||||
cat $BOOT/syslinux.cfg | sed -r "s:/$LIVEKITNAME/boot/vesamenu:vesamenu:" > $BOOT/EFI/Boot/syslinux.cfg |
|
||||
|
|
||||
# create compressed 01-core.sb |
|
||||
COREFS="" |
|
||||
for i in $MKMOD; do |
|
||||
if [ -d /$i ]; then |
|
||||
COREFS="$COREFS /$i" |
|
||||
fi |
|
||||
done |
|
||||
mksquashfs $COREFS $LIVEKITDATA/$LIVEKITNAME/01-core.$BEXT -comp xz -b 1024K -always-use-fragments -keep-as-directory || exit |
|
||||
|
|
||||
cd "$LIVEKITDATA" |
|
||||
ARCH=$(uname -m) |
|
||||
TARGET=/tmp |
|
||||
|
|
||||
cat "$CWD/bootinfo.txt" | fgrep -v "#" | sed -r "s/mylinux/$LIVEKITNAME/" | sed -r "s/\$/\x0D/" > readme.txt |
|
||||
|
|
||||
echo cd $LIVEKITDATA '&&' $MKISOFS -o "$TARGET/$LIVEKITNAME-$ARCH.iso" -v -J -R -D -A "$LIVEKITNAME" -V "$LIVEKITNAME" \ |
|
||||
-no-emul-boot -boot-info-table -boot-load-size 4 \ |
|
||||
-b "$LIVEKITNAME"/boot/isolinux.bin -c "$LIVEKITNAME"/boot/isolinux.boot . \ |
|
||||
> $TARGET/gen_"$LIVEKITNAME"_iso.sh |
|
||||
chmod o+x $TARGET/gen_"$LIVEKITNAME"_iso.sh |
|
||||
|
|
||||
echo cd $LIVEKITDATA '&&' zip -0 -r "$TARGET/$LIVEKITNAME-$ARCH.zip" '*' \ |
|
||||
> $TARGET/gen_"$LIVEKITNAME"_zip.sh |
|
||||
chmod o+x $TARGET/gen_"$LIVEKITNAME"_zip.sh |
|
||||
|
|
||||
echo "-----------------------------" |
|
||||
echo "Finished. Find your result in $LIVEKITDATA" |
|
||||
echo "To build ISO, run: $TARGET/gen_"$LIVEKITNAME"_iso.sh" |
|
||||
echo "To build ZIP, run: $TARGET/gen_"$LIVEKITNAME"_zip.sh" |
|
||||
cd $CWD |
|
@ -1,91 +0,0 @@ |
|||||
#!/bin/bash |
|
||||
|
|
||||
rm -f /etc/fstab |
|
||||
rm -f /etc/mtab |
|
||||
rm -f /etc/apt/sources.list~ |
|
||||
rm -Rf /etc/systemd/system/timers.target.wants |
|
||||
rm -f /etc/systemd/system/multi-user.target.wants/ssh.service |
|
||||
rm -f /etc/systemd/system/multi-user.target.wants/dnsmasq.service |
|
||||
|
|
||||
rm -f /etc/ssh/ssh_host* |
|
||||
|
|
||||
rm -f /var/backups/* |
|
||||
rm -f /var/cache/ldconfig/* |
|
||||
rm -f /var/cache/debconf/* |
|
||||
rm -f /var/cache/fontconfig/* |
|
||||
rm -f /var/lib/apt/extended_states |
|
||||
rm -f /var/lib/systemd/random-seed |
|
||||
rm -f /var/lib/apt/lists/deb.* |
|
||||
rm -Rf /root/.local/share/mc |
|
||||
rm -Rf /root/.cache |
|
||||
rm -f /root/.wget-hsts |
|
||||
|
|
||||
rm -f /var/lib/dpkg/*-old |
|
||||
rm -f /var/log/* |
|
||||
rm -f /var/log/*/* |
|
||||
rm -f /var/log/*/*/* |
|
||||
rm -f /var/cache/apt/archives/*.deb |
|
||||
rm -f /var/cache/apt/*.bin |
|
||||
rm -f /var/cache/debconf/*-old |
|
||||
rm -f /var/lib/dhcp/dhclient.leases |
|
||||
rm -f /root/.bash_history |
|
||||
rm -f /root/.wget-hsts |
|
||||
rm -Rf /usr/share/doc/* |
|
||||
rm -Rf /usr/share/info/* |
|
||||
rm -f /usr/share/images/fluxbox/debian-squared.jpg |
|
||||
rm -Rf /usr/share/fluxbox/nls/??* |
|
||||
rm -Rf /usr/share/gnome/help |
|
||||
|
|
||||
rm -Rf /usr/share/locale/?? |
|
||||
rm -Rf /usr/share/locale/??_* |
|
||||
rm -Rf /usr/share/locale/??@* |
|
||||
rm -Rf /usr/share/locale/??? |
|
||||
rm -Rf /usr/share/i18n/locales/*_* |
|
||||
rm -Rf /usr/share/man/?? |
|
||||
rm -Rf /usr/share/man/*_* |
|
||||
|
|
||||
rm -Rf /usr/share/icons/elementaryXubuntu-dark |
|
||||
rm -Rf /usr/share/icons/gnome/256x256 |
|
||||
|
|
||||
rm /usr/share/applications/compton.desktop |
|
||||
rm /usr/share/applications/debian-uxterm.desktop |
|
||||
rm /usr/share/applications/debian-xterm.desktop |
|
||||
rm /usr/share/applications/htop.desktop |
|
||||
rm /usr/share/applications/mc.desktop |
|
||||
rm /usr/share/applications/mcedit.desktop |
|
||||
rm /usr/share/applications/pcmanfm-desktop-pref.desktop |
|
||||
rm /usr/share/applications/python2.7.desktop |
|
||||
rm /usr/share/applications/python3.7.desktop |
|
||||
rm /usr/share/applications/vim.desktop |
|
||||
|
|
||||
|
|
||||
|
|
||||
# Unzip gzipped files (man pages), so LZMA can compress 2times better. |
|
||||
# First we fix symlinks, then uncompress files |
|
||||
# $1 = search directory |
|
||||
uncompress_files() |
|
||||
{ |
|
||||
local LINK LINE |
|
||||
|
|
||||
find "$1" -type l -name "*.gz" | while read LINE; do |
|
||||
LINK="$(readlink "$LINE" | sed -r 's/.gz$//')" |
|
||||
FILE="$(echo "$LINE" | sed -r 's/.gz$//')" |
|
||||
ln -sfn "$LINK" "$FILE" |
|
||||
rm -f "$LINE" |
|
||||
done |
|
||||
find "$1" -type f -name "*.gz" | xargs -r gunzip |
|
||||
} |
|
||||
|
|
||||
uncompress_files /etc/alternatives |
|
||||
uncompress_files /usr/share/man |
|
||||
|
|
||||
# remove broken links |
|
||||
# $1 = search directory |
|
||||
remove_broken_links() |
|
||||
{ |
|
||||
find "$1" -type l -exec test ! -e {} \; -print | xargs rm -vf |
|
||||
} |
|
||||
|
|
||||
remove_broken_links /etc/alternatives |
|
||||
remove_broken_links /usr/share/man |
|
||||
|
|
Before Width: | Height: | Size: 901 KiB After Width: | Height: | Size: 802 KiB |
@ -0,0 +1,11 @@ |
|||||
|
[Desktop Entry] |
||||
|
Name=Text editor |
||||
|
Comment=Simple text editor |
||||
|
Exec=medit %f |
||||
|
Icon=medit |
||||
|
Terminal=false |
||||
|
Type=Application |
||||
|
MimeType=text/plain |
||||
|
Categories=GTK;Utility;TextEditor; |
||||
|
Keywords=text;editor; |
||||
|
InitialPreference=6 |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@ -0,0 +1,19 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
set -e # exit on error |
||||
|
set -o pipefail # exit on pipeline error |
||||
|
set -u # treat unset variable as error |
||||
|
|
||||
|
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" |
||||
|
|
||||
|
# install packages |
||||
|
if [ -f $SCRIPT_DIR/package.list ]; then |
||||
|
#sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
||||
|
$APT_CMD update >>$OUTPUT 2>&1 && |
||||
|
#sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
||||
|
$APT_CMD install $APT_OPTIONS $APT_OPTIONS2 \ |
||||
|
$(grep -vE "^\s*#" $SCRIPT_DIR/package.list | tr "\n" " ") >>$OUTPUT 2>&1 |
||||
|
fi |
||||
|
|
||||
|
rm -Rf /usr/share/icons/gnome/256x256 >>$OUTPUT 2>&1 |
||||
|
rm -Rf /usr/share/applications/vlc.desktop >>$OUTPUT 2>&1 |
@ -0,0 +1 @@ |
|||||
|
vlc |
Loading…
Reference in new issue