1

Topic: DNS and resizing encrypted partition

Hi,

I have Debian and Virtual Box with another Debian. I have resized max size of vdi file with VBoxManage modifyhd but now I need to resize partition on virtual machine's system. I've downloaded GParted and I can run machine from this ISO as CD. Partition is encrypted on machine.

Unfortunately GParted doesn't start with X so I have to use it in terminal.

I can see partitions:

root@debian:/# fdisk -l
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772610 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3914....

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 499711 497664 243M 83 Linux
/dev/sda2   501758 41940991 41439234 19.8G 5 Extended
/dev/sda5   501760 41940991 41439234 19.8G 83 Linux

Disk /dev/loop0: 223.2 MiB, 234004480 bytes, 457040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 521 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

I cannot resize it because of:

root@debian:/# sudo resize2fs /dev/sda2
resize2fs: 1.42.13 (17-May-2015)
resize2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Couldn't find valid filesystem superblock.

So I though maybe I need to use this [link removed because forum did not permit to send new topic]. I couldn't find similar tutorial about Debian or GParted but OK, it's just executing these commands, not modifying its source.list.

But I cannot even do the update:

root@debian:/# sudo apt-get update
Err: [link removed because forum did not permit to send new topic] sid InRelease
  Temporary failure resolving 'free.nchc.org.tw'
Err2: [link removed because forum did not permit to send new topic] drbl InRelease
  Temporary failure resolving 'free.nchc.org.tw'
Reading package lists... Done
W: Failed to fetch [link removed because forum did not permit to send new topic]  Teporary failure resolving 'free.nchc.org.tw'
W: Failed to fetch [link removed because forum did not permit to send new topic]  Temporary failure resolving 'free.nchc.org.tw'
W: Some index files failed to download. They have been ignored, or old ones used instead.

So I check my internet connection. VirtualBox has 'attached to NAT' and before I run out of space on virtual machine, Debian could access internet. So it's only something about this GParted.

I have modified /etc/resolv.conf with vi (even vim is not available). And it has two valid nameservers. I haven't restarted anything, as I'm not sure if I need to, after modifying resolv.conf file.

But even in that case I cannot ping anything from GParted:

root@debian:/# ping [link removed because forum did not permit to send new topic]
ping: unknown host [link removed because forum did not permit to send new topic]

How can I access internet from GParted and resize encrypted partition?

Thank you!

2

Re: DNS and resizing encrypted partition

To access the Internet from GParted Live, networking must be enabled.  See GParted Live Manual - Enabling Network Access.

Currently GParted does not support resizing encrypted partitions.  See Bug 627701 - option to encrypt new partitions (using LUKS)