Add zfs-chroot helper script
This commit is contained in:
parent
85e2c13477
commit
b584217033
|
@ -56,6 +56,7 @@ install() {
|
|||
fi
|
||||
dracut_install /usr/bin/mount.zfs
|
||||
dracut_install /usr/lib/udev/vdev_id
|
||||
dracut_install /usr/lib/udev/zvol_id
|
||||
dracut_install awk
|
||||
dracut_install basename
|
||||
dracut_install cut
|
||||
|
@ -75,12 +76,11 @@ install() {
|
|||
dracut_install mount
|
||||
dracut_install df
|
||||
dracut_install ip
|
||||
dracut_install /usr/bin/timeout
|
||||
dracut_install /usr/bin/mkdir
|
||||
dracut_install /usr/bin/tail
|
||||
dracut_install /usr/lib/udev/zvol_id
|
||||
inst_simple "${moddir}/zfsbootmenu-lib.sh" "/lib/zfsbootmenu-lib.sh"
|
||||
inst_simple "${moddir}/zfsbootmenu-preview.sh" "/bin/zfsbootmenu-preview.sh"
|
||||
inst_simple "${moddir}/zfs-chroot" "/bin/zfs-chroot"
|
||||
inst_hook cmdline 95 "${moddir}/zfsbootmenu-parse-commandline.sh"
|
||||
inst_hook pre-mount 90 "${moddir}/zfsbootmenu.sh"
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir /mnt
|
||||
mount -t proc proc /mnt/proc
|
||||
mount -t sysfs sys /mnt/sys
|
||||
mount -B /dev /mnt/dev
|
||||
mount -t devpts pts /mnt/dev/pts
|
||||
|
||||
mount -o zfsutil -t zfs "${1}" /mnt
|
||||
chroot /mnt
|
Loading…
Reference in New Issue