Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to umount partition on Linux- cant find it...
#1
Hi-

 I purchased, installed and tried using this on FC33.  It seems to work fine for me, except....

 I've searched, and searched, and searched for how to cleanly umount the partition, but cannot find it.

 I'm a long, long time Linux developer and could certainly kill and umount the chain of processes and loopback mounts, but this seems a bit harsh.

 umounting a mounted partition is very counter intuitive.

 Also, the mounted (in my case)  /dev/sdc2 and /mnt/BitLockerAnaywhere/.sdc2-raw, or /mnt/BitLockerAnywhere/sdc2   do not even show up in the mounted filesystems list in the left (DEVICES) pane.  why not?   Decending into the mounted subdirs etc. works fine and all files are present, so the mount and such are OK.

ron
Reply
#2
in my case, for sdc2, I was able to umount the encrypted partition by running these commands from a root shell:

   umount /mnt/BitLockerAnywhere/sdc2  &&  umount /mnt/BitLockerAnywhere/.sdc2-raw 

 ...easy enough to parameterize or autoscan from a bash script, but we shouldn't have to...

 Although I run commandline the vast majority of the time, this is a little crude for something that mounts from a GUI.


 I could provide screenshots if helpful-

ron
Reply
#3
to be run as  'root' user, I wrote two simple mount/umount scripts below and stuck them in  /usr/local/bin .  The umount script also kills the BitLockerAnywhere prog.

This handles multiple BitLocker mount-points..



# ===================



mount_encrypted_drive.sh



#!/bin/sh

sync
/usr/local/bin/bitlocker-anywhere/bin/run.sh
sync







# ================



umount_encrypted_drive.sh


#!/bin/sh


bl_drives=$(ls -al /mnt/BitLockerAnywhere/ | grep " sd" | awk '{print $NF}' | tr '\n' ' ')
#echo "bl_drives = $bl_drives"

for bl_drive in $bl_drives ; do
echo "bl_drive = $bl_drive"
  if mount | grep "$bl_drive" >& /dev/null ; then
    echo "umounting: $bl_drive"
    umount /mnt/BitLockerAnywhere/$bl_drive
    sync
    sleep 1
    umount /mnt/BitLockerAnywhere/.${bl_drive}-raw
  fi
done

sync

if [ 1 ] ; then
  while true ; do
    x=$(ps axh | grep "/BitLockerAnywhere" | grep -v "grep " ) ; x=$(echo $x) ; x=${x%% *} ; [ -n "$x" ] && kill -9 $x
    [ -z "$x" ] && break
  done
fi

sync
Reply
#4
(06-26-2022, 11:28 AM)rjflory Wrote: Hi-

 I purchased, installed and tried using this on FC33.  It seems to work fine for me, except....

 I've searched, and searched, and searched for how to cleanly umount the partition, but cannot find it.

 I'm a long, long time Linux developer and could certainly kill and umount the chain of processes and loopback mounts, but this seems a bit harsh.

 umounting a mounted partition is very counter intuitive.

 Also, the mounted (in my case)  /dev/sdc2 and /mnt/BitLockerAnaywhere/.sdc2-raw, or /mnt/BitLockerAnywhere/sdc2   do not even show up in the mounted filesystems list in the left (DEVICES) pane.  why not?   Decending into the mounted subdirs etc. works fine and all files are present, so the mount and such are OK.

ron 1v1 lol

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)