Table of Contents
- Prerequisites
- Creating a Bootable USB Drive
- 2.1 Using Command Line (CMD/DiskPart on Windows)
- 2.2 Using dd Command (Linux/macOS Terminal)
- 2.3 Using Third-Party Tools (Rufus, BalenaEtcher, Ventoy)
- Booting from the USB Drive
- Installing Linux
- Kali Linux Specifics: Live Boot & Persistent Storage
- Troubleshooting Common Issues
- Advanced Tips & Tricks
1. Prerequisites
Before starting, ensure you have:
- A USB drive (8GB+ for most Linux distros; 16GB+ for Kali with persistence).
- A Linux ISO file (e.g., Ubuntu, Fedora, Kali Linux).
- Backup all data on the USB drive (it will be erased).
- Backup critical data on your computer (in case of accidental deletion).
2. Creating a Bootable USB Drive
2.1 Using Command Line (Windows CMD/DiskPart)
This method is native to Windows but not recommended for Linux ISOs (use third-party tools for reliability).
Steps:
- Open Command Prompt as Administrator:
- Press
Win + X> Terminal (Admin).
- Use DiskPart to Format the USB:
diskpart
list disk # Identify your USB drive (e.g., Disk 1)
select disk 1 # Replace "1" with your USB disk number
clean # Wipe the drive
create partition primary # Create a new partition
format fs=FAT32 quick # Format as FAT32
active # Mark partition as bootable
exit
- Extract the ISO and Copy Files:
- Mount the ISO (double-click or use tools like WinCDEmu).
- Copy all files from the mounted ISO to the USB drive.
- Note: This works only for non-hybrid ISOs (most Linux ISOs require direct writing).
2.2 Using dd Command (Linux/macOS Terminal)
The dd command is powerful but double-check your disk ID to avoid data loss!
Steps (Linux):
- Identify the USB Drive:
sudo fdisk -l
# Look for your USB (e.g., /dev/sdb)
- Write the ISO to USB:
sudo dd if=/path/to/linux.iso of=/dev/sdb bs=4M status=progress oflag=sync
- Replace
/dev/sdbwith your USB path. - Warning: Mistyping the disk path will overwrite other drives!
Steps (macOS):
- Find the USB Identifier:
diskutil list
# Look for your USB (e.g., /dev/disk2)
- Unmount and Write:
diskutil unmountDisk /dev/disk2
sudo dd if=/path/to/linux.iso of=/dev/rdisk2 bs=1m
2.3 Using Third-Party Tools
A. Rufus (Windows)
- Download Rufus.
- Select your USB drive.
- Under Boot selection, choose your Linux ISO.
- Set Partition scheme (GPT for UEFI, MBR for BIOS).
- Click Start > OK to write.
B. BalenaEtcher (Cross-Platform)
- Download BalenaEtcher.
- Click Flash from File > Select ISO.
- Select USB drive > Flash!
C. Ventoy (Advanced – Multi-ISO Support)
- Download Ventoy.
- Install Ventoy to your USB drive.
- Copy multiple ISO files to the USB.
- Boot and select your ISO from the Ventoy menu.
3. Booting from the USB Drive
- Restart your PC and press the Boot Menu Key (e.g., F12, F2, Esc, Del).
- Select the USB drive from the boot menu.
- Disable Secure Boot in BIOS if Linux fails to boot (common for Kali).
4. Installing Linux
- Boot into the Live Environment: Select “Try Linux” or “Install Linux”.
- Start the Installer: Follow prompts for language, timezone, etc.
- Partitioning:
- Automatic: Let the installer handle partitioning.
- Manual: Create partitions like
/,/home, andswap.
- User Setup: Enter username, password, and hostname.
- Finish Installation: Reboot and remove the USB when prompted.
5. Kali Linux Specifics
Live Boot (Without Installation)
- Create a bootable USB using Rufus/BalenaEtcher.
- Boot into Kali and select Live system from the GRUB menu.
Persistent Storage (Save Changes)
Method 1: Rufus Persistence (Windows)
- Use Rufus > Select Kali ISO > Enable Persistent partition slider > Start.
Method 2: Manual Setup (Linux/macOS)
- Create a bootable Kali USB.
- Use GParted to shrink the main partition and create a new ext4 partition labeled
persistence. - Add persistence configuration:
echo "/ union" | sudo tee -a /mnt/persistence/persistence.conf
6. Troubleshooting
- USB Not Detected: Recreate the bootable drive; try a different USB port.
- Secure Boot Issues: Disable Secure Boot in BIOS.
- UEFI vs Legacy BIOS: Match the USB partition scheme (GPT for UEFI, MBR for Legacy).
- Corrupted ISO: Verify checksums (
sha256sum linux.iso).
7. Advanced Tips
- Ventoy: Store multiple ISOs on one USB.
- Encrypted Persistence: Secure Kali’s persistent storage with LUKS encryption.
- Live USB Health: Avoid unsafe removal; use
synccommand in Linux before unplugging.
Conclusion
Creating a Linux bootable USB is straightforward with tools like Rufus or dd. For Kali Linux, persistence lets you save tools and configurations. Always verify your ISO and backup data before proceeding. Happy hacking (or computing)!
Need Help? Drop questions below, and I’ll guide you further! 🐧💻
