How can I resize a windows-bitlocker partition with gparted?

10,583
  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/bitlocket/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 wasnt after the second.

The safe way is definitely to decrypt the partition by disabling bitlocker. Its easy to shrink it then.

Share:
10,583

Related videos on Youtube

thi gg
Author by

thi gg

my about-me is currently blank

Updated on September 18, 2022

Comments

  • thi gg
    thi gg over 1 year

    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?

  • Didi Kohen
    Didi Kohen about 3 years
    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.