缩小分区而不会丢失数据


14

我在要缩小的分区上安装了基于Linux的操作系统。如果可能的话,要避免重新安装或丢失/损坏数据。

Answers:


18

一如既往:

进行备份。您至少要缩小分区上的敏感数据。如果您搞砸了,我和geparted概不负责。

现在使用gparted进行操作

gparted屏幕截图,并附有步骤

图片有点凌乱,但不要害怕(您将把分区移动到Bel Air的阿姨和叔叔那里。请等待wat?XD)。只需坚持片刻,然后按照以下说明进行操作即可。开始查看右上角的图像。然后按照数字升序排列。

这是步骤的文本版本,如图所示:

  • 安装gparted /sudo apt-get install gparted
  • 开始gparted
    1. 在右上角的下拉框中选择磁盘
    2. 在中间的主列表中选择分区
      • If mounted: Unmount that partition using the contex menu (right click)
    3. Click the resize button
    4. A dialog will pop up
    5. Resize
    6. Click "Apply" after double checking your changes. That's it.

This will not work with all partitions. It can be more complicated for Mac partitions or logical volumes.


3
+1 for the mounted part. If you're trying to shrink the / partition (or something that is essential to be mounted), just boot from a liveCD and then run gparted.
Nemo

2
Er, do you mind dividing the steps into different screenshots? The image is as confusing as your name is.
Oxwivi

Wait, now that I read the whole thing, just doing the usual shrinking will be fine? It will move the data by itself?
Oxwivi

It gave me a warning that it could rendered unbootable...
Oxwivi

2
Yes, gparted will move the data by itself as long as you don't shrink the partition to a size that's too small for it. Concerning the 'confusing' bit: The numbers in the pictures correspond to those in the text. As for the unbootable bit: What partition do you resize?
con-f-use
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.