I am trying to create a Live USB using the dd utility. The first thing I did was wipe the USB using the following command:
~ $ dd if=/dev/zero of=/dev/sdb bs=512 count=1
The 8GB USB has a total memory of 7.6GB, as told by using the command.
~ $ fdisk -l ... Disk /dev/sdb: 7.6 GiB, 8097103872 bytes, 15814656 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
The problem is that after perform the "dd" operation to write the ISO to the USB, the partitions to not take up the entire disk space.
I run this command which generates the succeeding output.
~ $ sudo dd if=kali-linux-2016.2-amd64.iso of=/dev/sdb bs=1M 2934+1 records in 2934+1 records out 3076767744 bytes (3.1 GB, 2.9 GiB) copied, 395.581 s, 7.8 MB/s
I then run the fdisk command again which generates this output.
Disk /dev/sdb: 7.6 GiB, 8097103872 bytes, 15814656 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: 0x77e6cfe3 Device Boot Start End Sectors Size Id Type /dev/sdb1 * 64 5794271 5794208 2.8G 17 Hidden HPFS/NTFS /dev/sdb2 5794272 6009311 215040 105M 1 FAT12
Note how the top line indicates 7.6GiB of memory but the partitions only take up 2.8GB and 105M respectively. Even when I analyse the partitions in gparted it only shows these two partitions and does not list any extra space on the USB stick.
Is there something I'm missing here?
I was wrong in my assumption of there being no space left on the device. I have answered my question below with the commands I used to make use of the remaining space on the disk.