NTFS-3G and bitlocker drive formats

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

NTFS-3G and bitlocker drive formats

Post#16 by Ed_P » 13 Jan 2022, 05:42

I was able to turn bitlocker off using a Windows' setting not dislocker. The trouble with accessing the nvme0 drives could be due to them being set to be invisible, according to what GParted shows them as. What I want to do now is copy the whole SSD to a larger SSD, just not sure how to do that. Does DD copy partitions or whole harddrives? A utility that makes a mirror of all the SSD's visible and invisible drives completely would be great.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

NTFS-3G and bitlocker drive formats

Post#17 by Rava » 29 Jan 2022, 10:00

Ed_P wrote:
13 Jan 2022, 05:42
Does DD copy partitions or whole harddrives?
I presume you mean "dd" not "DD", and it can copy both.
Though when copying say /dev/sda instead of /dev/sda1 it would copy even unused unallocated space on /dev/sda. But similar with copying /dev/sda1 it also would copy "empty" areas where no file ever was or where data of deleted files or folders are…

But how do you plan on accessing the files when you copy, say, the whole of /dev/sda ? It would be one huge file you get, and you could not mount it since it would not be a valid partition.

Unlike when you copy /dev/sda1 , /dev/sda2 etcetera. These might be able to be mounted when they are valid file systems that your Linux can handle.

Maybe TestDisk & PhotoRec 7.2 WIP can help you access (=recover) files on the resulting file, though.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

NTFS-3G and bitlocker drive formats

Post#18 by Ed_P » 29 Jan 2022, 19:18

Rava wrote:
29 Jan 2022, 10:00
I presume you mean "dd" not "DD", and it can copy both.
Though when copying say /dev/sda instead of /dev/sda1 it would copy even unused unallocated space on /dev/sda. But similar with copying /dev/sda1 it also would copy "empty" areas where no file ever was or where data of deleted files or folders are…
Yes, I meant "dd". And I did find what you said about copying. I've been trying to make my new 256 GB notebook as functional as my old 1 TB notebook. My initial approach was to take the 1 TB SSD drive in the old notebook out and replace it with the original 1 TB hdd, copy all the files on the SSD drive to the old hdd drive, then copy the 256 GB drive to the SSD drive, while leaving the Data partition with all my personal files and Linux systems intact on it, and then replacing the 256 GB SSD with my 1 TB SSD.

That plan crashed when I found the 256 GB SSD is an m.2 style drive while mine is a sata style drive. The 2nd shoe dropped when I tried to boot my old notebook with it's old updated hdd and it failed to boot. And the fall down the stairs came when the Windows backup of the sata SSD drive couldn't be restored because it was done of the SSD drive's files and the current drive is a hhd. So I'm now in the process of restore the old notebook's SSD drive with the drives on the hhd drive so I can do a Windows restore.

For the new notebook I will order a new larger m.2 drive. Probably about 512 GB. So more dd copying to be done.

FWIW my current clonedrv.sh script.

Code: Select all

#!/bin/sh

# https://www.tecmint.com/clone-linux-partitions/

ID=sda    # Input device
OD=sdb    # Output device

function Title() {
  echo -en "\033]0;$1\a";
}

if [ `whoami` != "root" ]; then
   echo "Enter root's password"
   su -c "sh $0 $1"
   exit
fi

Title "Clone Drive"

echo && echo "Input device"
#lsblk #df -h #df
#fdisk -l /dev/$ID 
lsblk -f --output NAME,FSTYPE,LABEL,SIZE | grep $ID
echo && echo "Output device"
#fdisk -l /dev/$OD 
lsblk -f --output NAME,FSTYPE,LABEL,SIZE | grep $OD

echo
#set -x;
read -p "Enter Drive number? " DRV1
if [ ! "$DRV1" == "" ]; then
   ID=$ID$DRV1
   read -p "Enter Drive number 2? " DRV2
   if [ ! "$DRV2" == "" ]; then
      OD=$OD$DRV2
   else
      OD=$OD$DRV1
   fi
fi
echo 
read -p "Copy /dev/$ID to /dev/$OD? (y/n) " YN
if [ ! "$YN" == "y" ]; then
   exit
fi

echo && date && echo
dd bs=1M if=/dev/$ID  of=/dev/$OD status=progress
echo && date && echo

lsblk -f --output NAME,FSTYPE,LABEL,SIZE,FSUSED | grep $ID
lsblk -f --output NAME,FSTYPE,LABEL,SIZE,FSUSED | grep $OD
read
:)
Last edited by Ed_P on 30 Jan 2022, 17:35, edited 1 time in total.
Reason: Tweaked script with Rava suggestion.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

NTFS-3G and bitlocker drive formats

Post#19 by Rava » 30 Jan 2022, 14:28

Code: Select all

read -p "Copy /dev/$ID to /dev/$OD? " YN
if [ ! "$YN" == "y" ]; then
   exit
fi
I would insert the info that a "(y/n)" (as in "y" or "n") is wanted, else a user unfamiliar with the script could enter uppercase "Y" and that would abort the script:

Code: Select all

read -p "Copy /dev/$ID to /dev/$OD? (y/n) " YN
if [ ! "$YN" == "y" ]; then
   exit
fi
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

