Created
February 20, 2015 21:29
-
-
Save xorgnak/5a8418e4a75c63a4f927 to your computer and use it in GitHub Desktop.
Nomadic-Linux build program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install xorriso live-build syslinux squashfs-tools | |
mkdir ~/livework && cd ~/livework | |
debootstrap --arch=amd64 wheezy chroot | |
cd ~/livework | |
chroot chroot | |
export PACKAGES="screen netcat nmap wicd wicd-curses ruby-full emacs xinit xorg xterm dwm git openssh-server vim emacs-goodies-el vlc alsa-base alsa-utils wpasupplicant slashem mednafen bsdgames transmission-cli" | |
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” | |
apt-get install dialog dbus | |
dbus-uuidgen > /var/lib/dbus/machine-id | |
apt-get install linux-image-amd64 live-boot | |
apt-get install $PACKAGES | |
# /etc/skel | |
passwd | |
apt-get clean | |
rm /var/lib/dbus/machine-id && rm -rf /tmp/* | |
umount /proc /sys /dev/pts | |
exit | |
cd ~/livework | |
mkdir -p binary/live && mkdir -p binary/isolinux | |
cp chroot/boot/vmlinuz-3.2.0-4-amd64 binary/live/vmlinuz | |
cp chroot/boot/initrd.img-3.2.0-4-amd64 binary/live/initrd | |
mksquashfs chroot binary/live/filesystem.squashfs -comp xz -e boot | |
cp /usr/lib/syslinux/isolinux.bin binary/isolinux/. | |
cp /usr/lib/syslinux/menu.c32 binary/isolinux/. | |
cat << EOF > 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 | |
EOF | |
cd ~/livework | |
xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes \ | |
-isohybrid-mbr /usr/lib/syslinux/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 nomadic.iso binary | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment