Kali Live Boot Stick erstellen Virtualbox

Aus xinux.net
Zur Navigation springen Zur Suche springen

Runterladen

Partition anhängen

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


Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (3,4, default 3): 
First sector (7013824-9111575, default 7014400): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (7014400-9111575, default 9111575): 

Created a new partition 3 of type 'Linux' and of size 1 GiB.

Command (m for help): w
The partition table has been altered.
Syncing disks.
  • losetup -f usb-stick
  • kpartx -av /dev/loop5
add map loop5p1 (253:3): 0 7012288 linear 7:5 64
add map loop5p2 (253:4): 0 1472 linear 7:5 7012352
add map loop5p3 (253:5): 0 2097176 linear 7:5 7014400
  • sudo mkfs.ext3 -L persistence /dev/mapper/loop5p3

Mountpunkt erstellen

  • mkdir -p /mnt/my_usb
  • mount /dev/mapper/loop5p3 /mnt/my_usb
  • echo "/ union" | sudo tee /mnt/my_usb/persistence.conf
/ union
  • sudo umount /dev/mapper/loop5p3
  • kpartx -dv /dev/loop5
del devmap : loop5p1
del devmap : loop5p2
del devmap : loop5p3
  • losetup -d /dev/loop5
  • cp usb-stick /home/thomas.will/VirtualBox\ VMs/
  • chown thomas.will /home/thomas.will/VirtualBox\ VMs/usb-stick
  • su - thomas.will
  • cd VirtualBox\ VMs/

Diskbeschreinbung erstellen

  • VBoxManage internalcommands createrawvmdk -filename "usb-stick.vmdk" -rawdisk usb-stick
RAW host disk access VMDK file usb-stick.vmdk created successfully.