diff options
-rw-r--r-- | README.md | 44 | ||||
-rw-r--r-- | TODO | 39 | ||||
-rw-r--r-- | data/issue | 19 | ||||
-rw-r--r-- | data/splash.png | bin | 100743 -> 401199 bytes | |||
-rw-r--r-- | dracut/adduser.sh | 4 | ||||
-rw-r--r-- | dracut/getty-autologin.sh | 11 | ||||
-rw-r--r-- | dracut/module-setup.sh | 1 | ||||
-rw-r--r-- | isolinux/isolinux.cfg.in | 3 | ||||
-rwxr-xr-x | mkhrmpf.sh | 250 | ||||
-rw-r--r-- | mklive.sh.in | 5 |
10 files changed, 330 insertions, 46 deletions
diff --git a/README.md b/README.md index 7498034..9837e96 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,19 @@ -## The Void Linux image/live/rootfs maker and installer + _ __ + | |_ _ _ _ __ _ __ / _| + | ' \| '_| ' \| '_ \ _| + |_||_|_| |_|_|_| .__/_| version 0.1 "Kiasoachbomba" + |_| -This repository contains utilities for Void Linux: - - * installer (The Void Linux el-cheapo installer for x86) - * mklive (The Void Linux live image maker for x86) - - * mkimage (The Void Linux image maker for ARM platforms) - * mkrootfs (The Void Linux rootfs maker for ARM platforms) +Welcome to the hrmpf rescue system, built on Void Linux. #### Dependencies * xbps>=0.45 - * parted (for mkimage) - * qemu-user-static binaries (for mkrootfs) + * GNU bash #### Usage -Type - - $ make - -and then see the usage output: - - $ ./mklive.sh -h - $ ./mkrootfs.sh -h - $ ./mkimage.sh -h - -#### Examples - -Build a native live image with runit and keyboard set to 'fr': - - # ./mklive.sh -k fr - -Build an i686 (on x86\_64) live image with some additional packages: - - # ./mklive.sh -a i686 -p 'vim rtorrent' - -Build an x86\_64 musl live image with packages stored in a local repository: - - # ./mklive.sh -a x86_64-musl -r /path/to/host/binpkgs + % ./mkhrmpf.sh + % linux32 ./mkhrmpf.sh -See the usage output for more information :-) +This project is based on void-mklive. diff --git a/TODO b/TODO new file mode 100644 index 0000000..f448db0 --- /dev/null +++ b/TODO @@ -0,0 +1,39 @@ +- forensic mode (don't touch disks) +- hrmpf96 (64+32 image, best in the same squashfs and switch_root into + bindmount) +- artwork! +- install to usb + +fdisk +mkfs.vfat -n VOID_LIVE +mount /dev/sda1 /mnt +rsync -avP -x /run/initramfs/live/ /mnt/ +# or here: fatlabel /dev/sda1 VOID_LIVE +sed -i /SAMPLE/d /etc/mtools.conf +syslinux -d boot -i /dev/sda1 +mkdir /mnt/boot/syslinux +mv /mnt/boot/isolinux /mnt/boot/syslinux +mv /mnt/boot/syslinux/isolinux.cfg /mnt/boot/syslinux/syslinux.cfg +dd if=/usr/lib/syslinux/bios/mbr.bin of=hrmpf.img conv=notrunc + + +Possibly interesting packages found in grml not yet in void: + +bacula? +blktrace? no kernel support +bonnie? +buffer? +centerim? +chkrootkit? +clonezilla? +daemon? +hwinfo? +ipmitool? +ipsec-tools? +jfsutils? +mbuffer? +mcelog? +sleuthkit? +slrn? +unison? +vlock? diff --git a/data/issue b/data/issue index 9117c72..3f271bb 100644 --- a/data/issue +++ b/data/issue @@ -1,6 +1,11 @@ -############################################################################### + _ __ +| |_ _ _ _ __ _ __ / _| +| ' \\| '_| ' \\| '_ \\ _| +|_||_|_| |_|_|_| .__/_| version 0.1 "Kiasoachbomba" + |_| -Welcome to the Void Linux Live system. Two users are available to log in: +Welcome to the hrmpf rescue system, built on Void Linux. +There are two accounts: - root:voidlinux - anon:voidlinux @@ -8,18 +13,14 @@ Welcome to the Void Linux Live system. Two users are available to log in: The `anon` user additionally has `sudo(8)` permissions to run any command without a password. -To start the installation please type: +You can also use this disk to install Void: # void-installer -and follow the on-screen instructions. To install additional software make +and follow the on-screen instructions. To install additional software make sure to configure your network interface and then use: - xbps-install(8) to install/update packages - xbps-query(8) to query for package info -Thanks for using Void Linux. - - http://www.voidlinux.eu - -############################################################################### +Enjoy! diff --git a/data/splash.png b/data/splash.png index 639d2ef..bcc58b1 100644 --- a/data/splash.png +++ b/data/splash.png Binary files differdiff --git a/dracut/adduser.sh b/dracut/adduser.sh index f006424..f06a4ea 100644 --- a/dracut/adduser.sh +++ b/dracut/adduser.sh @@ -4,7 +4,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -echo void-live > ${NEWROOT}/etc/hostname +echo hrmpf > ${NEWROOT}/etc/hostname AUTOLOGIN=$(getarg live.autologin) USERNAME=$(getarg live.user) @@ -54,3 +54,5 @@ fi if [ -n "$AUTOLOGIN" ]; then sed -i "s,GETTY_ARGS=\"--noclear\",GETTY_ARGS=\"--noclear -a $USERNAME\",g" ${NEWROOT}/etc/sv/agetty-tty1/run fi + +chroot ${NEWROOT} usermod -s /bin/bash root diff --git a/dracut/getty-autologin.sh b/dracut/getty-autologin.sh new file mode 100644 index 0000000..842c768 --- /dev/null +++ b/dracut/getty-autologin.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +USERNAME=$(getarg live.user) +[ -z "$USERNAME" ] && USERNAME=anon + +printf '%s\n' '#!/bin/sh' "exec setsid agetty --noclear --autologin root 38400 tty1 linux" >${NEWROOT}/etc/sv/agetty-tty1/run +printf '%s\n' '#!/bin/sh' "exec setsid agetty --autologin root --login-pause 38400 \${PWD##*-} linux" >${NEWROOT}/etc/sv/agetty-generic/run diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh index df148f5..4170620 100644 --- a/dracut/module-setup.sh +++ b/dracut/module-setup.sh @@ -25,6 +25,7 @@ install() { inst_hook pre-pivot 01 "$moddir/adduser.sh" inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh" + inst_hook pre-pivot 02 "$moddir/getty-autologin.sh" inst_hook pre-pivot 03 "$moddir/copy-initramfs.sh" inst_hook pre-pivot 04 "$moddir/locale.sh" inst_hook pre-pivot 05 "$moddir/services.sh" diff --git a/isolinux/isolinux.cfg.in b/isolinux/isolinux.cfg.in index 69de967..5af8bf6 100644 --- a/isolinux/isolinux.cfg.in +++ b/isolinux/isolinux.cfg.in @@ -28,6 +28,9 @@ LABEL linuxram MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (RAM) KERNEL /boot/vmlinuz APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram +LABEL memtest86+ +MENU LABEL memtest86+ +KERNEL /boot/memtest86+ LABEL c MENU LABEL Boot first HD found by BIOS COM32 chain.c32 diff --git a/mkhrmpf.sh b/mkhrmpf.sh new file mode 100755 index 0000000..55aa46e --- /dev/null +++ b/mkhrmpf.sh @@ -0,0 +1,250 @@ +#!/bin/sh + +pkgs=' +acpi +aiccu +alsa-lib +alsa-utils +apg +attr +autoconf +automake +bc +bind-utils +binutils +bison +bmon +bridge-utils +bsdcpio +bsdtar +btrfs-progs +busybox +bzip2 +cabextract +cdrtools +cksfv +cpio +cpuburn +cpufrequtils +cpupower +cronie +cryptsetup +curl +cv +cvs +dar +dash +ddate +ddrescue +debootstrap +dhcpcd +dialog +diffutils +diffutils +dmraid +dnsmasq +dos2unix +dosfstools +dstat +duplicity +dwdiff +e2fsprogs +ed +edbrowse +eject +elinks +emacs +ethtool +exfat-utils +extundelete +fatrace +fbset +fdupes +file +findutils +flex +foremost +fuse +fuse-exfat +fuse-sshfs +gawk +gcc +gdb +gettext +git +git-perl +git-svn +glibc-devel +gnupg +gpm +gptfdisk +grep +grub +gzip +hdapsd +hdparm +hfsprogs +hostapd +htop +ifenslave +iftop +inetutils +inotify-tools +iodine +ioping +iotop +iperf +iproute2 +iptables +iptraf-ng +iputils +irqbalance +irssi +iw +john +jupp +kbd +kbd-data +kexec-tools +kpartx +ksh +less +lftp +libressl-openssl +libtool +linux-firmware +lm-sensors +logrotate +lshw +lsof +ltrace +lvm2 +lxc +lynx +lzop +lzop +m4 +make +mc +mdadm +memtest86+ +mercurial +mg +mksh +mosh +most +mpg123 +msmtp +mtools +mtr +multitail +mutt +ncdu +net-snmp +net-tools +nfs-utils +nfs-utils-server +nftables +ngrep +nmap +nmon +ntfs-3g +ntp +numactl +nvi +openbsd-netcat +openssh +openvpn +p7zip +parted +patch +pax +pax-utils +pbzip2 +pciutils +perl +pigz +pixz +pkg-config +pm-utils +postfix +powertop +ppp +procmail +profanity +pv +pwgen +python +radvd +rc +rcs +rfkill +rpcbind +rpmextract +rsnapshot +rsync +rsyslog +rtorrent +ruby +s-nail +samba +screen +sdparm +sg3_utils +sharutils +shorewall +shorewall6 +simple-mtpfs +smartmontools +socat +squashfs-tools +sslscan +strace +stunnel +subversion +sudo +sysfsutils +syslinux +sysstat +tar +tcpdump +tcsh +testdisk +texinfo +tftp-hpa +tlsdate +tmux +tor +traceroute +tree +unbound +unrar +unzip +usbutils +util-linux +vbindiff +vde2 +vim +w3m +which +whois +wireless_tools +wpa_supplicant +xfsdump +xfsprogs +xinetd +xtools +xz +zerofree +zip +zsh +' +#for p in $pkgs; do +# echo -n "$p " +# xbps-query -R -p installed_size -S $p +#done + +./mklive.sh -T "hrmpf live/rescue system" -C "loglevel=6 printk.time=1 net.ifnames=0" -p "$pkgs" +# cups? +# qemu? +# zfs? diff --git a/mklive.sh.in b/mklive.sh.in index 5070c65..86b7f9d 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -28,7 +28,7 @@ #- trap "error_out $LINENO $?" INT TERM 0 -readonly REQUIRED_PKGS="base-files libgcc dash coreutils sed tar gawk syslinux grub-x86_64-efi squashfs-tools xorriso" +readonly REQUIRED_PKGS="base-files libgcc dash coreutils sed tar gawk syslinux grub-x86_64-efi squashfs-tools xorriso memtest86+" readonly INITRAMFS_PKGS="binutils xz device-mapper" readonly PROGNAME=$(basename $0) @@ -150,6 +150,7 @@ generate_initramfs() { mv $ROOTFS/boot/initrd $BOOT_DIR cp $ROOTFS/boot/vmlinuz-$KERNELVERSION $BOOT_DIR/vmlinuz + cp $ROOTFS/boot/memtest86+ $BOOT_DIR } cleanup_rootfs() { @@ -351,7 +352,7 @@ _linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r $ROOTFS ${XBPS_REPOSITOR _kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r $ROOTFS ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series}) KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver}) -: ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"} +: ${OUTPUT_FILE="hrmpf-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"} info_msg "[2/9] Installing software to generate the image: ${REQUIRED_PKGS} ..." install_prereqs |