Browse Source

Merge pull request #191 from robert-scheck/master

Add NTFS support to 90dmsquash-live module
master
Harald Hoyer 8 years ago committed by GitHub
parent
commit
26264af7f5
  1. 22
      modules.d/90dmsquash-live-ntfs/module-setup.sh
  2. 15
      modules.d/90dmsquash-live/dmsquash-live-root.sh

22
modules.d/90dmsquash-live-ntfs/module-setup.sh

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
#!/bin/bash

command -v

check() {
require_binaries ntfs-3g || return 1
return 255
}

depends() {
echo 90dmsquash-live
return 0
}

install() {
inst_multiple fusermount ulockmgr_server mount.fuse ntfs-3g
dracut_need_initqueue
}

installkernel() {
hostonly='' instmods fuse
}

15
modules.d/90dmsquash-live/dmsquash-live-root.sh

@ -78,7 +78,20 @@ if [ -f $livedev ]; then @@ -78,7 +78,20 @@ if [ -f $livedev ]; then
esac
[ -e /sys/fs/$fstype ] || modprobe $fstype
else
mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live
if [ "$(blkid -o value -s TYPE $livedev)" != "ntfs" ]; then
mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live
else
# Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot
# at the first glance, but ends with lots and lots of squashfs
# errors, because systemd attempts to kill the ntfs-3g process?!
if [ -x "$(find_binary "ntfs-3g")" ]; then
( exec -a @ntfs-3g ntfs-3g -o ${liverw:-ro} $livedev /run/initramfs/live ) | vwarn
else
die "Failed to mount block device of live image: Missing NTFS support"
exit 1
fi
fi

if [ "$?" != "0" ]; then
die "Failed to mount block device of live image"
exit 1

Loading…
Cancel
Save