NTFS-3G and bitlocker drive formats
- Ed_P
- Contributor
- Posts: 8962
- 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
Ed_P
- Rava
- Contributor
- Posts: 5424
- 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
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.
Yours Rava
Rava
- Ed_P
- Contributor
- Posts: 8962
- 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
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.Rava wrote: ↑29 Jan 2022, 10:00I 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…
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

Reason: Tweaked script with Rava suggestion.
Ed_P
- Rava
- Contributor
- Posts: 5424
- 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
Code: Select all
read -p "Copy /dev/$ID to /dev/$OD? (y/n) " YN
if [ ! "$YN" == "y" ]; then
exit
fi
Yours Rava
Rava
Ed_P
NTFS-3G and bitlocker drive formats
Post#21 by Testuser » 05 Feb 2022, 17:03
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
Reason: Added code tags for sample script.
Testuser
- Ed_P
- Contributor
- Posts: 8962
- 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

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.

Ed_P
NTFS-3G and bitlocker drive formats
Post#23 by Testuser » 06 Feb 2022, 09:14
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/

Testuser
- Ed_P
- Contributor
- Posts: 8962
- 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
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_P
NTFS-3G and bitlocker drive formats
Post#25 by Testuser » 28 Feb 2022, 11:21
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

Testuser
- Ed_P
- Contributor
- Posts: 8962
- 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

Ed_P
-
- 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
Hi Beny, that link is no longer valid. Can you please repost, or is it somewhere else now?beny wrote: ↑11 Jan 2022, 20:00hi Ed_P here you have dislocker and mbedtls: https://www.mediafire.com/folder/zyug3gvg7fhu5/dslocker
Thank you
ponchdesarrolladas
NTFS-3G and bitlocker drive formats
Post#28 by beny » 09 Feb 2023, 00:44
beny