Skip to content
Snippets Groups Projects
Commit 11429d36 authored by Colin Watson's avatar Colin Watson
Browse files

Add minimal support for NTFS partitions using ntfs-3g.

parent 0156070c
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ method=$(cat $part/method)
filesystem=$(cat $part/acting_filesystem)
case "$filesystem" in
ext2|fat16|fat32)
ext2|fat16|fat32|ntfs)
:
;;
*)
......@@ -26,7 +26,7 @@ esac
choice_mountpoint () {
case "$filesystem" in
ext2|fat16|fat32)
ext2|fat16|fat32|ntfs)
if [ -f $part/mountpoint ]; then
mp=$(cat $part/mountpoint)
else
......
......@@ -21,7 +21,7 @@ do_fatmountpoint () {
old_mountpoint=/
fi
case "$filesystem" in
fat16|fat32)
fat16|fat32|ntfs)
tpl=partman-basicfilesystems/fat_mountpoint
;;
*)
......@@ -81,7 +81,7 @@ do_mountpoint_manual () {
case $1 in
mountpoint)
code=0
if [ "$filesystem" = fat16 ] || [ "$filesystem" = fat32 ]; then
if [ "$filesystem" = fat16 ] || [ "$filesystem" = fat32 ] || [ "$filesystem" = ntfs ]; then
do_fatmountpoint || code=$?
else
select_mountpoint $dev $id || code=$?
......
......@@ -20,7 +20,7 @@ for dev in $DEVICES/*; do
[ -f $id/acting_filesystem ] || continue
filesystem=$(cat $id/acting_filesystem)
case $filesystem in
fat16|fat32)
fat16|fat32|ntfs)
[ -f "$id/mountpoint" ] || continue
mountpoint="$(cat "$id/mountpoint")"
# Check for FAT file systems mounted in places where POSIX
......
......@@ -20,7 +20,7 @@ for dev in $DEVICES/*; do
[ -f $id/acting_filesystem ] || continue
filesystem=$(cat $id/acting_filesystem)
case "$filesystem" in
ext2|fat16|fat32)
ext2|fat16|fat32|ntfs)
[ ! -f "$id/mountpoint" ] || continue
db_subst partman-basicfilesystems/no_mount_point PARTITION "$num"
db_subst partman-basicfilesystems/no_mount_point FILESYSTEM "$filesystem"
......
partman-basicfilesystems (98) UNRELEASED; urgency=medium
* Add minimal support for NTFS partitions using ntfs-3g.
-- Colin Watson <cjwatson@debian.org> Sat, 30 Aug 2014 19:18:02 -0700
partman-basicfilesystems (97) unstable; urgency=medium
* dosfstools has a good deal of Linux-specific code and isn't currently
......
......@@ -14,4 +14,4 @@ Package-Type: udeb
Architecture: any
Depends: ${misc:Depends}, e2fsprogs-udeb, ext2-modules, fat-modules, dosfstools-udeb [linux-any]
Provides: partman-filesystem
Description: Add to partman support for ext2, linux-swap, fat16 and fat32
Description: Add to partman support for ext2, linux-swap, fat16, fat32 and ntfs
......@@ -234,6 +234,17 @@ Type: text
# Short file system name (untranslatable in many languages)
_Description: fat32
Template: partman/filesystem_long/ntfs
Type: text
# :sl2:
_Description: NTFS journaling file system
Template: partman/filesystem_short/ntfs
Type: text
# :sl1:
# Short file system name (untranslatable in many languages)
_Description: ntfs
Template: partman/method_long/swap
Type: text
# :sl2:
......
......@@ -94,6 +94,15 @@ for dev in $DEVICES/*; do
settrans -pk "/target/$mountpoint" /hurd/fatfs "$path"
fi
;;
ntfs)
[ -f "$id/mountpoint" ] || continue
mountpoint=$(cat $id/mountpoint)
options=$(get_mountoptions $dev $id)
if [ "$utf8" ] && [ ! -f /var/lib/partman/ntfs-3g ]; then
options="$options,nls=utf8"
fi
echo "$path" "$mountpoint" ntfs $options 0 0
;;
esac
done
close_dialog
......
......@@ -12,6 +12,12 @@ case `udpkg --print-os` in
if [ "$module_name" = vfat ]; then
>/var/lib/partman/vfat
fi
if [ "$module_name" = fuse ]; then
>/var/lib/partman/fuse
fi
if [ "$module_name" = ntfs ]; then
>/var/lib/partman/ntfs
fi
done
if ! [ -f /var/lib/partman/ext2 ] && \
......@@ -24,12 +30,35 @@ case `udpkg --print-os` in
>/var/lib/partman/vfat
fi
if ! [ -f /var/lib/partman/fuse ] && \
modprobe fuse >/dev/null 2>/dev/null
then
>/var/lib/partman/fuse
fi
if type ntfs-3g >/dev/null 2>&1 && \
[ -f /var/lib/partman/fuse ] && \
grep -q fuseblk /proc/filesystems
then
>/var/lib/partman/ntfs
>/var/lib/partman/ntfs-3g
fi
if ! [ -f /var/lib/partman/ntfs ] && \
modprobe ntfs >/dev/null 2>/dev/null
then
>/var/lib/partman/ntfs
fi
if grep -q ext2 /proc/filesystems; then
>/var/lib/partman/ext2
fi
if grep -q vfat /proc/filesystems; then
>/var/lib/partman/vfat
fi
if grep -q ntfs /proc/filesystems; then
>/var/lib/partman/ntfs
fi
;;
hurd)
......
ro
sync
ntfs
10 ext2
80 fat
80 ntfs
#!/bin/sh
dev=$1
id=$2
property=$3
[ -f /var/lib/partman/ntfs ] || exit 0
case $property in
formatable)
;;
existing)
[ -f $id/detected_filesystem ] || exit 0
fs=$(cat $id/detected_filesystem)
case "$fs" in
ntfs)
echo ntfs
;;
esac
;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment