skip to content

IT and more

Willkommen auf der IT Seite. 
Hier möchte ich einige Howtos, Anleitungen und andere IT-Relevante Dinge zum Download bereitstellen.

Bitte beim Download zur weiteren Verwendung aber auf das Copyright achten!

Bei weiteren Fragen könnt ihr mir auch eine Mail zukommen lassen.

LINUX: Eigene Live-CD auf DebianBasis 9 erstellen

Posted by Benjamin Wagner (benjamin) on Mar 03 2019

How to Build a Debian LiveCD

Hier eine kurze Anleitung, wie man aus einer bestehenden Debian 9.6 Installation eine LIVE-CD mit eigenen Programmen erstellen kann.

Wichtig: Als erstes wird in eine VM ein Debian 9.6 installiert. Aus diesem Debian wird dann die LIVE-CD auf Basis der Installations-CD heraus neu erstellt.

Falls in der Netzwerkumgebung Proxies verwendet werden, sollten diese hier an der Kommandozeile eingetragen werden.

echo Prepare proxy server settings
export http_proxy=http://192.168.246.1:8080
export ftp_proxy=http://192.168.246.1:8080

STEP 1 - Download needed software packages
apt-get install xorriso live-build syslinux* squashfs-tools isolinux

STEP 2 - create basic filesystem
mkdir ~/livework-stretch && cd ~/livework-stretch
debootstrap --arch=amd64 stretch chroot

STEP 3 - chroot into that filesystem
cd ~/livework-stretch
chroot chroot
mount none -t proc /proc
mount none -t sysfs /sys
mount none -t devpts /dev/pts
export HOME=/root
export LC_ALL=C
export PS1="\e[01;31m(live):\W \$ \e[00m"


STEP 4 - Customizing
echo In chroot you need to bring in a Linux kernel and the necessary livecd packages.
echo You can also set up a root password:

apt-get install dialog dbus
dbus-uuidgen > /var/lib/dbus/machine-id
apt-get install linux-image-amd64 live-boot
passwd

echo This is a very basic Debian system.
echo On top of it you can install packages such as vim and ssh:
echo apt-get install vim ssh
echo
echo a desktop environment
echo apt-get install lxde
echo etc.
echo
echo When you are done, cleanup apt caches and exit chroot.

echo Delete LibreOffice
apt-get remove libreoffice* --purge

apt-get clean
rm /var/lib/dbus/machine-id && rm -rf /tmp/*
umount /proc /sys /dev/pts
exit

STEP 5 - Prepare the ISO Image creation
echo The CD/DVD image is set up using ISOLINUX.
echo Start by creating a new directory, binary, containing the Linux kernel, a compressed copy of chroot, and isolinux executables:

cd ~/livework-stretch
mkdir -p binary/live && mkdir -p binary/isolinux
cp chroot/boot/vmlinuz-4.9.0-8-amd64 binary/live/vmlinuz
cp chroot/boot/initrd.img-4.9.0-8-amd64 binary/live/initrd
mksquashfs chroot binary/live/filesystem.squashfs -comp xz -e boot
cp /usr/lib/ISOLINUX/isolinux.bin binary/isolinux/.
rem cp /usr/lib/syslinux/modules/bios/menu.c32 binary/isolinux/.
cp /usr/lib/syslinux/modules/bios/* binary/isolinux/.

echo Next, an isolinux config file is created:
# cat binary/isolinux/isolinux.cfg
ui menu.c32
prompt 0
menu title Boot Menu
timeout 300

label live-amd64
    menu label ^Live (amd64)
    menu default
    linux /live/vmlinuz
     append initrd=/live/initrd boot=live persistence quiet

label live-amd64-failsafe
    menu label ^Live (amd64 failsafe)
    linux /live/vmlinuz
    append initrd=/live/initrd boot=live persistence config memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal

endtext

Step 6 – Building the iso image
cd ~/livework-stretch
xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 -A "Debian Live" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o bennix.iso binary

Last changed: Mar 03 2019 at 16:36

Back

Kommentar

email address:
Homepage:
URL:
Comment:

Name:

E-Mail (required, not public):

Website:

Kommentar :

Prüfziffer:
9 plus 6  =  Bitte Ergebnis eintragen

Up
K