How to add unallocated space to encrypted partition (using Gparted)Why do I keep getting an error when I try to resize ext4 under extended?Can't extend root partition even after booting from LiveUSBResizing LUKS partition when not using LVMAfter insuccessful partition resize with Gparted, partition grew but file system notError when resizing a ext4 partition
Advice for Stockholm metro and buses for a large family
How should I analyze this passage? As vii°7, V7, or both?
Why does China have so few nuclear weapons?
Thoughts on if it's possible to succeed in math @ PhD level w/o natural ability in quant reasoning?
Confused about Autoregressive AR(1) process
How do successful undergraduate and PhD students differ?
Can a human colony survive on a 'hot' world?
Why didn't the 6502 have increase/decrease opcodes for A?
How do I get a stuck gas canister (for hiking/camping) out of a stainless steel mug?
Reconstructing the results of a 5-team soccer tournament
At a conference, should I visit other people's posters during my poster session?
Is using Swiss Francs (CHF) cheaper than Euros (EUR) in Switzerland?
Reimbursed more than my travel expenses for interview
Car Possession being threatened by Signer
Key takeaways in German in a presentation
Talmud Bavli Sanhedrin 98b: an interpretation in a messianic sense of the figure of the "suffering servant" of Isaiah 52-53?
How can I encourage a fellow player to develop a character a bit more?
What does it mean to play in a mode?
How do I compile something for Linux if I don't have enough space for installing GCC?
Geodesic sphere in the octonion projective plane
Longest Prime Sums
I shift the source code, you shift the input!
Why didn't the British consider the USS President's attempted flight as a fake surrender?
What is a Aged Rope Phrase™?
How to add unallocated space to encrypted partition (using Gparted)
Why do I keep getting an error when I try to resize ext4 under extended?Can't extend root partition even after booting from LiveUSBResizing LUKS partition when not using LVMAfter insuccessful partition resize with Gparted, partition grew but file system notError when resizing a ext4 partition
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
Sorry if this is a duplicate, but I think I haven’t seen this exact situation on askubuntu yet.. I have an encrypted partition on a VPS running Ubuntu 18.04 that I would like to enlarge. I also have unallocated space. However, using Gparted I am unable to resize the partition. What can I do to solve this?
Edit: resizing with this method almost works, except the last step.
I get:
resize2fs: Device or resource busy while trying to open /dev/mapper/vda5_crypt
Couldn't find valid filesystem superblock.
Anyone know what I could do about this?
partitioning encryption gparted
|
show 2 more comments
Sorry if this is a duplicate, but I think I haven’t seen this exact situation on askubuntu yet.. I have an encrypted partition on a VPS running Ubuntu 18.04 that I would like to enlarge. I also have unallocated space. However, using Gparted I am unable to resize the partition. What can I do to solve this?
Edit: resizing with this method almost works, except the last step.
I get:
resize2fs: Device or resource busy while trying to open /dev/mapper/vda5_crypt
Couldn't find valid filesystem superblock.
Anyone know what I could do about this?
partitioning encryption gparted
1
I think you can't because you are working from the mounted/dev/vda5
partition, is that correct? You need to reboot from a LiveUSB, and usegparted
from there.
– Jos
Sep 30 at 15:33
A Google search for “Gparted encrypted partition“ throws up many hits including the Gparted manual which contains instructions for working with LUKS: Select a closed LUKS encrypted partition. See the section called “Selecting a Partition”. Choose: Partition → Open Encryption.
– PonJar
Sep 30 at 15:40
@Jos is it even possible to reboot from a LiveUSB with a VPS?
– Flobin
Oct 2 at 11:33
@PonJar When I select the encrypted partition and click on 'partition' in the menu, I don't see 'open encryption': dropbox.com/s/hu37lvbnqjcneli/…
– Flobin
Oct 2 at 11:40
If that function is absent it suggests a version issue. What version of Gparted are you running? I think it will need to be 0.32 or above. The latest is 1.0.0-5.
– PonJar
Oct 2 at 12:52
|
show 2 more comments
Sorry if this is a duplicate, but I think I haven’t seen this exact situation on askubuntu yet.. I have an encrypted partition on a VPS running Ubuntu 18.04 that I would like to enlarge. I also have unallocated space. However, using Gparted I am unable to resize the partition. What can I do to solve this?
Edit: resizing with this method almost works, except the last step.
I get:
resize2fs: Device or resource busy while trying to open /dev/mapper/vda5_crypt
Couldn't find valid filesystem superblock.
Anyone know what I could do about this?
partitioning encryption gparted
Sorry if this is a duplicate, but I think I haven’t seen this exact situation on askubuntu yet.. I have an encrypted partition on a VPS running Ubuntu 18.04 that I would like to enlarge. I also have unallocated space. However, using Gparted I am unable to resize the partition. What can I do to solve this?
Edit: resizing with this method almost works, except the last step.
I get:
resize2fs: Device or resource busy while trying to open /dev/mapper/vda5_crypt
Couldn't find valid filesystem superblock.
Anyone know what I could do about this?
partitioning encryption gparted
partitioning encryption gparted
edited Oct 3 at 13:38
Flobin
asked Sep 30 at 14:59
FlobinFlobin
1013 bronze badges
1013 bronze badges
1
I think you can't because you are working from the mounted/dev/vda5
partition, is that correct? You need to reboot from a LiveUSB, and usegparted
from there.
– Jos
Sep 30 at 15:33
A Google search for “Gparted encrypted partition“ throws up many hits including the Gparted manual which contains instructions for working with LUKS: Select a closed LUKS encrypted partition. See the section called “Selecting a Partition”. Choose: Partition → Open Encryption.
– PonJar
Sep 30 at 15:40
@Jos is it even possible to reboot from a LiveUSB with a VPS?
– Flobin
Oct 2 at 11:33
@PonJar When I select the encrypted partition and click on 'partition' in the menu, I don't see 'open encryption': dropbox.com/s/hu37lvbnqjcneli/…
– Flobin
Oct 2 at 11:40
If that function is absent it suggests a version issue. What version of Gparted are you running? I think it will need to be 0.32 or above. The latest is 1.0.0-5.
– PonJar
Oct 2 at 12:52
|
show 2 more comments
1
I think you can't because you are working from the mounted/dev/vda5
partition, is that correct? You need to reboot from a LiveUSB, and usegparted
from there.
– Jos
Sep 30 at 15:33
A Google search for “Gparted encrypted partition“ throws up many hits including the Gparted manual which contains instructions for working with LUKS: Select a closed LUKS encrypted partition. See the section called “Selecting a Partition”. Choose: Partition → Open Encryption.
– PonJar
Sep 30 at 15:40
@Jos is it even possible to reboot from a LiveUSB with a VPS?
– Flobin
Oct 2 at 11:33
@PonJar When I select the encrypted partition and click on 'partition' in the menu, I don't see 'open encryption': dropbox.com/s/hu37lvbnqjcneli/…
– Flobin
Oct 2 at 11:40
If that function is absent it suggests a version issue. What version of Gparted are you running? I think it will need to be 0.32 or above. The latest is 1.0.0-5.
– PonJar
Oct 2 at 12:52
1
1
I think you can't because you are working from the mounted
/dev/vda5
partition, is that correct? You need to reboot from a LiveUSB, and use gparted
from there.– Jos
Sep 30 at 15:33
I think you can't because you are working from the mounted
/dev/vda5
partition, is that correct? You need to reboot from a LiveUSB, and use gparted
from there.– Jos
Sep 30 at 15:33
A Google search for “Gparted encrypted partition“ throws up many hits including the Gparted manual which contains instructions for working with LUKS: Select a closed LUKS encrypted partition. See the section called “Selecting a Partition”. Choose: Partition → Open Encryption.
– PonJar
Sep 30 at 15:40
A Google search for “Gparted encrypted partition“ throws up many hits including the Gparted manual which contains instructions for working with LUKS: Select a closed LUKS encrypted partition. See the section called “Selecting a Partition”. Choose: Partition → Open Encryption.
– PonJar
Sep 30 at 15:40
@Jos is it even possible to reboot from a LiveUSB with a VPS?
– Flobin
Oct 2 at 11:33
@Jos is it even possible to reboot from a LiveUSB with a VPS?
– Flobin
Oct 2 at 11:33
@PonJar When I select the encrypted partition and click on 'partition' in the menu, I don't see 'open encryption': dropbox.com/s/hu37lvbnqjcneli/…
– Flobin
Oct 2 at 11:40
@PonJar When I select the encrypted partition and click on 'partition' in the menu, I don't see 'open encryption': dropbox.com/s/hu37lvbnqjcneli/…
– Flobin
Oct 2 at 11:40
If that function is absent it suggests a version issue. What version of Gparted are you running? I think it will need to be 0.32 or above. The latest is 1.0.0-5.
– PonJar
Oct 2 at 12:52
If that function is absent it suggests a version issue. What version of Gparted are you running? I think it will need to be 0.32 or above. The latest is 1.0.0-5.
– PonJar
Oct 2 at 12:52
|
show 2 more comments
1 Answer
1
active
oldest
votes
I was able to enlarge the partition using the method outlined in this forum post.
I'll repost it here in case that post is taken down. Side note: I did not do steps 1 - 3, because I had already managed to enlarge the partition in Gparted.
Boot a live CD and, using any tool, create a new partition, lets call it /dev/sda6 , next to and to the left of (after) your crypt.
Write random data to the new partition.
Make sure you have the correct partition for this command or you will overwrite your crypt.
sudo dd if=/dev/urandom of=/dev/sda6
You can run that command as many times as your paranoia requires.
Use fdisk as above to delete and then re-create a larger crypt partition.
Reboot to the live CD.
Install lvm2 and cryptsetup.
sudo apt-get update && sudo apt-get install lvm2 cryptsetup
- Load the cryptsetup module.
sudo modprobe dm-crypt
- Decrypt your file system.
sudo cryptsetup luksOpen /dev/sda5 crypt1
- Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
- Resize the Crypt.
sudo cryptsetup resize crypt1
- Resize the (LVM) Physical volume.
sudo pvresize /dev/mapper/crypt1
- Resize your root (LVM) Logical Volume.
Unlock the physical volume.
sudo pvchange -x y /dev/mapper/crypt1
Resize your root (LVM) Logical Volume.
lvresize -L +4G /dev/hardy/root
Note: Change the +4G to the amount of space you are adding.
Re-lock the (LVM) Physical Volume.
sudo pvchange -x n /dev/mapper/crypt1
- Resize the filesystem.
sudo e2fsck -f /dev/mapper/hardy-root
sudo resize2fs -p /dev/mapper/hardy-root
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177700%2fhow-to-add-unallocated-space-to-encrypted-partition-using-gparted%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I was able to enlarge the partition using the method outlined in this forum post.
I'll repost it here in case that post is taken down. Side note: I did not do steps 1 - 3, because I had already managed to enlarge the partition in Gparted.
Boot a live CD and, using any tool, create a new partition, lets call it /dev/sda6 , next to and to the left of (after) your crypt.
Write random data to the new partition.
Make sure you have the correct partition for this command or you will overwrite your crypt.
sudo dd if=/dev/urandom of=/dev/sda6
You can run that command as many times as your paranoia requires.
Use fdisk as above to delete and then re-create a larger crypt partition.
Reboot to the live CD.
Install lvm2 and cryptsetup.
sudo apt-get update && sudo apt-get install lvm2 cryptsetup
- Load the cryptsetup module.
sudo modprobe dm-crypt
- Decrypt your file system.
sudo cryptsetup luksOpen /dev/sda5 crypt1
- Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
- Resize the Crypt.
sudo cryptsetup resize crypt1
- Resize the (LVM) Physical volume.
sudo pvresize /dev/mapper/crypt1
- Resize your root (LVM) Logical Volume.
Unlock the physical volume.
sudo pvchange -x y /dev/mapper/crypt1
Resize your root (LVM) Logical Volume.
lvresize -L +4G /dev/hardy/root
Note: Change the +4G to the amount of space you are adding.
Re-lock the (LVM) Physical Volume.
sudo pvchange -x n /dev/mapper/crypt1
- Resize the filesystem.
sudo e2fsck -f /dev/mapper/hardy-root
sudo resize2fs -p /dev/mapper/hardy-root
add a comment
|
I was able to enlarge the partition using the method outlined in this forum post.
I'll repost it here in case that post is taken down. Side note: I did not do steps 1 - 3, because I had already managed to enlarge the partition in Gparted.
Boot a live CD and, using any tool, create a new partition, lets call it /dev/sda6 , next to and to the left of (after) your crypt.
Write random data to the new partition.
Make sure you have the correct partition for this command or you will overwrite your crypt.
sudo dd if=/dev/urandom of=/dev/sda6
You can run that command as many times as your paranoia requires.
Use fdisk as above to delete and then re-create a larger crypt partition.
Reboot to the live CD.
Install lvm2 and cryptsetup.
sudo apt-get update && sudo apt-get install lvm2 cryptsetup
- Load the cryptsetup module.
sudo modprobe dm-crypt
- Decrypt your file system.
sudo cryptsetup luksOpen /dev/sda5 crypt1
- Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
- Resize the Crypt.
sudo cryptsetup resize crypt1
- Resize the (LVM) Physical volume.
sudo pvresize /dev/mapper/crypt1
- Resize your root (LVM) Logical Volume.
Unlock the physical volume.
sudo pvchange -x y /dev/mapper/crypt1
Resize your root (LVM) Logical Volume.
lvresize -L +4G /dev/hardy/root
Note: Change the +4G to the amount of space you are adding.
Re-lock the (LVM) Physical Volume.
sudo pvchange -x n /dev/mapper/crypt1
- Resize the filesystem.
sudo e2fsck -f /dev/mapper/hardy-root
sudo resize2fs -p /dev/mapper/hardy-root
add a comment
|
I was able to enlarge the partition using the method outlined in this forum post.
I'll repost it here in case that post is taken down. Side note: I did not do steps 1 - 3, because I had already managed to enlarge the partition in Gparted.
Boot a live CD and, using any tool, create a new partition, lets call it /dev/sda6 , next to and to the left of (after) your crypt.
Write random data to the new partition.
Make sure you have the correct partition for this command or you will overwrite your crypt.
sudo dd if=/dev/urandom of=/dev/sda6
You can run that command as many times as your paranoia requires.
Use fdisk as above to delete and then re-create a larger crypt partition.
Reboot to the live CD.
Install lvm2 and cryptsetup.
sudo apt-get update && sudo apt-get install lvm2 cryptsetup
- Load the cryptsetup module.
sudo modprobe dm-crypt
- Decrypt your file system.
sudo cryptsetup luksOpen /dev/sda5 crypt1
- Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
- Resize the Crypt.
sudo cryptsetup resize crypt1
- Resize the (LVM) Physical volume.
sudo pvresize /dev/mapper/crypt1
- Resize your root (LVM) Logical Volume.
Unlock the physical volume.
sudo pvchange -x y /dev/mapper/crypt1
Resize your root (LVM) Logical Volume.
lvresize -L +4G /dev/hardy/root
Note: Change the +4G to the amount of space you are adding.
Re-lock the (LVM) Physical Volume.
sudo pvchange -x n /dev/mapper/crypt1
- Resize the filesystem.
sudo e2fsck -f /dev/mapper/hardy-root
sudo resize2fs -p /dev/mapper/hardy-root
I was able to enlarge the partition using the method outlined in this forum post.
I'll repost it here in case that post is taken down. Side note: I did not do steps 1 - 3, because I had already managed to enlarge the partition in Gparted.
Boot a live CD and, using any tool, create a new partition, lets call it /dev/sda6 , next to and to the left of (after) your crypt.
Write random data to the new partition.
Make sure you have the correct partition for this command or you will overwrite your crypt.
sudo dd if=/dev/urandom of=/dev/sda6
You can run that command as many times as your paranoia requires.
Use fdisk as above to delete and then re-create a larger crypt partition.
Reboot to the live CD.
Install lvm2 and cryptsetup.
sudo apt-get update && sudo apt-get install lvm2 cryptsetup
- Load the cryptsetup module.
sudo modprobe dm-crypt
- Decrypt your file system.
sudo cryptsetup luksOpen /dev/sda5 crypt1
- Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
- Resize the Crypt.
sudo cryptsetup resize crypt1
- Resize the (LVM) Physical volume.
sudo pvresize /dev/mapper/crypt1
- Resize your root (LVM) Logical Volume.
Unlock the physical volume.
sudo pvchange -x y /dev/mapper/crypt1
Resize your root (LVM) Logical Volume.
lvresize -L +4G /dev/hardy/root
Note: Change the +4G to the amount of space you are adding.
Re-lock the (LVM) Physical Volume.
sudo pvchange -x n /dev/mapper/crypt1
- Resize the filesystem.
sudo e2fsck -f /dev/mapper/hardy-root
sudo resize2fs -p /dev/mapper/hardy-root
answered Oct 4 at 12:52
FlobinFlobin
1013 bronze badges
1013 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177700%2fhow-to-add-unallocated-space-to-encrypted-partition-using-gparted%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I think you can't because you are working from the mounted
/dev/vda5
partition, is that correct? You need to reboot from a LiveUSB, and usegparted
from there.– Jos
Sep 30 at 15:33
A Google search for “Gparted encrypted partition“ throws up many hits including the Gparted manual which contains instructions for working with LUKS: Select a closed LUKS encrypted partition. See the section called “Selecting a Partition”. Choose: Partition → Open Encryption.
– PonJar
Sep 30 at 15:40
@Jos is it even possible to reboot from a LiveUSB with a VPS?
– Flobin
Oct 2 at 11:33
@PonJar When I select the encrypted partition and click on 'partition' in the menu, I don't see 'open encryption': dropbox.com/s/hu37lvbnqjcneli/…
– Flobin
Oct 2 at 11:40
If that function is absent it suggests a version issue. What version of Gparted are you running? I think it will need to be 0.32 or above. The latest is 1.0.0-5.
– PonJar
Oct 2 at 12:52