# Live USB

Live USB 是一种 USB 闪存盘，其中包含可启动、自包含的操作系统，可直接从该驱动器运行，而无需安装到宿主计算机的内部存储上。同样的技术也适用于外接硬盘，历史上还适用于 Live CD，但 U 盘是常见介质，因为它们便于携带、可重写，并能在大多数现代 PC 上启动。典型用途包括：在安装某个发行版之前先行试用、修复损坏的系统、运行私密的便携环境，以及部署标准化工作区。<sup>[1](https://ubuntu.com/desktop/docs/en/latest/tutorial/try-ubuntu-desktop/)</sup><sup> • </sup><sup>[2](https://documentation.ubuntu.com/desktop/en/latest/how-to/create-a-bootable-usb-stick/)</sup>

| 关键事实 | 详情 |
|---|---|
| 最小介质 | Ubuntu 建议为其 Live/安装镜像使用 8 GB 或更大的 U 盘；写入镜像会销毁 U 盘上的所有数据<sup>[2](https://documentation.ubuntu.com/desktop/en/latest/how-to/create-a-bootable-usb-stick/)</sup> |
| 镜像格式 | 大多数 Linux 发行版镜像都是 ISOHybrid：同一文件既可写入 U 盘，也可刻录到 DVD<sup>[1](https://ubuntu.com/desktop/docs/en/latest/tutorial/try-ubuntu-desktop/)</sup> |
| 启动机制 | 内核启动 initramfs——一个 gzip 压缩的 cpio 归档，它被解压到基于内存的根文件系统（rootfs）中，真正的 Live 系统即从该文件系统中定位并挂载<sup>[3](https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html?highlight=initramfs)</sup> |
| 默认持久化 | 若不启用持久化，更改会写入内存中的 tmpfs 覆盖层，并在关机时消失；Debian 的 live-boot 默认将该覆盖层大小设为可用内存的 50%<sup>[4](https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html)</sup> |
| Debian 持久化 | live-boot 会探测卷标或名称为“persistence”的介质（分区、文件系统或镜像文件），该介质必须包含 persistence.conf 文件，否则会被忽略<sup>[4](https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html)</sup><sup> • </sup><sup>[5](https://manpages.debian.org/buster/live-boot-doc/persistence.conf.5.en.html)</sup> |
| Windows 对应方案 | Windows To Go 是 Windows 10 企业版和教育版的一项功能，用于从 USB 启动完整 Windows；它在 Windows 10 版本 1903 中被弃用，并在版本 2004 中被移除<sup>[6](https://learn.microsoft.com/en-us/windows/deployment/planning/windows-to-go-overview)</sup><sup> • </sup><sup>[7](https://learn.microsoft.com/en-us/windows/whats-new/removed-features)</sup> |
| 多镜像工具 | Ventoy 在驱动器上安装一次，之后便可启动复制到其第一个分区的任意 ISO、WIM、IMG 或 VHD(x) 文件<sup>[8](https://www.ventoy.net/en/doc_start.html)</sup> |

## Live USB 如何启动

从 USB 启动依赖与任何 Linux 系统相同的早期用户空间机制，只是其安排方式使得无需内部磁盘。固件（BIOS 或 UEFI）必须支持从 USB 启动；在许多 PC 上，可按 F12、Escape、F2 或 F10 等启动菜单键选择 USB 设备；在 Apple 硬件上，开机时按住 Option 或 Alt 键会调出启动管理器，U 盘在其中显示为“EFI Boot”条目。<sup>[1](https://ubuntu.com/desktop/docs/en/latest/tutorial/try-ubuntu-desktop/)</sup>

引导加载程序将控制权交给内核后，内核会把 initramfs 归档解压到 rootfs（一种基于内存的文件系统）中，并执行其中的 /init 程序作为 PID 1。该 init 负责定位并挂载真正的根设备；在 Live 系统中，这个根设备是 U 盘上的只读介质，而不是已安装的磁盘。<sup>[3](https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html?highlight=initramfs)</sup> 随后，Live 系统的用户空间（例如 Debian 的 live-boot）会扫描块设备，寻找包含只读根文件系统的“/live”目录；像 live-media=removable-usb 这样的参数会把搜索限制在 USB 大容量存储设备上。<sup>[4](https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html)</sup>

由于介质是只读的，或被视为只读，写入操作会进入内存中的写时复制覆盖层。Debian 的 live-boot 将该覆盖层挂载为 tmpfs，其大小默认为可用内存的 50%，可通过 overlay-size 参数调整。<sup>[4](https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html)</sup> 其结果是，默认的 Live 会话是易失的：用户所做的一切都会在关机时消失。<sup>[9](https://tails.net/doc/persistent_storage/)</sup>

## 创建 Live USB

创建是指用专用镜像写入工具把磁盘镜像写入 U 盘，而不是复制文件。Ubuntu 记录了三种途径：GNOME 磁盘应用的“恢复磁盘镜像”功能、启动盘创建器（usb-creator），以及在 Windows 上使用 [Rufus](https://www.edgepedia.org/zh/rufus-software)——它会将 Ubuntu 镜像识别为 ISOHybrid 镜像，并以 ISO 镜像模式写入；在 macOS 上，文档指定的工具是 balenaEtcher。使用 Rufus 写入大约需要 10 分钟，并会擦除 U 盘。<sup>[1](https://ubuntu.com/desktop/docs/en/latest/tutorial/try-ubuntu-desktop/)</sup><sup> • </sup><sup>[2](https://documentation.ubuntu.com/desktop/en/latest/how-to/create-a-bootable-usb-stick/)</sup>

**多镜像 U 盘。** Ventoy 采用不同方法：该工具在驱动器上安装一次，将驱动器分为两个分区，第一个分区格式化为 exFAT（可重新格式化为 NTFS、FAT32、UDF、XFS 或 Ext2/3/4）。复制到该分区任意位置的任何 ISO、WIM、IMG 或 VHD(x) 文件都会被递归发现，并出现在启动菜单中；U 盘仍可作为普通文件驱动器使用。更新 Ventoy 不会改变第一个分区上的文件。<sup>[8](https://www.ventoy.net/en/doc_start.html)</sup>

## 持久化

持久化是一类机制的统称，这些机制在重启后保留 Live 会话的部分或全部更改，而不是让它们随内存覆盖层一起丢失。<sup>[10](https://lists.debian.org/debian-live/2009/10/msg00026.html)</sup> 没有持久化时，Live USB 的行为类似 Live CD；有了它，文档、设置甚至已安装的软件包都能在关机后保留，从而使 U 盘可用作可携带的工作环境。<sup>[11](https://help.ubuntu.com/community/LiveCD/Persistence)</sup>

**Debian 的 live-boot** 通过探测实现持久化：当给出 persistence 启动参数时，live-boot 会在设备中搜索持久化介质；这些介质可以是具有正确 GPT 名称的分区、具有正确卷标的文件系统，或名为“persistence”的镜像文件。带卷标的卷必须在其文件系统根目录下包含 persistence.conf 文件，否则会被忽略。该文件列出“自定义挂载点”，即其更改会持久保存到介质上的绝对目录路径；其中“/ union”一行会使整个根文件系统持久化。选项可将探测限制为可移动介质或 USB 介质（persistence-media=removable-usb），允许使用带口令提示的 LUKS 加密持久化卷（persistence-encryption），并支持在关机时丢弃更改的只读持久化。<sup>[4](https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html)</sup><sup> • </sup><sup>[5](https://manpages.debian.org/buster/live-boot-doc/persistence.conf.5.en.html)</sup> Debian 较旧的方案“完全持久化”使用卷标为 live-rw 的可写分区，而不是 tmpfs 覆盖层，也可以使用放在另一操作系统的 NTFS 分区上的镜像文件；必须在每次启动时给出 persistent 启动参数，才能读取已保存的文件。<sup>[10](https://lists.debian.org/debian-live/2009/10/msg00026.html)</sup>

**Ubuntu 的 casper** 使用类似方案：卷标为 casper-rw 的分区保存持久化数据，在 Live 启动菜单中把 persistent 一词加入内核启动参数即可启用。Ubuntu 的 usb-creator 工具在写入 U 盘时提供持久化存储选项。存储分区没有最小大小限制；空间越大，可安装的应用程序和保存的设置就越多。<sup>[11](https://help.ubuntu.com/community/LiveCD/Persistence)</sup>

**Tails** 是一个注重隐私的 Live 系统，刻意采取不同立场：默认情况下，一切都会在关机时消失；用户可以创建一个加密的持久存储（Persistent Storage），这是一个由口令保护的 LUKS 和 DMCrypt 分区，占用 U 盘上剩余的全部可用空间，用于保存文档、Wi-Fi 密码和浏览器书签。每次启动时，它可以被解锁，也可以保持锁定；它在 U 盘上的存在并不隐藏。<sup>[9](https://tails.net/doc/persistent_storage/)</sup>

## 用途

Live USB 有几种不同用途。作为试用与安装介质，它让用户预览桌面环境、检查硬件兼容性，然后选择安装或重启回到常规系统；Ubuntu 的安装程序从同一介质提供“试用”和“安装”选项，预览仅使用开源驱动，因此 NVIDIA 等厂商的专有驱动在安装前并不可用。<sup>[1](https://ubuntu.com/desktop/docs/en/latest/tutorial/try-ubuntu-desktop/)</sup> 作为救援工具，U 盘中的实用程序可以修复或纠正宿主机上的损坏配置。<sup>[2](https://documentation.ubuntu.com/desktop/en/latest/how-to/create-a-bootable-usb-stick/)</sup> 作为便携工作环境，持久化 U 盘可在多台机器之间携带数据和设置，而无需依赖网络服务；其支持者指出，这既避免了需要可用的互联网连接，也避免了把数据交给他人掌控。<sup>[11](https://help.ubuntu.com/community/LiveCD/Persistence)</sup>

## Windows To Go

[Windows To Go](https://www.edgepedia.org/zh/windows-to-go) 是微软为 Windows 提供的对应方案：它是 Windows 10 企业版和[教育](https://www.edgepedia.org/zh/education)版的一项功能，可创建从经认证的 USB 外接驱动器启动的工作区，并可在任何满足 [Windows 7](https://www.edgepedia.org/zh/windows-7) 或更高版本认证要求的 PC 上运行，无论该 PC 上安装的是什么操作系统。与 Linux 的 Live 会话不同，它是驱动器上的原生 Windows 安装，而不是带覆盖层的只读镜像；它使用带预启动密码的 BitLocker，而不是 TPM 绑定，因为 TPM 与特定计算机绑定，而该驱动器会在计算机之间移动。<sup>[6](https://learn.microsoft.com/en-us/windows/deployment/planning/windows-to-go-overview)</sup> 运行中拔下驱动器会使计算机冻结，并给用户 60 秒时间重新插入，否则就会关机。<sup>[12](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/deployment/windows-to-go/windows-to-go-frequently-asked-questions)</sup> 微软在 Windows 10 版本 1903 中弃用了该功能，并在版本 2004 中将其移除，理由是它不支持功能更新，且依赖许多 OEM 厂商已不再生产的 USB 驱动器类型。<sup>[6](https://learn.microsoft.com/en-us/windows/deployment/planning/windows-to-go-overview)</sup><sup> • </sup><sup>[7](https://learn.microsoft.com/en-us/windows/whats-new/removed-features)</sup>

## 局限

Live 会话受内存和介质速度制约。内存覆盖层限制了非持久化会话中可更改或安装的内容量；在 Debian 的 live-boot 中，默认上限为可用内存的 50%。<sup>[4](https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html)</sup> 持久化写入会落到闪存介质上，而 Debian Live 文档指出，大多数 U 盘的写入速度较差，这也是考虑在其他介质上使用基于镜像文件的持久化的原因之一。<sup>[10](https://lists.debian.org/debian-live/2009/10/msg00026.html)</sup> 持久化还会改变 Live 系统的安全态势：Tails 文档说明其持久存储并不隐藏，因此拿到 U 盘的攻击者知道它存在，而它的口令可能是加密中最薄弱的环节。<sup>[9](https://tails.net/doc/persistent_storage/)</sup> 最后，针对特定发行版的说明很快就会过时；Debian 维基上关于 USB 持久化的页面带有警示：由于 U 盘布局已变化，该页面需要大改，并且用 debian-live-11.2-amd64 镜像无法复现其可用状态。<sup>[13](https://wiki.debian.org/DebianLive/LiveUsbPersistence)</sup>

## References

1. [Try Ubuntu Desktop, Ubuntu Desktop documentation](https://ubuntu.com/desktop/docs/en/latest/tutorial/try-ubuntu-desktop/)
2. [Create a bootable USB stick, Ubuntu Desktop documentation](https://documentation.ubuntu.com/desktop/en/latest/how-to/create-a-bootable-usb-stick/)
3. [Ramfs, rootfs and initramfs, The Linux Kernel documentation](https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html?highlight=initramfs)
4. [live-boot(7), live-boot-doc, Debian Manpages](https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html)
5. [persistence.conf(5), live-boot-doc, Debian Manpages](https://manpages.debian.org/buster/live-boot-doc/persistence.conf.5.en.html)
6. [Windows To Go: feature overview, Microsoft Learn](https://learn.microsoft.com/en-us/windows/deployment/planning/windows-to-go-overview)
7. [Features and functionality removed in Windows client, Microsoft Learn](https://learn.microsoft.com/en-us/windows/whats-new/removed-features)
8. [Get started, Ventoy documentation](https://www.ventoy.net/en/doc_start.html)
9. [Tails - Persistent Storage](https://tails.net/doc/persistent_storage/)
10. [Suggestions for debian-live manual, "persistence" section, debian-live mailing list (2009)](https://lists.debian.org/debian-live/2009/10/msg00026.html)
11. [LiveCD/Persistence, Ubuntu Community Help Wiki](https://help.ubuntu.com/community/LiveCD/Persistence)
12. [Windows To Go: frequently asked questions, Microsoft Learn](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/deployment/windows-to-go/windows-to-go-frequently-asked-questions)
13. [DebianLive/LiveUsbPersistence, Debian Wiki](https://wiki.debian.org/DebianLive/LiveUsbPersistence)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Storage devices & memory › Solid-state storage & memory modules › USB flash drives

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/live-usb

English original: https://www.edgepedia.org/live-usb
