summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2017-07-16 01:57:58 +0200
committerRobert Gerus <arachnist@i.am-a.cat>2017-07-16 01:57:58 +0200
commit4c1151dd2fd121bd260ea7b8eab592b16179ea6f (patch)
treeae6b4f4cc50fcc1a1571f8db4a80ad7206d9c05c
downloadkexec-initramfs-4c1151dd2fd121bd260ea7b8eab592b16179ea6f.tar.gz
kexec-initramfs-4c1151dd2fd121bd260ea7b8eab592b16179ea6f.tar.bz2
kexec-initramfs-4c1151dd2fd121bd260ea7b8eab592b16179ea6f.tar.xz
kexec-initramfs-4c1151dd2fd121bd260ea7b8eab592b16179ea6f.zip
initial import, works.HEADmaster
-rw-r--r--.gitignore1
-rwxr-xr-xbin/busyboxbin0 -> 1996648 bytes
-rwxr-xr-xbin/cryptsetupbin0 -> 59096 bytes
-rwxr-xr-xbin/kexecbin0 -> 162776 bytes
l---------bin/sh1
-rwxr-xr-xbin/zfsbin0 -> 107208 bytes
-rwxr-xr-xbin/zpoolbin0 -> 151584 bytes
l---------etc/mtab1
-rw-r--r--genlibdir.sh2
-rwxr-xr-xinit57
-rwxr-xr-xlib/ld-2.24.sobin0 -> 148704 bytes
l---------lib/ld-linux-x86-64.so.21
l---------lib/libblkid.so.11
-rwxr-xr-xlib/libblkid.so.1.1.0bin0 -> 299600 bytes
-rwxr-xr-xlib/libc-2.24.sobin0 -> 1652184 bytes
l---------lib/libc.so.61
l---------lib/libcap.so.21
-rwxr-xr-xlib/libcap.so.2.25bin0 -> 22888 bytes
l---------lib/libcryptsetup.so.41
-rwxr-xr-xlib/libcryptsetup.so.4.7.0bin0 -> 162920 bytes
-rwxr-xr-xlib/libdevmapper.so.1.02bin0 -> 415104 bytes
-rwxr-xr-xlib/libdl-2.24.sobin0 -> 10200 bytes
l---------lib/libdl.so.21
l---------lib/libgcrypt.so.201
-rwxr-xr-xlib/libgcrypt.so.20.1.8bin0 -> 1112488 bytes
l---------lib/libgpg-error.so.01
-rwxr-xr-xlib/libgpg-error.so.0.22.0bin0 -> 84408 bytes
l---------lib/liblzma.so.51
-rwxr-xr-xlib/liblzma.so.5.2.3bin0 -> 154096 bytes
-rwxr-xr-xlib/libm-2.24.sobin0 -> 1021976 bytes
l---------lib/libm.so.61
l---------lib/libnvpair.so.11
-rwxr-xr-xlib/libnvpair.so.1.0.1bin0 -> 84736 bytes
l---------lib/libpopt.so.01
-rwxr-xr-xlib/libpopt.so.0.0.0bin0 -> 48056 bytes
-rwxr-xr-xlib/libpthread-2.24.sobin0 -> 130504 bytes
l---------lib/libpthread.so.01
-rwxr-xr-xlib/librt-2.24.sobin0 -> 31400 bytes
l---------lib/librt.so.11
-rwxr-xr-xlib/libudev.so.1bin0 -> 137112 bytes
l---------lib/libuuid.so.11
-rwxr-xr-xlib/libuuid.so.1.3.0bin0 -> 18720 bytes
l---------lib/libuutil.so.11
-rwxr-xr-xlib/libuutil.so.1.0.1bin0 -> 74432 bytes
l---------lib/libz.so.11
-rwxr-xr-xlib/libz.so.1.2.11bin0 -> 92400 bytes
l---------lib/libzfs.so.21
-rwxr-xr-xlib/libzfs.so.2.0.0bin0 -> 304928 bytes
l---------lib/libzfs_core.so.11
-rwxr-xr-xlib/libzfs_core.so.1.0.0bin0 -> 18496 bytes
l---------lib/libzpool.so.21
-rwxr-xr-xlib/libzpool.so.2.0.0bin0 -> 2093848 bytes
l---------lib641
53 files changed, 83 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f24e80a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+lib/modules/
diff --git a/bin/busybox b/bin/busybox
new file mode 100755
index 0000000..82e7846
--- /dev/null
+++ b/bin/busybox
Binary files differ
diff --git a/bin/cryptsetup b/bin/cryptsetup
new file mode 100755
index 0000000..4f5abcd
--- /dev/null
+++ b/bin/cryptsetup
Binary files differ
diff --git a/bin/kexec b/bin/kexec
new file mode 100755
index 0000000..3d738e0
--- /dev/null
+++ b/bin/kexec
Binary files differ
diff --git a/bin/sh b/bin/sh
new file mode 120000
index 0000000..c3fa810
--- /dev/null
+++ b/bin/sh
@@ -0,0 +1 @@
+busybox \ No newline at end of file
diff --git a/bin/zfs b/bin/zfs
new file mode 100755
index 0000000..677800c
--- /dev/null
+++ b/bin/zfs
Binary files differ
diff --git a/bin/zpool b/bin/zpool
new file mode 100755
index 0000000..292425f
--- /dev/null
+++ b/bin/zpool
Binary files differ
diff --git a/etc/mtab b/etc/mtab
new file mode 120000
index 0000000..27e43cc
--- /dev/null
+++ b/etc/mtab
@@ -0,0 +1 @@
+/proc/self/mounts \ No newline at end of file
diff --git a/genlibdir.sh b/genlibdir.sh
new file mode 100644
index 0000000..dbbee8b
--- /dev/null
+++ b/genlibdir.sh
@@ -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
+:
diff --git a/init b/init
new file mode 100755
index 0000000..dad01b3
--- /dev/null
+++ b/init
@@ -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
diff --git a/lib/ld-2.24.so b/lib/ld-2.24.so
new file mode 100755
index 0000000..76c02c0
--- /dev/null
+++ b/lib/ld-2.24.so
Binary files differ
diff --git a/lib/ld-linux-x86-64.so.2 b/lib/ld-linux-x86-64.so.2
new file mode 120000
index 0000000..6b1a56f
--- /dev/null
+++ b/lib/ld-linux-x86-64.so.2
@@ -0,0 +1 @@
+ld-2.24.so \ No newline at end of file
diff --git a/lib/libblkid.so.1 b/lib/libblkid.so.1
new file mode 120000
index 0000000..e4f69c7
--- /dev/null
+++ b/lib/libblkid.so.1
@@ -0,0 +1 @@
+libblkid.so.1.1.0 \ No newline at end of file
diff --git a/lib/libblkid.so.1.1.0 b/lib/libblkid.so.1.1.0
new file mode 100755
index 0000000..5fc1345
--- /dev/null
+++ b/lib/libblkid.so.1.1.0
Binary files differ
diff --git a/lib/libc-2.24.so b/lib/libc-2.24.so
new file mode 100755
index 0000000..9f218f6
--- /dev/null
+++ b/lib/libc-2.24.so
Binary files differ
diff --git a/lib/libc.so.6 b/lib/libc.so.6
new file mode 120000
index 0000000..77d3c6d
--- /dev/null
+++ b/lib/libc.so.6
@@ -0,0 +1 @@
+libc-2.24.so \ No newline at end of file
diff --git a/lib/libcap.so.2 b/lib/libcap.so.2
new file mode 120000
index 0000000..2f02589
--- /dev/null
+++ b/lib/libcap.so.2
@@ -0,0 +1 @@
+libcap.so.2.25 \ No newline at end of file
diff --git a/lib/libcap.so.2.25 b/lib/libcap.so.2.25
new file mode 100755
index 0000000..dd75cd5
--- /dev/null
+++ b/lib/libcap.so.2.25
Binary files differ
diff --git a/lib/libcryptsetup.so.4 b/lib/libcryptsetup.so.4
new file mode 120000
index 0000000..3d6bd52
--- /dev/null
+++ b/lib/libcryptsetup.so.4
@@ -0,0 +1 @@
+libcryptsetup.so.4.7.0 \ No newline at end of file
diff --git a/lib/libcryptsetup.so.4.7.0 b/lib/libcryptsetup.so.4.7.0
new file mode 100755
index 0000000..5c750be
--- /dev/null
+++ b/lib/libcryptsetup.so.4.7.0
Binary files differ
diff --git a/lib/libdevmapper.so.1.02 b/lib/libdevmapper.so.1.02
new file mode 100755
index 0000000..e4c51bd
--- /dev/null
+++ b/lib/libdevmapper.so.1.02
Binary files differ
diff --git a/lib/libdl-2.24.so b/lib/libdl-2.24.so
new file mode 100755
index 0000000..88bcfb6
--- /dev/null
+++ b/lib/libdl-2.24.so
Binary files differ
diff --git a/lib/libdl.so.2 b/lib/libdl.so.2
new file mode 120000
index 0000000..5b0e606
--- /dev/null
+++ b/lib/libdl.so.2
@@ -0,0 +1 @@
+libdl-2.24.so \ No newline at end of file
diff --git a/lib/libgcrypt.so.20 b/lib/libgcrypt.so.20
new file mode 120000
index 0000000..dd4910d
--- /dev/null
+++ b/lib/libgcrypt.so.20
@@ -0,0 +1 @@
+libgcrypt.so.20.1.8 \ No newline at end of file
diff --git a/lib/libgcrypt.so.20.1.8 b/lib/libgcrypt.so.20.1.8
new file mode 100755
index 0000000..59f8290
--- /dev/null
+++ b/lib/libgcrypt.so.20.1.8
Binary files differ
diff --git a/lib/libgpg-error.so.0 b/lib/libgpg-error.so.0
new file mode 120000
index 0000000..4617d28
--- /dev/null
+++ b/lib/libgpg-error.so.0
@@ -0,0 +1 @@
+libgpg-error.so.0.22.0 \ No newline at end of file
diff --git a/lib/libgpg-error.so.0.22.0 b/lib/libgpg-error.so.0.22.0
new file mode 100755
index 0000000..23846ec
--- /dev/null
+++ b/lib/libgpg-error.so.0.22.0
Binary files differ
diff --git a/lib/liblzma.so.5 b/lib/liblzma.so.5
new file mode 120000
index 0000000..0256d7c
--- /dev/null
+++ b/lib/liblzma.so.5
@@ -0,0 +1 @@
+liblzma.so.5.2.3 \ No newline at end of file
diff --git a/lib/liblzma.so.5.2.3 b/lib/liblzma.so.5.2.3
new file mode 100755
index 0000000..0123442
--- /dev/null
+++ b/lib/liblzma.so.5.2.3
Binary files differ
diff --git a/lib/libm-2.24.so b/lib/libm-2.24.so
new file mode 100755
index 0000000..fd41f44
--- /dev/null
+++ b/lib/libm-2.24.so
Binary files differ
diff --git a/lib/libm.so.6 b/lib/libm.so.6
new file mode 120000
index 0000000..c3a11f3
--- /dev/null
+++ b/lib/libm.so.6
@@ -0,0 +1 @@
+libm-2.24.so \ No newline at end of file
diff --git a/lib/libnvpair.so.1 b/lib/libnvpair.so.1
new file mode 120000
index 0000000..919f120
--- /dev/null
+++ b/lib/libnvpair.so.1
@@ -0,0 +1 @@
+libnvpair.so.1.0.1 \ No newline at end of file
diff --git a/lib/libnvpair.so.1.0.1 b/lib/libnvpair.so.1.0.1
new file mode 100755
index 0000000..ef06395
--- /dev/null
+++ b/lib/libnvpair.so.1.0.1
Binary files differ
diff --git a/lib/libpopt.so.0 b/lib/libpopt.so.0
new file mode 120000
index 0000000..64edd19
--- /dev/null
+++ b/lib/libpopt.so.0
@@ -0,0 +1 @@
+libpopt.so.0.0.0 \ No newline at end of file
diff --git a/lib/libpopt.so.0.0.0 b/lib/libpopt.so.0.0.0
new file mode 100755
index 0000000..7ab18c9
--- /dev/null
+++ b/lib/libpopt.so.0.0.0
Binary files differ
diff --git a/lib/libpthread-2.24.so b/lib/libpthread-2.24.so
new file mode 100755
index 0000000..d2361c0
--- /dev/null
+++ b/lib/libpthread-2.24.so
Binary files differ
diff --git a/lib/libpthread.so.0 b/lib/libpthread.so.0
new file mode 120000
index 0000000..b195df2
--- /dev/null
+++ b/lib/libpthread.so.0
@@ -0,0 +1 @@
+libpthread-2.24.so \ No newline at end of file
diff --git a/lib/librt-2.24.so b/lib/librt-2.24.so
new file mode 100755
index 0000000..a69c683
--- /dev/null
+++ b/lib/librt-2.24.so
Binary files differ
diff --git a/lib/librt.so.1 b/lib/librt.so.1
new file mode 120000
index 0000000..dffcece
--- /dev/null
+++ b/lib/librt.so.1
@@ -0,0 +1 @@
+librt-2.24.so \ No newline at end of file
diff --git a/lib/libudev.so.1 b/lib/libudev.so.1
new file mode 100755
index 0000000..25d24f0
--- /dev/null
+++ b/lib/libudev.so.1
Binary files differ
diff --git a/lib/libuuid.so.1 b/lib/libuuid.so.1
new file mode 120000
index 0000000..774fbfe
--- /dev/null
+++ b/lib/libuuid.so.1
@@ -0,0 +1 @@
+libuuid.so.1.3.0 \ No newline at end of file
diff --git a/lib/libuuid.so.1.3.0 b/lib/libuuid.so.1.3.0
new file mode 100755
index 0000000..d0392af
--- /dev/null
+++ b/lib/libuuid.so.1.3.0
Binary files differ
diff --git a/lib/libuutil.so.1 b/lib/libuutil.so.1
new file mode 120000
index 0000000..3663af3
--- /dev/null
+++ b/lib/libuutil.so.1
@@ -0,0 +1 @@
+libuutil.so.1.0.1 \ No newline at end of file
diff --git a/lib/libuutil.so.1.0.1 b/lib/libuutil.so.1.0.1
new file mode 100755
index 0000000..1ea9d02
--- /dev/null
+++ b/lib/libuutil.so.1.0.1
Binary files differ
diff --git a/lib/libz.so.1 b/lib/libz.so.1
new file mode 120000
index 0000000..95e0ebd
--- /dev/null
+++ b/lib/libz.so.1
@@ -0,0 +1 @@
+libz.so.1.2.11 \ No newline at end of file
diff --git a/lib/libz.so.1.2.11 b/lib/libz.so.1.2.11
new file mode 100755
index 0000000..f654542
--- /dev/null
+++ b/lib/libz.so.1.2.11
Binary files differ
diff --git a/lib/libzfs.so.2 b/lib/libzfs.so.2
new file mode 120000
index 0000000..0af7a26
--- /dev/null
+++ b/lib/libzfs.so.2
@@ -0,0 +1 @@
+libzfs.so.2.0.0 \ No newline at end of file
diff --git a/lib/libzfs.so.2.0.0 b/lib/libzfs.so.2.0.0
new file mode 100755
index 0000000..fbd3849
--- /dev/null
+++ b/lib/libzfs.so.2.0.0
Binary files differ
diff --git a/lib/libzfs_core.so.1 b/lib/libzfs_core.so.1
new file mode 120000
index 0000000..45b67b6
--- /dev/null
+++ b/lib/libzfs_core.so.1
@@ -0,0 +1 @@
+libzfs_core.so.1.0.0 \ No newline at end of file
diff --git a/lib/libzfs_core.so.1.0.0 b/lib/libzfs_core.so.1.0.0
new file mode 100755
index 0000000..58372d9
--- /dev/null
+++ b/lib/libzfs_core.so.1.0.0
Binary files differ
diff --git a/lib/libzpool.so.2 b/lib/libzpool.so.2
new file mode 120000
index 0000000..d9042d3
--- /dev/null
+++ b/lib/libzpool.so.2
@@ -0,0 +1 @@
+libzpool.so.2.0.0 \ No newline at end of file
diff --git a/lib/libzpool.so.2.0.0 b/lib/libzpool.so.2.0.0
new file mode 100755
index 0000000..71f6969
--- /dev/null
+++ b/lib/libzpool.so.2.0.0
Binary files differ
diff --git a/lib64 b/lib64
new file mode 120000
index 0000000..7951405
--- /dev/null
+++ b/lib64
@@ -0,0 +1 @@
+lib \ No newline at end of file