summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Schirottke <master@kanotix.com>2014-06-25 00:44:28 +0200
committerHolger Paradies <retabell@gmx.de>2014-09-10 23:11:25 +0200
commit703ab2a890d3b7ae3122c0fd04ef4777237f7bbd (patch)
treeed72b9dcaf0e3b8a1df32440fde797026a695fe8
parentc2363714af5fb68650451f8e6d55b76a20950419 (diff)
downloadacritoxinstaller-703ab2a890d3b7ae3122c0fd04ef4777237f7bbd.zip
acritoxinstaller-703ab2a890d3b7ae3122c0fd04ef4777237f7bbd.tar.gz
btrfs fixes and lzo support
-rw-r--r--backend/modules/hdmap12
-rw-r--r--backend/modules/install_main11
-rw-r--r--backend/modules/partitions4
3 files changed, 20 insertions, 7 deletions
diff --git a/backend/modules/hdmap b/backend/modules/hdmap
index ee447b4..ed872bf 100644
--- a/backend/modules/hdmap
+++ b/backend/modules/hdmap
@@ -246,15 +246,23 @@ function prepare_partitions_for_install()
emit_progress 0
local progress_steps=$(( $(wc -l <<<"$cfg_hdmap") ))
local progress=0
+ local mountoptions=""
while IFS=: read device mountpoint filesystem automount
do
[ -z "$mountpoint" ] && continue
[ "$1" != "--nomount" ] && umount_all_affected $device
-
+
+ mountoptions=""
+ if [ "$filesystem" = "btrfs-lzo" ]; then
+ filesystem="btrfs"
+ mountoptions="-o compress=lzo"
+ fi
+
# format device with filesystem (if specified)
if [ "$filesystem" ]; then
+ wipefs -a $device # clean all old signatures
dd if=/dev/zero of=$device bs=1k count=16 >/dev/null 2>/dev/null # shutup! :-)
TMP=/tmp/mkfs.$$
@@ -296,7 +304,7 @@ function prepare_partitions_for_install()
# (or 4. the mountpoint is a special one that always should be mounted [/boot/efi])
if [ "$automount" = "auto" -a "$1" != "--nomount" ] && [ -d "/live/filesystem$mountpoint" -o "$mountpoint" = "/boot/efi" ]; then
# mount device to mountpoint
- EC="$(LC_ALL=C mount $device ${TARGET}${mountpoint} 2>&1)"
+ EC="$(LC_ALL=C mount $mountoptions $device ${TARGET}${mountpoint} 2>&1)"
if (($?)); then
case "$EC" in
"*already mounted*") # then let's try "mount --bind"
diff --git a/backend/modules/install_main b/backend/modules/install_main
index e7629a0..275415c 100644
--- a/backend/modules/install_main
+++ b/backend/modules/install_main
@@ -66,10 +66,15 @@ EOF
if [ "$mountpoint" = "/" ]; then
fstab_pass=1
case $fstab_type in
- btrfs)
+ btrfs)
fstab_options="defaults"
- fstab_pass=0
- ;;
+ fstab_pass=0
+ ;;
+ btrfs-lzo)
+ fstab_options="defaults,compress=lzo"
+ fstab_pass=0
+ fstab_type="btrfs"
+ ;;
reiser*|xfs|jfs)
fstab_options="defaults"
;;
diff --git a/backend/modules/partitions b/backend/modules/partitions
index eac5e6f..4ea9b55 100644
--- a/backend/modules/partitions
+++ b/backend/modules/partitions
@@ -299,7 +299,7 @@ function send_possible_root_partitions()
function send_possible_root_filesystems()
{
send data possible_root_filesystems
- for fs in ext4 ext3 reiserfs btrfs xfs jfs; do echo $fs; done
+ for fs in ext4 ext3 reiserfs btrfs btrfs-lzo xfs jfs; do echo $fs; done
}
# Synopsis: get_filesystem <device>
@@ -332,7 +332,7 @@ function get_filesystem_type()
filesystem="$(get_filesystem "$1")"
fi
case $filesystem in
- ext4|ext3|ext2|reiserfs|xfs|minix|hfs|efs|reiser4|jfs|btrfs) echo Linux;;
+ ext4|ext3|ext2|reiserfs|xfs|minix|hfs|efs|reiser4|jfs|btrfs*) echo Linux;;
iso9660) echo CD-ROM;;
vfat) echo DOS;;
ntfs) echo Windows;;