是否可以将普通 Ubuntu Live USB 转换为永久 USB(无需任何其他设备或 USB 记忆棒)?

MrD*_*uck 7 live-usb persistence

我有一个 Ubuntu live USB,并且没有任何其他 PC、笔记本电脑或 USB 记忆棒。我可以让我的 live USB 持久化吗?如果没有,是否有其他方法可以将文件保存在其中,以便即使我重新启动电脑后它们也能保留在那里?

注意:我有一台配备 Intel 第六代 Core i3 处理器和 4GB RAM 的 PC,目前正在通过 16GB USB 记忆棒运行 Ubuntu。我不能借用别人的电脑或 USB 驱动器,但我有一部手机(如果有帮助的话)。

sud*_*dus 14

Usually I recommend using mkusb in order to create a persistent live USB drive. But in this case I think it is too risky, because there is no backup, the only working operating system is in the target drive.

Instead I suggest to make the default /var/log and /var/crash mounted writable partition into a 'free' usbdata partition, that can be mounted and unmounted by the user.

The system will be live (not persistent live), but the ext4 partition can be used for storage. Until you have another drive available this is a rather safe method to create storage space on the drive. In order to make it convenient, you can create one or more directories at its top level and modify the ownership.

The partition will probably automount (it did when i tested with Lubuntu 20.04.4 LTS, which is lighter than standard Ubuntu).

cd /media/lubuntu/usbdata
sudo mkdir Docs
sudo chown 999 Docs
Run Code Online (Sandbox Code Playgroud)

999 is the numeric ID of the live user (for standard Ubuntu as well as Lubuntu and the other community flavours). Now you can go there and test writing files.

cd Docs
echo 'Hello World' > hello
cat hello
ls -l hello
Run Code Online (Sandbox Code Playgroud)

  • 哇哦……它有效了,非常感谢你,我非常痛苦,而且我需要一些时间才能获得新的硬盘。这真的对我有帮助,谢谢 (2认同)

C.S*_*ron 6

实时 USB 到持久 USB

持久性 Linux USB 基本上只是带有持久性覆盖文件或分区的 Live USB(即 casper-rw、可写或 home -rw)。

可以从头开始制作持久 USB:

简单手工制作的持久 USB,可启动 BIOS 或 UEFI

也可以从 Live USB 完全安装 Ubuntu,请参阅: https: //askubuntu.com/a/855805/43926

类似请参阅:如何使用启动磁盘创建器制作持久驱动器

Ubuntu 可以安装到启动它的随身碟吗?。

  • @user68186 是的,它可以使用 toram,请参阅上面的链接。 (3认同)
  • 他们只有 4GB RAM;使用“toram”将消耗压缩文件系统映像的很大一部分。但作为创建持久 USB 设置的临时方法,是的,这可行。OP [说](https://askubuntu.com/questions/1421110/is-it-possible-to-turn-normal-ubuntu-live-usb-to-persistent-usb-without-any-oth#comment2473279_1421110 )可以从手机访问他们的 USB 记忆棒,这就是他们最初的制作方式。因此,如果出现问题,他们有办法重试。 (2认同)
  • @MrDuck sudodus 已经做到了[在具有 4GB RAM 的 PC 上](https://askubuntu.com/a/855298/253474),但那是 Ubuntu 16.04,所以可能更轻。您应该尝试 Xubuntu 或 Lubuntu,它们比 Ubuntu 或 Kubuntu 轻得多 (2认同)