scipts added
parent
753ca901f0
commit
eb892d10b2
16
README
16
README
|
|
@ -2,7 +2,7 @@ Linux Live Kit
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Use this set of scripts to turn your existing preinstalled Linux
|
Use this set of scripts to turn your existing preinstalled Linux
|
||||||
distribution into a Live Kit (formely known as Live CD).
|
distribution into a Live Kit (formely known as Live CD or Live USB Stick).
|
||||||
Make sure to extract and use it on a posix-compatible filesystem,
|
Make sure to extract and use it on a posix-compatible filesystem,
|
||||||
since it creates some (sym)links and such.
|
since it creates some (sym)links and such.
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@ Note:
|
||||||
Be warned, if you put it to /tmp, some distros may erase it on reboot.
|
Be warned, if you put it to /tmp, some distros may erase it on reboot.
|
||||||
|
|
||||||
* Before you start building your Kit, edit the file ./config
|
* Before you start building your Kit, edit the file ./config
|
||||||
Most importantly change the LIVEKITNAME variable.
|
Most importantly change the LIVEKITNAME variable and the LIVEKITDATA path.
|
||||||
|
|
||||||
* Make sure your kernel is in /boot/vmlinuz or change the path in ./config
|
* Make sure your kernel is in /boot/vmlinuz or change the path in ./config
|
||||||
Your kernel must support squashfs and aufs. Debian Jessie's kernel does.
|
Your kernel must support squashfs and aufs. Debian Jessie's kernel does.
|
||||||
|
|
@ -35,18 +35,20 @@ Note:
|
||||||
isolinux sources, patching them using your actual LIVEKITNAME and
|
isolinux sources, patching them using your actual LIVEKITNAME and
|
||||||
recompiling. This step is not needed if you plan to boot from USB only.
|
recompiling. This step is not needed if you plan to boot from USB only.
|
||||||
|
|
||||||
* If you have tmpfs mounted on /tmp, make sure you have enough RAM
|
* Make sure you have enough RAM on the given LIVEKITDATA path
|
||||||
since LiveKit will store lots of data there. If you are low on RAM,
|
since LiveKit will store lots of data there. If you are low on RAM,
|
||||||
make sure /tmp is a regular on-disk directory.
|
make sure LIVEKITDATA is a regular on-disk directory.
|
||||||
|
|
||||||
* When done, run the ./build script to create your Live Kit
|
* When done, run the ./build script to create your Live Kit
|
||||||
- it will create ISO and TAR files for you in /tmp
|
|
||||||
- make sure you have enough free space in /tmp to handle it
|
|
||||||
|
|
||||||
* You will need the following packages to be installed:
|
* You will need the following packages to be installed:
|
||||||
- squashfs-tools
|
- squashfs-tools
|
||||||
- genisoimage or mkisofs
|
- genisoimage or mkisofs
|
||||||
- zip
|
- zip
|
||||||
|
|
||||||
|
* After the successful build you will find your livelinux system under the path
|
||||||
|
given by LIVEKITDATA
|
||||||
|
|
||||||
Author: Tomas M. <http://www.linux-live.org>
|
* to create a bootable device you can use the script createBootDevice.,sh un der scripts
|
||||||
|
|
||||||
|
Author: Tomas M. <http://www.linux-live.org> and Olaf Koch <http://mediakit.education>
|
||||||
|
|
|
||||||
2
build
2
build
|
|
@ -48,6 +48,7 @@ BOOT="$LIVEKITDATA"/"$LIVEKITNAME"/boot
|
||||||
mkdir -p "$BOOT"
|
mkdir -p "$BOOT"
|
||||||
mkdir -p "$BOOT"/../changes
|
mkdir -p "$BOOT"/../changes
|
||||||
mkdir -p "$BOOT"/../modules
|
mkdir -p "$BOOT"/../modules
|
||||||
|
mkdir -p "$BOOT"/../scripts
|
||||||
|
|
||||||
if [ "$INITRAMFS" != "" ]; then
|
if [ "$INITRAMFS" != "" ]; then
|
||||||
mv "$INITRAMFS" $BOOT/initrfs.img
|
mv "$INITRAMFS" $BOOT/initrfs.img
|
||||||
|
|
@ -57,6 +58,7 @@ cp bootfiles/* $BOOT
|
||||||
cat bootfiles/syslinux.cfg | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" > $BOOT/syslinux.cfg
|
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
|
cat bootfiles/bootinst.bat | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" | sed -r "s:\\\\boot\\\\:\\\\$LIVEKITNAME\\\\boot\\\\:" > $BOOT/bootinst.bat
|
||||||
cp $VMLINUZ $BOOT/vmlinuz
|
cp $VMLINUZ $BOOT/vmlinuz
|
||||||
|
cp scripts/* $BOOT/../scripts
|
||||||
|
|
||||||
# create compressed 01-core.sb
|
# create compressed 01-core.sb
|
||||||
COREFS=""
|
COREFS=""
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,24 +1,53 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# script by Olaf Koch 3.11.2018
|
# script by Olaf Koch 3.11.2018
|
||||||
|
|
||||||
### settings
|
|
||||||
dev=$1
|
if [[ ${EUID} -ne 0 ]]; then
|
||||||
liveimagename="mediakit"
|
echo "this script must be executed with elevated privileges"
|
||||||
squashfilesystem="/run/initramfs/memory/data"
|
exit 1
|
||||||
if [ -e /run/initramfs/memory/data/vmlinuz ]; then
|
|
||||||
kernelfile="/run/initramfs/memory/data/vmlinuz"
|
|
||||||
else
|
|
||||||
kernelfile="/run/initramfs/memory/data/mediakit/boot/vmlinuz"
|
|
||||||
fi
|
|
||||||
if [ -e /run/initramfs/memory/data/initrfs.img ]; then
|
|
||||||
initrfsfile="/run/initramfs/memory/data/initrfs.img"
|
|
||||||
else
|
|
||||||
initrfsfile="/run/initramfs/memory/data/mediakit/boot/initrfs.img"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# get other disks
|
||||||
|
mapfile -t info < <( lsblk )
|
||||||
|
|
||||||
|
i=1
|
||||||
|
for entry in "${info[@]}"
|
||||||
|
do
|
||||||
|
if [[ `echo "$entry" | awk '{ print $6}'` == "disk" ]]; then
|
||||||
|
echo -e "\033[43m $i \e[0m" $entry
|
||||||
|
devices[$i]=`echo "$entry" | awk '{ print $1}'`
|
||||||
|
i=`expr $i + 1`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
tput setaf 11
|
||||||
|
echo "Please select the disknumber of the destination device: (All data on this device will be destroyed!)"
|
||||||
|
tput sgr0
|
||||||
|
read destination
|
||||||
|
destinationpath="/dev/${devices[$destination]}"
|
||||||
|
|
||||||
|
dev=$destinationpath
|
||||||
|
cd ..
|
||||||
|
liveimagename=`echo "${PWD##*/}"`
|
||||||
|
cd ..
|
||||||
|
squashfilesystem=`echo "${PWD}"`
|
||||||
|
kernelfile="${squashfilesystem}/${liveimagename}/boot/vmlinuz"
|
||||||
|
initrfsfile="${squashfilesystem}/${liveimagename}/boot/initrfs.img"
|
||||||
|
|
||||||
###
|
###
|
||||||
|
tput setaf 11
|
||||||
|
echo "Copy $liveimagename to $destinationpath..."
|
||||||
|
echo "Settings:"
|
||||||
|
echo "liveimagename=$liveimagename"
|
||||||
|
echo "squashfilesystem=$squashfilesystem"
|
||||||
|
echo "kernelfile=$kernelfile"
|
||||||
|
echo "initrfsfile=$initrfsfile"
|
||||||
|
echo "(Enter to continue/STRG-C to abort)"
|
||||||
|
tput sgr0
|
||||||
|
read
|
||||||
|
exit
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
if [[ ${EUID} -ne 0 ]]; then
|
if [[ ${EUID} -ne 0 ]]; then
|
||||||
echo "this script must be executed with elevated privileges"
|
echo "this script must be executed with elevated privileges"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue