PDA

View Full Version : 2018.1 live usb install with persistence



cmptrwhz
2018-03-21, 17:20
I used DD to image my 128gig usb drive with 2018.1 version. I then proceeded to open gparted to format the remaining space for persistence but there is no remaining space left on the drive. Is there a new set of instructions on how to enable the remaining space of my usb drive for persistence? When I check my usb drive with lsblk I see the following results.


sdb 8:16 1 115.7G 0 disk
├─sdb1 8:17 1 2.8G 0 part
└─sdb2 8:18 1 704K 0 part

fdisk -l shows

Disk /dev/sdb: 115.7 GiB, 124218507264 bytes, 242614272 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: 0x247233f7

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 64 5913631 5913568 2.8G 17 Hidden HPFS/NTFS
/dev/sdb2 5913632 5915039 1408 704K 1 FAT12

Mister_X
2018-03-21, 20:02
fdisk /dev/sdb
# hit 'n'

cmptrwhz
2018-03-21, 21:09
Even though gparted didn't show that there was free space to be partitioned I used the instructions https://docs.kali.org/downloading/kali-linux-live-usb-persistence for creating a persistence partition and it worked as it should. Sorry for starting a useless thread I just didn't want to mess up my usb drive, I am still learning.


fdisk -l
Disk /dev/sdb: 115.7 GiB, 124218507264 bytes, 242614272 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: 0x247233f7

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 64 5913631 5913568 2.8G 17 Hidden HPFS/NTFS
/dev/sdb2 5913632 5915039 1408 704K 1 FAT12
/dev/sdb3 5915040 224609375 218694336 104.3G 83 Linux

Kiŧu-Uname
2018-04-07, 21:27
It's not useless, from the docs page it is not cleared enough that the persistence partition should be created with "fdisk".

Create and format an additional partition on the USB drive.
First, let’s create the new partition in the empty space above our Kali Live partitions.

end=7gb
read start _ < <(du -bcm kali-linux-2016.2-amd64.iso | tail -1); echo $start
parted /dev/sdb mkpart primary $start $end

The parted command may advise you that it can’t use the exact start values you specified; if so, accept the suggested value instead. If advised that the partition isn’t placed at an optimal location, “ignore” it. When parted completes, the new partition should have been created at /dev/sdb3; again, this can be verified with the command “fdisk -l“.

Thank you!

r4wstring
2018-04-17, 00:06
Yeah, I've seen people asking this on some other forums.. Seems legit.

Mikee4000
2018-08-17, 18:44
I have just loaded Kali 2018.2 on my 8Gb USB drive. Then, I installed Persistence in the remaining 4.8Gb. But, Persistence does not work. Here is my "Screenshot" of fdisk -l. Persistence does not show in /dev/sda3 like it should. Any ideas/help? TIA, Mikee4000

root@kali:~# fdisk -l
Disk /dev/sda: 7.5 GiB, 8065646080 bytes, 15753215 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: 0xa9ef3e16

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 64 5734399 5734336 2.8G 17 Hidden HPFS/NTFS
/dev/sda2 5734400 5735807 1408 704K 1 FAT12
/dev/sda3 5736448 15753214 10016767 4.8G 83 Linux

habibie
2018-08-22, 12:16
Your post got me curious. So, I SSHed into my Rpi0 as root and use both fdisk and cfdisk to check my 32GB microSD card that boots the kali OS. LOL and behold, fdisk only detects 2 partition sans an additional free space while cfdisk reports with an additional free space (see below). Why?

[root@kali:/root 1%] # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 6927372 4174564 2381200 64% /
devtmpfs 218260 0 218260 0% /dev
tmpfs 222544 0 222544 0% /dev/shm
tmpfs 222544 5836 216708 3% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 222544 0 222544 0% /sys/fs/cgroup
/dev/mmcblk0p1 62358 21626 40732 35% /boot
tmpfs 44508 0 44508 0% /run/user/0
[root@kali:/root 2%] # fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 29 GiB, 31104958464 bytes, 60751872 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: 0xb96ca1f4

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 1 125000 125000 61M c W95 FAT32 (LBA)
/dev/mmcblk0p2 125001 14334047 14209047 6.8G 83 Linux

Command (m for help): q

[root@kali:/root 3%] # cfdisk /dev/mmcblk0

Disk: /dev/mmcblk0
Size: 29 GiB, 31104958464 bytes, 60751872 sectors
Label: dos, identifier: 0xb96ca1f4

Device Boot Start End Sectors Size Id Type
>> /dev/mmcblk0p1 1 125000 125000 61M c W95 FAT32 (LBA)
/dev/mmcblk0p2 125001 14334047 14209047 6.8G 83 Linux
Free space 14336000 60751871 46415872 22.1G



┌───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────────┐
│ Partition type: W95 FAT32 (LBA) (c) │
│Filesystem UUID: 2796-8BA8 │
│ Filesystem: vfat │
│ Mountpoint: /boot (mounted) │
└───────────────────────────────────────────────── ────────────────────────────────────────────────── ───────────────────────────┘
[Bootable] [ Delete ] [ Resize ] [ Quit ] [ Type ] [ Help ] [ Write ] [ Dump ]


Quit program without writing changes