8

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?

2 Answers 2

6

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:

  1. Install Dislocker, which allows you to mount Bitlocker partitions under linux

  2. 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/bitlocker
    
  3. Run gparted on this device

    sudo gparted /tmp/bitlocker/dislocker-file
    
  4. You resized now the filesystem in the bitlocker partition. Resizing the partition itsself may destroy it, so proceed carefully.

  5. Get blocksize of your partition:

    sudo parted /tmp/bitlocker/dislocker-file unit s  print all
    
  6. Run 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.

3
  • 1
    Since in my case, I wanted to expand it, I used parted to get enough space after it and expanded it in Windows, but your answer helped me in making the decision.
    – Didi Kohen
    Mar 23, 2021 at 7:38
  • 1)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: howto-connect.com/get-bitlocker-recovery-key-cmd-windows-10). 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.
    – Allexj
    Jan 4 at 21:15
  • 2)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.
    – Allexj
    Jan 4 at 21:16
0

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.

1
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
    – DavidPostill
    Jan 4 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.