美文网首页
为Kali创建持久化分区

为Kali创建持久化分区

作者: 天涯西剑 | 来源:发表于2020-03-03 11:37 被阅读0次
  1. Download Kali Linux 2020 (Live)

In this guide we are using the Kali Linux 64-Bit (Live) image, though it should work fine with the 32 Bit image as well. This guide also works with Kali Linux 2019 and Kali Linux 2018.

  1. Write Kali Linux 2020 Live ISO to USB

Write the ISO to your USB drive using a tool like Universal USB Installer or UNetbootin. In this guide we are using Universal USB Installer.

  1. Run Universal USB Installer.

  2. Select Kali Linux from the dropdown menu. (Kali is listed under Security and Penetration Testing).

  3. Browse for the Kali Linux 2020 Live ISO you downloaded.

  4. Select your USB drive from the drowpdown menu.

  5. Now select the checkbox Fat32 Format Drive (Erases Content).

  6. Finally, click Create.

It may take a few minutes to write Kali Linux 2020 Live ISO to USB.

image
  1. Resize USB Partition

Now that your Kali Linux 2020 ISO has been written to your USB drive, we can begin setting up partitions to work with Kali Live Persistence. You can configure partitions with the partition manager of your choice, but in this guide we are going to use MiniTool Partition Wizard

When installing Partition Wizard, make sure to uncheck the checkbox on the Avast screen – you don’t need to install that.

Once installed, run and select Disk and Partition Management.

image
Right-click on the blue disk space bar of your USB drive and click Move/Resize. In the example below, the USB drive is Disk 3 and it has a blue USB icon over it. image

Resize the partition to 4GB and click OK. This is the partition where the Kali Linux system files reside and shouldn’t ever need more than 4GB.

image
  1. Create Persistence Partition

We will now create the persistence partition, which will store your personal files and Kali settings.

Right-click on theUnallocated partition and click Create.

image

Click Yes if you see a message “The new created partition cannot be used in Windows. Because Windows could only recognize the first partition on a removable disk. Do you want to continue?”

In the File System dropdown, select EXT4.

In the Partition Label field, enter persistence. It’s important that you spell this correctly.

Use the maximum partition size available (or the size of your choice) and click OK.

image

Finally, click Apply in the top left-hand corner and click Yes to apply changes.

image

The Partition Wizard will now set up your partitions. This may take some time depending on the size of your USB drive.

image

Once done, close Partition Wizard and safely eject your USB drive.

  1. Boot Into Kali 2020 Live USB

To boot from USB in most modern PCs, hold down the shift key while clicking Restart in the Windows start menu. If this doesn’t work, you may need to do some searching on how to boot from USB on your particular machine. Repeatedly pressing one of the function keys (F12, F2, etc) or the ESC or** Delete** keys on bootup will invoke the boot or BIOS menus on some machines.

In the Kali boot menu, select Live system (persistence, check kali.org/prst) and press Enter. The menu may look slighly different depending on your version of Kali.

image

Kali should boot straight to Desktop. However, if you do get a password prompt, the default username and password in Kali Linux 2020 is “kali”. For Kali Linux 2019 and below, the default user is “root” and the password is “toor”.

  1. Mount Persistence Partition

Once Kali has booted, we will use fdisk to view the disk devices and partitions.

Open a new terminal window and run:

sudo fdisk -l

You will see several entries for partitions and devices listed. Look for your USB drive. It will have two partitions: A 4GB partition and a persistence partition you created earlier. The persistence partition should appear as Linux under the Type column.

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sdb1           2048   8390655   8388608     4G  c W95 FAT32 (LBA)
/dev/sdb2        8390656  30463999  22073344  10.5G 83 Linux

In the above example, we can see the USB drive with a 4GB partition and a larger persistence partition with the device name sdb2. This device name may be different on your setup. Make sure you have the right one before continuing.

Assuming your persistence partition device name is sdb2, run the following commands.

IMPORTANT:You must enter these commands exactly and ensure you choose the correct device (yours may not be sdb2), otherwise persistence will not work.

Create a new mount point called my_usb.

sudo mkdir -p /mnt/my_usb

Mount your USB persistence partition to my_usb. Reminder: Your persistence partition may not be sdb2, please ensure you mount the right one.

sudo mount /dev/sdb2 /mnt/my_usb
Create a new file called persistence.conf using the nano text editor.

sudo nano /mnt/my_usb/persistence.conf

In this file, type / union

/mnt/my_usb/persistence.conf

/ union

Save the file and exit. (Press CTRL + X, press Y, then press ENTER).

Now unmount your persistence partition. Reminder: Your persistence partition may not be sdb2, please ensure you unmount the right one.

sudo umount /dev/sdb2

We’re done!

Restart the machine, boot from USB again, and from now on always select Live system (persistence, check kali.org/prst)

image

To test if persistence is working correctly, try creating an empty test folder on the Desktop and restarting. Select Live system (persistence, check kali.org/prst) again and if the test folder is still there, persistence is working correctly.

相关文章

  • 为Kali创建持久化分区

    Download Kali Linux 2020 (Live) Download Kali Linux 2020 ...

  • Linux创建管理LVM

    创建LVM 创建分区 指定分区的格式为8e,即LVM分区格式 创建PV 创建VG 创建LV LV格式化 LV挂载 ...

  • EFI U盘启动

    EFI U盘启动 设置u盘为gpt磁盘并创建分区 格式化u盘为fat32 将分区设置为esp分区 set 1 es...

  • LVM扩容 XFS

    创建新分区 命令行输入n创建新分区 命令行输入p设置分区类型为主分区 设置分区数量,这里输入为3 修改分区大小,我...

  • ubuntu UEFI 安装

    创建分区:左下角“+”依次为ubuntu创建分区(本例中全部设置为主分区) 1.大小:500MB; 新分区类型:...

  • ubuntu20常用分区

    创建分区:左下角“+”依次为ubuntu创建分区(本例中全部设置为主分区) 1.大小:500MB; 新分区类型:主...

  • MyBatis必知必会

    流程 创建持久化类(POJO类) 编写持久化操作的Mapper文件,其中定义SQL语句 创建配置文件:连接哪种数据...

  • RabbitMQ高可用需要考虑哪些内容

    1. 消息持久化 交换机的持久化通过创建交换机时设置持久化标志。 队列的持久化也是一样。 2. 消息生产 生产者发...

  • linux挂载磁盘

    **** Virtualbox中Linux添加一个新磁盘->创建分区->格式化->挂载分区 2013-04-14 ...

  • Kafka特性

    一、消息有序性 consumer的offset实现分区级别的有序性。broker在消息持久化的时候是追加写入分区文...

网友评论

      本文标题:为Kali创建持久化分区

      本文链接:https://www.haomeiwen.com/subject/jmjqlhtx.html