虽然可以在 Windows 中访问您的 Linux 分区(access your Linux partitions in Windows),但它充其量只是一个有问题的解决方案。如果不依赖不再积极开发的软件,您将无法轻松添加或更改文件。
对于需要在双启动 PC 上共享文件的大多数用户来说,有一个明显的解决方案,而不是冒险您的文件。您可以创建一个共享的“池”驱动器,而不是依赖过时的软件,两个操作系统都可以使用NTFS文件系统安全地访问该驱动器。
在你开始之前(Before You Begin)
虽然您确实可以使用现有的Windows分区,但这种方法存在风险。如果您以后需要擦除该分区,您将无法隔离您的文件,例如,如果您最终感染了勒索软件,这可能是必要的。
考虑到这一点,最好创建一个共享驱动器,与任一操作系统使用的系统文件隔离。
除非您已经有可用空间,否则您需要调整现有分区的大小以便为共享驱动器腾出空间。如果您计划在另一个硬盘驱动器上创建此分区,并且您计划使用该驱动器上的所有空间,则无需执行此操作。
在开始更改驱动器分区之前,您应该考虑风险。对分区表的任何更改都可能出错并导致数据丢失。确保(Make)在开始之前备份所有关键文件。
创建您的共享云端硬盘(Creating Your Shared Drive)
当您要创建共享云端硬盘时,有两种选择。
如果您在现有硬盘驱动器上已有可用空间,或者如果您正在使用第二个硬盘驱动器上的整个空间,您可以直接跳到我们的创建分区(Creating Your Partitions)部分。
如果您需要为共享驱动器创建空间,无论是在承载系统分区的硬盘驱动器上还是在完全独立的驱动器上,您都需要先调整分区大小。
调整分区大小(Resizing Your Partitions)
您可以在 Windows 上使用多种用于格式化和分区驱动器(tools for formatting and partitioning drives)的工具,但最简单的解决方案是使用已包含的工具 - Windows 磁盘管理(Windows Disk Management)工具。
如果您愿意,可以改为使用 GParted 创建或调整分区大小(resize your partitions with GParted)。GParted 可以从USB驱动器等可移动媒体运行,也可以通过将其安装到Linux系统来运行。它作为安装包包含在大多数Linux系统存储库中。
您将只能使用磁盘管理工具调整已使用 Windows 支持的文件系统(如(Disk Management Tool)NTFS或FAT32 )的分区大小。如果您需要调整Ext4或其他Linux文件系统的大小,请改用 GParted。
- 您可以通过右键单击Windows 开始按钮( Windows Start button)并单击磁盘管理来访问Windows 磁盘管理工具(Windows Disk Management)。(Disk Management.)
在Disk Management中,您将看到驱动器的拆分列表。上半部分将显示可供您使用的“卷”或分区。下半部分将以更直观的格式显示分配给每个驱动器的分区。
- 要开始调整大小,请右键单击所选驱动器上足够大的分区。在Windows分区上,这很可能是您的Windows系统 (C:) 驱动器。
- 单击缩小体积。(Shrink Volume.)
Windows 将首先分析驱动器,这可能需要一分钟。完成后,您会看到一个窗口,要求您输入要释放的空间量(以兆字节为单位)。
- 输入适合您存储需求的数量。存储内存大小(Storage memory sizes)有点不寻常,所以请记住,1GB 不等于 1000MB,而是 1024MB。
- 选择要释放的存储量后,点击Shrink。
如果您在收缩分区时遇到问题(例如,如果Shrink按钮显示为灰色),您可能需要暂时禁用 hibernation。这是由于Windows如何存储某些系统文件。
创建您的分区(Creating Your Partitions)
一旦您的硬盘驱动器拥有必要的空间,您就可以开始创建新的共享驱动器分区。
- 在磁盘管理(Disk Management)中,您应该看到标记为“未分配”的可用空间。右键单击(Right-click)它,然后在出现的菜单中单击新建简单卷。(New Simple Volume.)
- 单击下一步(Next)开始。在单击Next(Next)之前插入(Insert)新分区的大小(以 MB 为单位) 。
- 在单击Next(Next) 之前,确认为您的新驱动器选择的驱动器号。
- 下一阶段将确认创建分区后格式化分区所需的设置。默认设置应该没问题,但请确保选择了NTFS。在卷标(Volume Label)部分下为分区命名,然后单击下一步(Next)继续。
- 在最后阶段,单击完成(Finish)开始创建和格式化新驱动器分区的过程。
如果您正在使用另一个硬盘驱动器,并且需要删除或格式化任何现有分区,磁盘管理(Disk Management)将允许您这样做。
您可以右键单击任何现有分区,单击删除卷(Delete Volume),然后在“未分配”空间中创建一个新分区,也可以选择格式化(Format)将现有分区格式化为NTFS文件系统。
访问您的共享云端硬盘(Accessing Your Shared Drive)
创建新分区并对其进行格式化后,您应该能够在Windows 文件资源管理器(Windows File Explorer)中访问它。
由于ntfs-3g驱动程序包,大多数现代Linux发行版将能够读取具有NTFS文件系统的分区。(NTFS)这是在最近的Ubuntu(Ubuntu)和 Debian 版本中预装的,但您可能需要自己在其他发行版中安装它,例如Arch Linux。
在大多数情况下,您可能需要“轻推”您的发行版以安装驱动器并允许您访问。例如,在Ubuntu中,打开文件管理器并单击(Ubuntu)其他位置。(Other Locations. )通过格式化时给它的标签找到您的分区,然后点击它。
然后它应该挂载并打开,允许您访问其中的任何文件,以及添加或删除它们。下次切换系统时,您添加的任何文件都可以从Windows中访问。(Windows)
How To Create a Shared Storage Drive For Dual-Boot Systems
While it’s possible to access your Linux partitions in Windows, it’s a buggy solution at best. You can’t easily add or change your files without relying on software that’s no longer actively being developed.
Rather than risking your files, there’s an obvious solution for most users who need to share files on dual-boot PCs. Instead of relying on outdated software, you can create a shared “pooled” drive that both operating systems can safely access using the NTFS file system.
Before You Begin
While it’s true that you could use your existing Windows partition, this method has risks. You won’t be able to isolate your files if you need to erase that partition at a later date, which might be necessary if you end up infected with ransomware for instance.
With that in mind, it’s better to create a shared drive, isolated from the system files used by either operating systems.
Unless you already have space available, you’ll need to resize your existing partitions to create space for your shared drive. If you plan on creating this partition on another hard drive, and you plan on using all of the space on that drive, you won’t need to do this.
Before you start changing your drive partitions, you should consider the risks. Any alterations to your partition table could go wrong and result in data loss. Make sure that any critical files are backed up before you start.
Creating Your Shared Drive
There are two options for you when you’re looking to create your shared drive.
If you already have the space available to you on an existing hard drive, or if you’re using the entire space on a second hard drive, you can skip straight to our Creating Your Partitions section.
If you need to create space for your shared drive, whether it’s on the hard drive carrying on your system partitions or on an entirely separate drive, you’ll need to resize your partitions first.
Resizing Your Partitions
There are several tools for formatting and partitioning drives that you can use on Windows, but the easiest solution is to use one that’s already included – the Windows Disk Management tool.
If you’d prefer, you can create or resize your partitions with GParted instead. GParted can be run from removable media like a USB drive, or by installing it to your Linux system. It’s included as a package for installation in most Linux system repositories.
You will only be able to resize partitions that already use Windows-supported file systems like NTFS or FAT32 using the Disk Management Tool. If you need to resize Ext4 or other Linux file systems, switch to using GParted instead.
- You can access the Windows Disk Management tool by right-clicking the Windows Start button and clicking Disk Management.
In Disk Management, you’ll see a split list of your drives. The top half will show the “volumes”, or partitions, available to you. The bottom half will show the partitions assigned to each drive in a more visual format.
- To begin resizing, right-click on a large enough partition on your chosen drive. On a Windows partition, this is likely to be your Windows system (C:) drive.
- Click Shrink Volume.
Windows will analyze the drive first, which may take a minute. Once it’s completed, you’ll see a window, asking you to enter the amount of space you wish to free up in megabytes.
- Type in a suitable amount for your storage needs. Storage memory sizes are a little unusual, so remember that 1GB doesn’t equal 1000MB, but rather 1024MB.
- Once you’ve selected the amount of storage you’d like to free up, click Shrink.
If you’re having trouble shrinking your partition (for instance, if the Shrink button is greyed out), you may need to temporarily disable hibernation. This is due to how Windows stores certain system files.
Creating Your Partitions
Once your hard drive has the necessary space, you can move to create your new shared drive partition.
- In Disk Management, you should see your available space labeled as “Unallocated”. Right-click it and, in the menu that appears, click New Simple Volume.
- Click Next to start. Insert the size of your new partition, using megabytes, before clicking Next.
- Confirm the chosen drive letter for your new drive before clicking Next.
- The next stage will confirm the settings you need to format the partition once it’s created. The default settings should be fine, but make sure that NTFS is selected. Give the partition a name under the Volume Label section, and click Next to continue.
- At the final stage, click Finish to begin the process of creating and formatting your new drive partition.
If you’re using another hard drive, and need to delete or format any existing partitions, Disk Management will allow you to do so.
You can either right-click any existing partitions, click Delete Volume and then create a new partition in the “Unallocated” space, or you can choose Format to format an existing partition to the NTFS file system.
Accessing Your Shared Drive
Once you’ve created your new partition and formatted it, you should be able to access it in Windows File Explorer.
Most modern Linux distributions will be able to read partitions with NTFS file systems, thanks to the ntfs-3g driver package. This is pre-installed with recent Ubuntu and Debian releases, but you may need to install it yourself in other distributions like Arch Linux.
In most cases, you may need to give your distribution a “nudge” to mount the drive and allow you access. In Ubuntu, for instance, open your file manager and click Other Locations. Locate your partition by the label you gave it when you formatted it, then tap it.
It should then mount and open, allowing you to access any files within, as well as add or delete them. Any files you add will then be accessible from within Windows the next time you switch systems.