fickit: include local pkg
This commit is contained in:
parent
bcbf5b35cf
commit
5d644fa366
17 changed files with 404 additions and 0 deletions
3
fickit-pkg/boot/Dockerfile
Normal file
3
fickit-pkg/boot/Dockerfile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
FROM alpine:latest
|
||||
|
||||
COPY init.sh /init
|
||||
1
fickit-pkg/boot/build.yml
Normal file
1
fickit-pkg/boot/build.yml
Normal file
|
|
@ -0,0 +1 @@
|
|||
image: boot
|
||||
24
fickit-pkg/boot/init.sh
Executable file
24
fickit-pkg/boot/init.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
# /proc/cmdline parser (from Gentoo Wiki)
|
||||
cmdline() {
|
||||
local value
|
||||
value=" $(cat /proc/cmdline) "
|
||||
value="${value##* $1=}"
|
||||
value="${value%% *}"
|
||||
[ "$value" != "" ] && echo "$value"
|
||||
}
|
||||
|
||||
mount -t devtmpfs none /dev
|
||||
mount -t proc none /proc
|
||||
|
||||
mount -o ro /dev/sda1 /boot
|
||||
|
||||
mount -o loop -t squashfs /boot/imgs/$(cmdline root) /mnt || /bin/sh
|
||||
|
||||
umount /dev
|
||||
umount /proc
|
||||
mount --move /boot /mnt/boot
|
||||
|
||||
# Switch
|
||||
exec switch_root /mnt /init
|
||||
Reference in a new issue