summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pereira Neves2014-09-12 21:02:05 +0200
committerMichael Pereira Neves2014-10-28 14:14:50 +0100
commit7c0e77bd716e58fbfa51aea7d9eb3447336b2447 (patch)
tree5fe1e1d7166ad77765f141e296cdf9b3b925420c
parent[partitioner] corrected config path (diff)
downloadtm-scripts-7c0e77bd716e58fbfa51aea7d9eb3447336b2447.tar.gz
tm-scripts-7c0e77bd716e58fbfa51aea7d9eb3447336b2447.tar.xz
tm-scripts-7c0e77bd716e58fbfa51aea7d9eb3447336b2447.zip
[setup_partitions] make mounting more verbose
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions19
1 files changed, 14 insertions, 5 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
index 8cdfe21a..1f29ec7d 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
@@ -57,7 +57,8 @@ diskfm () {
mopt="-o noexec"
;;
esac
- mkfs.$fs ${fopt} "${target}"
+ echo "formatting ${target} with $fs..."
+ mkfs.$fs ${fopt} "${target}" 2> /dev/null
fi
[ -n "$found" ] && break
fi
@@ -95,12 +96,12 @@ mount_partition () {
mkdir -p "$mountpoint"
if ! blkid -s TYPE | grep "${partition}" ; then
- echo "No fs found for partition, formating..."
+ echo "No fs found for ${partition}, formating..."
diskfm "$partition" "jfs xfs ext3" || return $?
mount -t auto -o noexec "$partition" "$mountpoint" || return $?
else
if ! mount -t auto -o noexec "$partition" "$mountpoint" ; then
- echo "Mount failed with code $?, trying fsck..."
+ echo "Mount of $partition on $mountpoint failed with code $?, trying fsck..."
fsck "$partition" || return $?
mount -t auto -o noexec "$partition" "$mountpoint" || return $?
fi
@@ -135,7 +136,8 @@ read_partitions () {
if [ -z "${SLX_PARTITION_TABLE}" ]; then
SLX_PARTITION_TABLE='
44,10G,/tmp
- 45,10G,/var/scratch,persistent'
+ 45,10G,/var/scratch,persistent
+ 82,4G'
fi
read_partitions
@@ -157,13 +159,15 @@ for PARTITION in $SLX_PARTITION_TABLE; do
HAVE_TEMP="no"
TMP_SIZE=$size
for tmppart in $(grep -e "44$\|44000000-0000-0000-0000-000000000000$" /etc/disk.partition | cut -d ' ' -f1); do
+ echo "tmp partition found, formatting and mounting..."
if diskfm "$tmppart"; then
# echo "$tmppart is mounted to /mnt/tmp at $(sysup)" >/tmp/tmpready
mount_temp "$mopt" "$tmppart" || continue
echo -e "${tmppart}\t/tmp\t\tauto\t\tnoexec\t 0 0" >> "/etc/fstab"
HAVE_TEMP="yes"
+ echo "$tmppart mounted on /tmp"
else
- echo "formatting failed for some reason"
+ echo "formatting tmp partition failed for some reason"
fi # Made this non-forking, systemd should handle it - 2013-05-28
done
;;
@@ -174,6 +178,7 @@ for PARTITION in $SLX_PARTITION_TABLE; do
#test -d /mnt/media/${openslxpart#/dev/*}/home && \
#ln -sf /media/${openslxpart#/dev/*} /var/home
echo -e "${openslxpart}\t/media/${openslxpart#/dev/*}\tauto\t\tnoauto\t\t 0 0" >> "/etc/fstab"
+ echo "special partition ${openslxpart} mounted on /media/${openslxpart#/dev/*}"
done
;;
82)
@@ -182,6 +187,7 @@ for PARTITION in $SLX_PARTITION_TABLE; do
for swppart in $(grep -e "82$\|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F$" /etc/disk.partition | cut -d ' ' -f1); do
echo -e "$swppart\tswap\t\tswap\t\tdefaults\t 0 0" >> "/etc/fstab"
swapon "$swppart" -p 10 && HAVE_SWAP=yes # low priority, in case we have zram swap, prefer that)
+ echo "swap partition found and activated"
done
;;
*)
@@ -191,6 +197,8 @@ for PARTITION in $SLX_PARTITION_TABLE; do
if [ $mount_status -ne 0 ]; then
echo "Mount of partition $hdpartnr on ${mountpoint} failed with exit code: $mount_status"
[ -d "${mountpoint}" ] && rm -r "${mountpoint}"
+ else
+ echo "special partition $hdpartnr mounted on ${mountpoint}"
fi
done
;;
@@ -203,6 +211,7 @@ for linuxpart in $(grep -e "83$\|0FC63DAF-8483-4772-8E79-3D69D8477DE4$" /etc/dis
mountpoint="/media"
mkdir -p "${mountpoint}/${linuxpart#/dev/*}"
echo -e "${linuxpart}\t${mountpoint}/${linuxpart#/dev/*}\tauto\t\tnoauto,noexec\t 0 0" >> "/etc/fstab"
+ echo "linux partition ${linuxpart} mounted on ${mountpoint}/${linuxpart#/dev/*}"
done
mount -a