NTFS-3G and bitlocker drive formats

Post#20 by Ed_P » 30 Jan 2022, 17:32

Rava wrote:
30 Jan 2022, 14:28
I would insert the info that a "(y/n)" (as in "y" or "n") is wanted, else a user unfamiliar with the script could enter uppercase "Y" and that would abort the script:
:) I agree. Thank you Rava. :friends:
Ed

Testuser
Samurai
Samurai
Posts: 137
Joined: 26 May 2021, 15:11
Distribution: Porteus-v5.0-64-LXDE

NTFS-3G and bitlocker drive formats

Post#21 by Testuser » 05 Feb 2022, 17:03

Hi Ed_P,

Like Beny said you need to use the command - sudo dislocker -r -V /dev/nvme0n1p3 -uYourPassword -- /media/bitlocker with bitlocker.

You can reset the bitlock password for a drive easily in Windows 10 by right clicking the corresponding drives. Then you can use the password in the command above.

You can also use -p option if you have the blocker recovery key which can be obtained by following the below link.

https://support.microsoft.com/en-us/win ... 6f5ab347d6

Once you have the password or recovery key. You can use a simple script to automate it in bash script

Use -p for recovery key.

Sample Script
------------------------------------------------------------------------------------------------------------------------------

Code: Select all

echo -e "Please enter Bitlocker Drive device ID (eg. /dev/sda3 or /dev/sda6 )" | fmt -w 80
read -e dev;echo

echo -e "Enter Bitlocker folder to mount other partitions (eg. bitlocker1,2,etc..)" | fmt -w 80
read -e bitlocker;echo

mkdir /home/$bitlocker

echo Copy and paste the recovery key at next prompt

read -n 1 -s -r -u $'Press any key after copying to continue...\n'

echo -e "Please enter or paste the Password " | fmt -w 80
read -e DrivePass;echo

sudo dislocker  $dev -u$DrivePass -- /home/$bitlocker
sleep 2

echo -e "Enter Directory Name to mount partition (eg. mount1,2,etc.. )" | fmt -w 80
read -e mountpoint;echo

mkdir /home/$mountpoint

sudo mount -rw -o loop /home/$bitlocker/dislocker-file /home/$mountpoint
sleep 2
pcmanfm /home/$mountpoint
Last edited by Ed_P on 05 Feb 2022, 17:10, edited 1 time in total.
Reason: Added code tags for sample script.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

NTFS-3G and bitlocker drive formats

Post#22 by Ed_P » 05 Feb 2022, 17:29

Thank you Testuser. I like your script. :happy62:

My main problem was not knowing the drive's password on my new notebook. In fact I still don't but apparently I knew it long enough to turn the stupid function off. :D
Ed

Testuser
Samurai
Samurai
Posts: 137
Joined: 26 May 2021, 15:11
Distribution: Porteus-v5.0-64-LXDE

NTFS-3G and bitlocker drive formats

Post#23 by Testuser » 06 Feb 2022, 09:14

Hi Ed_P,

Thanks for the reply.

You can use below URL for more details on Bitlocker Recovery.

This will be handy for any such scenario.

https://adamtheautomator.com/bitlocker-recovery-key/
:)

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

NTFS-3G and bitlocker drive formats

Post#24 by Ed_P » 06 Feb 2022, 20:23

Thanks Testuser.

My latest problem is with the drive that I removed the bitlocker from. I shrunk it by 50GB so I could have a Data partition for my ISOs, Porteus and other personal files. In Windows I could access it but not in Porteus. I tried tweaking the system's settings and took it out of RAID mode now the notebook fails to boot. Not a fan of Dell notebooks at this point.
Ed

Testuser
Samurai
Samurai
Posts: 137
Joined: 26 May 2021, 15:11
Distribution: Porteus-v5.0-64-LXDE

NTFS-3G and bitlocker drive formats

Post#25 by Testuser » 28 Feb 2022, 11:21

Hi Ed,

If bitlocker was properly removed, then you should be able to access drive from Porteus.

Hope the below URL help you with proper disabling of Bitlocker in Dell machines.

https://www.dell.com/support/kbdoc/en-i ... in-windows

https://www.manageengine.com/products/o ... ption.html
:)

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

NTFS-3G and bitlocker drive formats

Post#26 by Ed_P » 28 Feb 2022, 15:56

Thank you Testuser. I was able to resolve most of the Dell's problems with my Porteus 5.0 system. :)
Ed

ponchdesarrolladas
Ronin
Ronin
Posts: 1
Joined: 08 Feb 2023, 22:50
Distribution: porteus

NTFS-3G and bitlocker drive formats

Post#27 by ponchdesarrolladas » 08 Feb 2023, 23:03

beny wrote:
11 Jan 2022, 20:00
hi Ed_P here you have dislocker and mbedtls: https://www.mediafire.com/folder/zyug3gvg7fhu5/dslocker
Hi Beny, that link is no longer valid. Can you please repost, or is it somewhere else now?
Thank you

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

NTFS-3G and bitlocker drive formats

Post#28 by beny » 09 Feb 2023, 00:44

https://www.mediafire.com/folder/zhl0ji ... /dislocker hi, you have two file inside and you have to convert to xzm try if work for you.

Post Reply