1

I am trying to clone my Linux USB live persistence from a 32 GB drive to a 64 GB drive. After I clone it, there is some unallocated space (32 GB). I have done some research but I still cannot figure it out. Below are the things that I tried.

I booted from the old USB and used cfdisk to check the partition.  It said that there is unallocated free 32 GB on my new USB drive, so I used resize to resize /dev/sdb3 from 20 GB to 54.3 G as shown:

                              Disk: /dev/sdb
              Size: 57.3 GiB, 61505273856 bytes, 120127488 sectors
                       Label: dos, identifier: 0x0e390ebe

    Device      Boot     Start        End    Sectors   Size  Id Type
    /dev/sdb1   *           64    6279167    6279104     3G  17 Hidden HPFS/NTFS
    /dev/sdb2          6279168    6280575       1408   704K   1 FAT12
    /dev/sdb3          6281216  120127487  113846272  54.3G  83 Linux

When I use fdisk -l to check the partition, it tells me it has 54.3 GB in the partition.

Device     Boot   Start       End   Sectors  Size Id Type
/dev/sdb1  *         64   6279167   6279104    3G 17 Hidden HPFS/NTFS
/dev/sdb2       6279168   6280575      1408  704K  1 FAT12
/dev/sdb3       6281216 120127487 113846272 54.3G 83 Linux

But when I use df -h it showed me that my /dev/sdb3 is still 26 GB:

Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           785M   11M  775M   2% /run
/dev/sdb1       3.0G  3.0G     0 100% /run/live/persistence/sdb1
/dev/loop0      2.8G  2.8G     0 100% /run/live/rootfs/filesystem.squashfs
tmpfs           3.9G     0  3.9G   0% /run/live/overlay
/dev/sdb3        26G   18G  6.9G  72% /run/live/persistence/sdb3
overlay          26G   18G  6.9G  72% /
tmpfs           3.9G   48M  3.8G   2% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs           3.9G  324K  3.9G   1% /tmp
tmpfs           785M   48K  785M   1% /run/user/0
/dev/sdb2       684K  670K   14K  98% /media/root/Kali Live

I also tried using GParted, but it doesn't help:

GParted screen image showing /dev/sdb is 57.28 GiB

What can I do to extend the OS partition but not just the USB partition?

3
  • It looks like you increased the size of the partition, but not the file-system (that is in the partition). Mar 16, 2019 at 19:02
  • Please paste text as text (not as pictures), it is easier to read that way (not just for blind people). And Why kali? Kali is hard to use (much like a swiss army chain-saw). kali has one purpose, and this is not it. You say you are new to Gnu/Linux, therefore kali is not for you. Chose an easier distro such as Debian. Mar 16, 2019 at 19:02
  • @ctrl-alt-delor Thanks for your suggestions, I will improve next time! Mar 16, 2019 at 19:10

2 Answers 2

1

Just follow to step 2 of this guide and just use gparted to resize. Make sure you use the correct offset because it's different in Kali. Also, skip the encryption part because that is predicated on you starting with a fresh partition.

https://www.rzegocki.pl/blog/create-parrot-os-pendrive-with-encrypted-persistence-volume/

0

It sounds like you extended/increased the size of the partition but did not notify the filesystem that there was more space for it to use.

xfs_growfs or xfs_admin with the right flags should let you inform the filesystem that it can grow to fill the additional space.

This sort of thing can be tricky on a liveOS booting from a USB. It is often easier to install the liveOS fresh on the new device and copy your data over.

2
  • how can I copy my data over to new device? By using dd? Mar 16, 2019 at 19:20
  • @LauChokYip that is a different question. Mar 17, 2019 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .