Bootdisk HOWTO: make rescue USB media and repair a boot
The boot floppy is gone. Today a "boot disk" is a USB stick with a live Linux system on it. You use it to install Linux, test hardware, and repair a computer that no longer starts. This page shows how to write one safely, which rescue system to keep in a drawer, and how to fix the most common boot failure: a broken or missing GRUB boot loader.
The classic Bootdisk HOWTO explained how to squeeze a kernel and a root file system onto a 1.44 MB floppy. A modern rescue image is about a gigabyte and comes ready-made, so the skill that matters now is using it.
What to put on the stick
- Your distribution's live or install image. Debian, Ubuntu and Fedora images boot into a live desktop or have a rescue option. Using the same distribution as the broken system makes repairs easier, because the tools match.
- SystemRescue, a rescue system built for repairs. Version 13.02 (released August 1, 2026, 1,318 MiB, as of November 2026) includes GParted, GNU Parted, fsarchiver, ddrescue, TestDisk, Memtest, ntfs-3g, rsync and network tools. It starts at a text prompt. Type
startxfor a graphical desktop.
Use a stick of at least 8 GB. Writing an image erases everything on the stick.
Write an image to USB from Linux
1. Find the right device
Run lsblk, plug in the stick, and run it again. The new entry is your stick:
lsblk -o NAME,SIZE,MODEL,TRAN,MOUNTPOINTS
NAME SIZE MODEL TRAN MOUNTPOINTS
nvme0n1 476.9G Samsung SSD 980 nvme
├─nvme0n1p1 512M /boot/efi
└─nvme0n1p2 476.4G /
sdb 28.9G Ultra Fit usb
└─sdb1 28.9G /media/you/STICK
Here the stick is /dev/sdb (28.9 GB, connected by USB). The commands below write /dev/sdX: replace it with the name you found. Device names are not fixed, and on many PCs /dev/sda is the internal system disk.
dd erases the target without asking. Writing to the wrong device destroys everything on that disk, including your installed system. Confirm the device with lsblk (size, model and usb transport) immediately before you run dd or Ventoy2Disk.sh, and type the name carefully.
2. Unmount it and write the image
sudo umount /dev/sdX1
sudo dd if=systemrescue-13.02-amd64.iso of=/dev/sdX bs=4M status=progress conv=fsync
Write to the whole device (/dev/sdX), not to a partition (/dev/sdX1). conv=fsync makes dd wait until the data has really reached the stick. Debian's install guide uses the equivalent sudo cp debian.iso /dev/sdX followed by sync. Wait until the command returns before you pull the stick out.
Verify the image's checksum before writing it (see Installation HOWTO). Avoid tools that rewrite the image, such as old versions of unetbootin. Current Linux ISO images are "hybrid" images, built to be copied byte for byte.
Graphical tools
- Fedora Media Writer (Linux, Windows, macOS) downloads and writes Fedora images. Its Restore option turns the stick back into a normal empty drive afterward.
- GNOME Disks can write any image: select the stick, open the menu, and choose "Restore Disk Image".
Many images on one stick: Ventoy
Ventoy installs a small boot loader on the stick once. After that you just copy ISO files onto it, and Ventoy shows a menu of them at boot. It is handy for keeping SystemRescue, an installer and a memory tester on one stick.
tar xf ventoy-*-linux.tar.gz
cd ventoy-*/
sudo sh Ventoy2Disk.sh -i -g /dev/sdX # -i install (erases the stick), -g GPT partition table
# add -s to enable Secure Boot support
The stick then has a large exFAT partition. Copy .iso files anywhere on it, in folders if you like. Ventoy also boots WIM, IMG and VHD(x) files. To upgrade Ventoy later without losing your ISOs, use -u instead of -i.
With Secure Boot on, Ventoy shows a blue screen the first time and asks you to enroll its key in MokManager. You only do this once per computer. Ventoy 1.1.13 and later need a newer key because of the move to Microsoft's 2023 UEFI certificate. Some PCs also need "Allow Microsoft 3rd Party UEFI CA" enabled in the firmware setup.
Boot from the stick
Most PCs show a one-time boot menu when you press a key during power-on, often F12, F11, F10 or Esc depending on the maker. Choose the entry starting with "UEFI:" followed by the stick's name. On a system with Linux already running, you can also pick the stick for the next boot only:
sudo efibootmgr # list entries: Boot0003* UEFI: Ultra Fit ...
sudo efibootmgr -n 0003 # boot entry 0003 once, on the next restart
To add SystemRescue boot options, press e at its menu (UEFI boot) or Tab (BIOS boot) and type them at the end of the line. copytoram loads the whole system into memory so you can remove the stick. setkmap=de picks a keyboard layout.
Repair GRUB from a live system
If the computer shows grub rescue>, drops into the firmware setup, or says no boot device was found, the boot loader is usually broken. Windows updates and firmware updates can also remove the Linux boot entry. The fix: boot the live stick, enter your installed system with chroot, and reinstall GRUB from inside it.
1. Find your partitions
lsblk -f
Look for the EFI system partition (FAT32, about 100 MB–1 GB, often the first partition) and your Linux root partition (ext4, btrfs or xfs). If the root is encrypted (crypto_LUKS), open it first with sudo cryptsetup open /dev/nvme0n1p3 root. If it uses LVM, run sudo vgchange -ay and use the /dev/mapper/... name.
2. Mount and chroot
This example uses root on /dev/nvme0n1p2 and the EFI partition on /dev/nvme0n1p1. Replace them with your own:
sudo mount /dev/nvme0n1p2 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do
sudo mount -B $i /mnt$i
done
sudo chroot /mnt
If /boot is a separate partition, mount it at /mnt/boot before mounting the EFI partition. On btrfs with subvolumes (the Fedora and openSUSE default), mount the root subvolume, for example mount -o subvol=root /dev/nvme0n1p3 /mnt on Fedora. Check the names with btrfs subvolume list.
3. Reinstall GRUB (inside the chroot)
Debian and Ubuntu:
grub-install --target=x86_64-efi --efi-directory=/boot/efi
update-grub
exit
Fedora, RHEL, Alma, Rocky: reinstall the signed boot loader packages and rebuild the menu. The real menu is /boot/grub2/grub.cfg. The small grub.cfg in /boot/efi/EFI/fedora/ (or .../redhat/) is only a stub that points to it, so do not overwrite it:
dnf reinstall shim-x64 grub2-efi-x64 # x86_64 package names
grub2-mkconfig -o /boot/grub2/grub.cfg
exit
Then reboot without the stick: sudo reboot.
4. Check the boot entry
sudo efibootmgr -v
You should see an entry such as debian, ubuntu or Fedora pointing to \EFI\...\shimx64.efi or grubx64.efi on your disk. If the firmware keeps forgetting it, install a copy to the fallback path that every UEFI firmware tries, \EFI\BOOT\BOOTX64.EFI. On Debian, run grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable. This overwrites the fallback loader, which may belong to Windows on a dual-boot disk.
UEFI and Secure Boot notes
- Boot the stick in the same mode as the installed system. A UEFI install must be repaired from a stick booted in UEFI mode, or
/sys/firmware/efiwill not exist and grub-install will fail. - Debian, Ubuntu, Fedora, RHEL and openSUSE images boot with Secure Boot on, through a Microsoft-signed shim. If a rescue image is refused, turn Secure Boot off in the firmware setup for the repair, then turn it back on.
- Some new PCs trust only Microsoft's 2023 UEFI certificate. Older boot media signed with the 2011 certificate may then fail with a security violation. Use current images, or enable the 2011 third-party CA in firmware setup.
- Legacy BIOS systems: run
grub-install /dev/sdX(the disk the system boots from, not a partition; check withlsblk) instead of the EFI command, orgrub2-install /dev/sdXon Fedora and RHEL.
Mistakes to avoid
- Writing the image to your internal disk. Always check
lsblktwice. - Writing to a partition (
/dev/sdX1) instead of the whole stick (/dev/sdX). The stick will not boot. - Pulling the stick out before
ddorsyncreturns. - Forgetting the bind mounts before
chroot. grub-install then cannot see your disks or EFI variables. - Running
grub2-mkconfigon the stub file in/boot/efion Fedora or RHEL.
The classic Bootdisk HOWTO, from the floppy era, is kept by the Linux Documentation Project at tldp.org.
Sources
- Preparing files for USB memory stick booting, Debian 13 installation guide
- SystemRescue, its download page, USB installation guide, quick start guide and boot options
- Ventoy: get started and Secure Boot, ventoy.net
- Fedora Media Writer, Fedora project
- Disks, Apps for GNOME
- dd(1), man7.org
- GrubEFIReinstall, Debian Wiki
- grub-install(8) and update-grub(8), Debian
- Reinstalling GRUB, Red Hat Enterprise Linux 9 documentation
- efibootmgr(8), Debian
- SecureBoot, Debian Wiki