什么是 casper rw 循环文件?为什么需要它来使保存永久保存在 USB 闪存驱动器上?
假设我已经在闪存驱动器上安装了 Linux。为什么我需要像 casper 循环文件这样的东西来使保存持久化?那么文件被删除了?闪存驱动器和实际的硬盘驱动器不一样吗?我是 Linux 菜鸟,所以要有耐心。
或者是因为闪存驱动器上的 Linux 实际上就像闪存驱动器上的 Live CD?可以像安装在硬盘驱动器上一样安装吗?
Suppose I've installed Linux on my flash drive. Why do I need something like the casper loop file to make saving persistent? So files are being erased? Isn't the flash drive the same as actual hard disk drive? I'm a Linux noob so be patient.
Or it is because Linux on a flash drive is actually like live CD on a flash drive? Can it be installed just like it is installed on a hard disk drive?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通过将可启动的只读文件系统映像作为文件嵌入到 USB 棒上并从中启动,可以实现 USB 棒上的 Live Linux。这样做有几个原因,其中最大的原因是该棒在其他系统上仍然可读/可用,而且还因为这意味着您可以使用相同的文件堆栈来制作 Live CD 作为 USB 棒。
通常,完成此操作后,RW 部分是通过 ramdisk 完成的,但是使用 USB 记忆棒,您有机会将实时系统的可变部分存储在记忆棒上。
您可能会想,“好吧,为什么不将其作为棒上的目录呢?”原因是 FAT32 文件系统不具备 Unix 环境所需的所有元数据。您需要使用诸如 ext2 之类的东西。
那么什么是 casper 文件?该文件被视为硬盘驱动器分区。就是这样。您没有将 mkfs.ext2 或挂载点指向 /dev/sda3 (一个分区),而是将其指向 /mnt/sda3/casper-rw (一个文件)。
Live Linux off a USB stick is done by embedding a bootable, read-only filesystem image as a file on a USB stick and booting from that. This is done for a couple of reasons, the largest of which being that the stick remain readable / usable on other systems, but also because it means you can use the same stack of files to make a Live CD as a USB stick.
Normally when this is done, the RW portion is done via a ramdisk, however with a USB stick, you have the opportunity to store the mutable portion of the live system on the stick.
You may think, "well, why not just do it as a directory on the stick?" The reason for this is that a FAT32 filesystem doesn't have all the metadata that a Unix environment needs. You need to use something like ext2.
So what is a casper file? It's a file that has been treated like it's a hard drive partition. That's it. Instead of pointing mkfs.ext2 or mount at /dev/sda3 (a partition), you've pointed it at /mnt/sda3/casper-rw (a file).
Casper 基本上是 Linux 系统的一个存储容器,它下载程序/驱动程序/设置,保存任何基于软件的内容。不在 casper 驱动器中的文件要么是 live cd(在本例中位于 USB 驱动器上) )和用户创建的文件,例如 Open Office 文档、图片和视频。不要用 casper 耗尽 USB 驱动器上的可用空间,否则驱动器上将没有空间保存文档。
您可以将 Linux 安装到闪存驱动器上,而闪存驱动器由于其运行方式而不需要 casper 持久存储,但它使 USB 驱动器只能在安装它的电脑上使用。
这就是 casper 提供的功能,因为实时 USB 驱动器可以在许多具有与您下载的版本相同的硬件配置的电脑上使用,并且 casper 会随身携带您的程序和设置。
Casper is basically a storage container for Linux systems which downloads programs/drivers/settings anything that is software based is saved in. The files that are not in the casper drive are either the live cd (which would be on a USB drive in this case) and user-created files such as Open Office documents, pictures, and videos. Don't use up the free space on your USB drive with casper or you won't have room to save documents on the drive.
You can install Linux onto your flash drive which in turn wouldn't need a casper persistent storage because of how it runs, but it renders the USB drive as only usable on the pc that it was installed with.
That's what casper provides because a live USB drive can be used on many pcs with the same hardware configuration as the version you downloaded, and casper brings your programs and settings with you.
这似乎是一个“无需动脑筋”的模型,可以让你的“工具”=(操作系统)&你的“艺术”=(数据/文档)彼此隔离,并且它可以通过“工具”=(操作系统)“特殊工具”=(其他“物品”)和“工具”走得更远。 “艺术”=(数据/文件)。
It seems like a "no brainer" model in keeping your "Tool"=(OS) & your "Art"=(Data / Documents) isolated from each other, and it could go even farther by "Tool"=(OS) "Special Tools"=(Additional 'wares) & "Art"=(Data / Documents).