Switch custom building of the login initramfs to linuxkkit
This commit is contained in:
parent
1109d76ed7
commit
ba3f4250f5
|
@ -1,7 +1,9 @@
|
|||
challenge-cmdline
|
||||
challenge-initrd.img
|
||||
challenge-kernel
|
||||
login-cmdline
|
||||
login-initrd.img
|
||||
login-kernel
|
||||
server-cmdline
|
||||
server-initrd.img
|
||||
server-kernel
|
||||
tftp/initramfs-login.img
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS"
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
mount -t proc proc /proc
|
||||
mount -t sysfs sysfs /sys
|
||||
|
||||
echo 0 > /proc/sys/kernel/printk
|
||||
|
||||
busybox --install -s
|
||||
|
||||
mknod /dev/null c 1 3
|
||||
mknod /dev/tty c 5 0
|
||||
|
||||
mdev -s
|
||||
|
||||
exec setsid sh -c 'exec sh /init2 </dev/tty1 >/dev/tty1 2>&1'
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
for mod in e100 e1000 e1000e 8139cp 8139too r8169 virtio-net; do
|
||||
modprobe "${mod}"
|
||||
done
|
||||
|
||||
ip link set eth0 up && udhcpc > /dev/null 2> /dev/null &
|
||||
|
||||
/bin/login
|
||||
|
||||
reboot -f
|
|
@ -0,0 +1,67 @@
|
|||
kernel:
|
||||
image: linuxkit/kernel:4.9.82
|
||||
cmdline: "console=tty0 console=ttyS0 quiet panic=-1"
|
||||
|
||||
init:
|
||||
- busybox
|
||||
|
||||
files:
|
||||
- path: /bin/login
|
||||
source: login-app/login-app
|
||||
mode: "0755"
|
||||
|
||||
- path: /etc/terminfo/l/linux
|
||||
source: /etc/terminfo/l/linux
|
||||
mode: "0644"
|
||||
- path: /etc/ssl/certs/DST_Root_CA_X3.pem
|
||||
source: /etc/ssl/certs/DST_Root_CA_X3.pem
|
||||
mode: "0644"
|
||||
- path: /usr/share/consolefonts/Inconsolata-16b.psf.gz
|
||||
source: fonts/Inconsolata-16b.psf.gz
|
||||
mode: "0644"
|
||||
- path: /usr/share/udhcpc/default.script
|
||||
source: /usr/share/udhcpc/default.script
|
||||
mode: "0755"
|
||||
|
||||
- path: /init
|
||||
contents: |
|
||||
#!/bin/sh
|
||||
|
||||
/bin/mount -t proc proc /proc
|
||||
/bin/mount -t sysfs sysfs /sys
|
||||
|
||||
echo 0 > /proc/sys/kernel/printk
|
||||
|
||||
mknod /dev/null c 1 3
|
||||
mknod /dev/tty c 5 0
|
||||
|
||||
mdev -s
|
||||
|
||||
exec setsid sh -c 'exec sh /init2 </dev/tty1 >/dev/tty1 2>&1'
|
||||
mode: "0755"
|
||||
- path: /init2
|
||||
contents: |
|
||||
#!/bin/sh
|
||||
|
||||
zcat /usr/share/consolefonts/Inconsolata-16b.psf.gz | loadfont
|
||||
|
||||
for mod in e100 e1000 e1000e 8139cp 8139too r8169 virtio-net; do
|
||||
modprobe "${mod}"
|
||||
done
|
||||
|
||||
{
|
||||
ip link set eth0 up && udhcpc
|
||||
ip route add 172.23.200.0/24 via 172.23.255.1
|
||||
echo "nameserver 172.23.200.2" > /etc/resolv.conf
|
||||
} > /dev/null 2> /dev/null &
|
||||
|
||||
/bin/sh
|
||||
/bin/login
|
||||
|
||||
reboot -f
|
||||
mode: "0755"
|
||||
- path: /etc/resolv.conf
|
||||
contents: |
|
||||
domain adlin.nemunai.re
|
||||
nameserver 172.23.200.2
|
||||
mode: "0644"
|
Reference in New Issue