I want to shrink my windows partition, and windows does not allow to shrink more than a few GB. Can I access that bitlocker partition with GParted, parted or any other partitioning program?
3 Answers
The safe way is definitely to decrypt the partition by disabling bitlocker first. Its easy to shrink it then.
However, you can also use dislocker to shrink the encrypted partition:
Install Dislocker, which allows you to mount Bitlocker partitions under linux
Create an unencrypted device from that partition (if there is no bitlocker password set, omit it)
mkdir /tmp/bitlocker sudo dislocker /dev/<partition> -u<password> -- /tmp/bitlockerRun gparted on this device
sudo gparted /tmp/bitlocker/dislocker-fileYou resized now the filesystem in the bitlocker partition. Resizing the partition itsself may destroy it, so proceed carefully.
Get blocksize of your partition:
sudo parted /tmp/bitlocker/dislocker-file unit s print allRun
sudo parted:parted> unit s parted> print all # get partition number of the bitlocker partition parted> resizepart <n> <newsize + a decent amount>Careful here: I resized my partition twice, the first time I left a couple GB, the second time I shrinked it to the actual filesystem size. While it was booting after the first time, it wasn't after the second.
- 178
- 361
You can just disable HDD cryptography in Windows settings (just search for "bitlocker" and you will find it)... but before doing that, you have to backup your hdd bitlocker partition key (search on web, for example look here).
After that you can finally restart and boot from your linux live usb, and you will be able to access and resize windows partition, so you'll be able to install your linux distro.
When your linux distro will be installed, if you want to bring cryptography in windows partition back, you will have to boot windows (NOT from linux grub bootloader, BUT selecting windows via bios boot options), and then enable hdd bitlocker cryptography back.
Finally restart, and when you'll try to boot windows you will be asked to write the bitlocker key, so write the key that you backupd.
- 294
The easiest way is to let Windows resize it:
- Move partitions around with GParted, and leave free space after the Windows partition encrypted with Bitlocker.
- Reboot in Windows, and use Windows own partition manager (diskmgmt.msc) to extend the Windows partition as much as possible.
This saves a lot of time, by avoiding the need to decrypt then reencrypt the whole Windows partition.