initial import, works.

master
Robert Gerus 2017-07-16 01:57:58 +02:00
commit 4c1151dd2f
53 changed files with 83 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
lib/modules/

BIN
bin/busybox Executable file

Binary file not shown.

BIN
bin/cryptsetup Executable file

Binary file not shown.

BIN
bin/kexec Executable file

Binary file not shown.

1
bin/sh Symbolic link
View File

@ -0,0 +1 @@
busybox

BIN
bin/zfs Executable file

Binary file not shown.

BIN
bin/zpool Executable file

Binary file not shown.

1
etc/mtab Symbolic link
View File

@ -0,0 +1 @@
/proc/self/mounts

2
genlibdir.sh Normal file
View File

@ -0,0 +1,2 @@
# for i in bin/*; do ldd $i; done| awk '/=>/ { print $3 }' | sort -u | while read fpath; do realname=$(readlink -f $fpath); cp $realname lib/; basereal=$(basename $realname); basefake=$(basename $fpath); ln -s $basereal lib/$basefake; done
:

57
init Executable file
View File

@ -0,0 +1,57 @@
#!/bin/sh
set -x
export PATH="/bin"
# mounts
mount -t proc proc /proc
mount -t devtmpfs devtmp /dev
mount -t sysfs sys /sys
mount -o size=1G -t tmpfs tmpfs /tmp
# modules
for mod in mbcache fscrypto jbd2 ext4; do
modprobe "${mod}"
done
for mod in spl znvpair zcommon zunicode zavl icp zfs; do
modprobe "${mod}"
done
# populating useful additional /dev entries
mkdir -p /dev/disk/by-uuid
blkid | tr -d : | while read dev uuidvar rest; do
eval "${uuidvar}"
ln -s "${dev}" "/dev/disk/by-uuid/${UUID}"
done
# argument parsing
for var in $(cat /proc/cmdline | sed 's/[.]/_/g'); do
eval $var
done
eval "${root}"
pool=${ZFS/\/*}
if [ "${zfs_force}" = y ]; then
FORCE_FLAG=" -f"
else
FORCE_FLAG=""
fi
# meat
cryptsetup open UUID="${rd_luks_uuid}" "${pool}"
zpool import -N ${FORCE_FLAG} "${pool}"
mount -t zfs -o zfsutil "${ZFS}" /src
cp "$(readlink -f /src/boot/vmlinuz)" /tmp/vmlinuz
cp "$(readlink -f /src/boot/initrd)" /tmp/initrd
umount /src
# prevent zpool import moaning
zpool export "${pool}"
cryptsetup close "${pool}"
kexec --reuse-cmdline -f --initrd /tmp/initrd /tmp/vmlinuz
exec sh

BIN
lib/ld-2.24.so Executable file

Binary file not shown.

1
lib/ld-linux-x86-64.so.2 Symbolic link
View File

@ -0,0 +1 @@
ld-2.24.so

1
lib/libblkid.so.1 Symbolic link
View File

@ -0,0 +1 @@
libblkid.so.1.1.0

BIN
lib/libblkid.so.1.1.0 Executable file

Binary file not shown.

BIN
lib/libc-2.24.so Executable file

Binary file not shown.

1
lib/libc.so.6 Symbolic link
View File

@ -0,0 +1 @@
libc-2.24.so

1
lib/libcap.so.2 Symbolic link
View File

@ -0,0 +1 @@
libcap.so.2.25

BIN
lib/libcap.so.2.25 Executable file

Binary file not shown.

1
lib/libcryptsetup.so.4 Symbolic link
View File

@ -0,0 +1 @@
libcryptsetup.so.4.7.0

BIN
lib/libcryptsetup.so.4.7.0 Executable file

Binary file not shown.

BIN
lib/libdevmapper.so.1.02 Executable file

Binary file not shown.

BIN
lib/libdl-2.24.so Executable file

Binary file not shown.

1
lib/libdl.so.2 Symbolic link
View File

@ -0,0 +1 @@
libdl-2.24.so

1
lib/libgcrypt.so.20 Symbolic link
View File

@ -0,0 +1 @@
libgcrypt.so.20.1.8

BIN
lib/libgcrypt.so.20.1.8 Executable file

Binary file not shown.

1
lib/libgpg-error.so.0 Symbolic link
View File

@ -0,0 +1 @@
libgpg-error.so.0.22.0

BIN
lib/libgpg-error.so.0.22.0 Executable file

Binary file not shown.

1
lib/liblzma.so.5 Symbolic link
View File

@ -0,0 +1 @@
liblzma.so.5.2.3

BIN
lib/liblzma.so.5.2.3 Executable file

Binary file not shown.

BIN
lib/libm-2.24.so Executable file

Binary file not shown.

1
lib/libm.so.6 Symbolic link
View File

@ -0,0 +1 @@
libm-2.24.so

1
lib/libnvpair.so.1 Symbolic link
View File

@ -0,0 +1 @@
libnvpair.so.1.0.1

BIN
lib/libnvpair.so.1.0.1 Executable file

Binary file not shown.

1
lib/libpopt.so.0 Symbolic link
View File

@ -0,0 +1 @@
libpopt.so.0.0.0

BIN
lib/libpopt.so.0.0.0 Executable file

Binary file not shown.

BIN
lib/libpthread-2.24.so Executable file

Binary file not shown.

1
lib/libpthread.so.0 Symbolic link
View File

@ -0,0 +1 @@
libpthread-2.24.so

BIN
lib/librt-2.24.so Executable file

Binary file not shown.

1
lib/librt.so.1 Symbolic link
View File

@ -0,0 +1 @@
librt-2.24.so

BIN
lib/libudev.so.1 Executable file

Binary file not shown.

1
lib/libuuid.so.1 Symbolic link
View File

@ -0,0 +1 @@
libuuid.so.1.3.0

BIN
lib/libuuid.so.1.3.0 Executable file

Binary file not shown.

1
lib/libuutil.so.1 Symbolic link
View File

@ -0,0 +1 @@
libuutil.so.1.0.1

BIN
lib/libuutil.so.1.0.1 Executable file

Binary file not shown.

1
lib/libz.so.1 Symbolic link
View File

@ -0,0 +1 @@
libz.so.1.2.11

BIN
lib/libz.so.1.2.11 Executable file

Binary file not shown.

1
lib/libzfs.so.2 Symbolic link
View File

@ -0,0 +1 @@
libzfs.so.2.0.0

BIN
lib/libzfs.so.2.0.0 Executable file

Binary file not shown.

1
lib/libzfs_core.so.1 Symbolic link
View File

@ -0,0 +1 @@
libzfs_core.so.1.0.0

BIN
lib/libzfs_core.so.1.0.0 Executable file

Binary file not shown.

1
lib/libzpool.so.2 Symbolic link
View File

@ -0,0 +1 @@
libzpool.so.2.0.0

BIN
lib/libzpool.so.2.0.0 Executable file

Binary file not shown.

1
lib64 Symbolic link
View File

@ -0,0 +1 @@
lib