将 Pop-OS 安装移动到较小的驱动器(使用 GParted?)

将 Pop-OS 安装移动到较小的驱动器(使用 GParted?)

我需要将 Pop-OS 安装从 250GB HDD 移动到 128GB SSD。到目前为止,我一直在尝试使用 GParted(它可以在相同大小的驱动器之间移动我的 Ubuntu 安装)。

恢复和启动分区已正确复制,但要复制主(根)分区,我需要先缩小它(有足够的空间)。使用 GParted 尝试缩小它似乎会执行一段时间的操作,但每次都会在同一点出现错误(根据进度条判断)。 (标题与此问题无关,以尽量避免 A/B 问题)。

我尝试运行 GParted 详细信息文件中编写的 e2fsck 命令,然后重新启动计算机。这些都没有使收缩发挥作用。如果没有分区收缩,我不知道如何将安装移动到较小的驱动器。

以下是错误生成的 gparted_details.htm 内容。

关于如何移动操作系统的任何和所有想法都值得赞赏。


GParted 1.3.1

configuration --enable-libparted-dmraid --enable-online-resize

libparted 3.4

========================================
Device: /dev/nvme0n1
Model:  CT1000P5PSSD8
Serial: 
Sector size:    512
Total sectors:  1953525168
 
Heads:  255
Sectors/track:  2
Cylinders:  3830441
 
Partition table:    gpt
 
Partition   Type    Start   End Flags   Partition Name  Filesystem  Label   Mount Point
/dev/nvme0n1p1  Primary 34  32767   msftres Microsoft reserved partition    unknown     
/dev/nvme0n1p2  Primary 32768   819232767   msftdata    Basic data partition    ntfs    New Volume  

========================================
Device: /dev/nvme1n1
Model:  RPFTJ128PDD2EWX
Serial: 
Sector size:    512
Total sectors:  250069680
 
Heads:  255
Sectors/track:  2
Cylinders:  490332
 
Partition table:    gpt
 
Partition   Type    Start   End Flags   Partition Name  Filesystem  Label   Mount Point
/dev/nvme1n1p1  Primary 2048    250068991           ext4        /

========================================
Device: /dev/sda
Model:  ATA CT250MX500SSD1
Serial: 2013E298798B
Sector size:    512
Total sectors:  488397168
 
Heads:  255
Sectors/track:  2
Cylinders:  957641
 
Partition table:    gpt
 
Partition   Type    Start   End Flags   Partition Name  Filesystem  Label   Mount Point
/dev/sda1   Primary 2048    1050623 boot, esp   EFI System Partition    fat32       /boot/efi
/dev/sda2   Primary 1050624 1083391 msftres Microsoft reserved partition    ext4        
/dev/sda3   Primary 1083392 487322748   msftdata    Basic data partition    ntfs        
/dev/sda4   Primary 487323648   488394751   hidden, diag        ntfs        

========================================
Device: /dev/sdb
Model:  ATA ST31000528AS
Serial: 5VP2CLXV
Sector size:    512
Total sectors:  1953525168
 
Heads:  255
Sectors/track:  2
Cylinders:  3830441
 
Partition table:    msdos
 
Partition   Type    Start   End Flags   Partition Name  Filesystem  Label   Mount Point
/dev/sdb1   Primary 63  1953520127  boot        ntfs    ExtDisk 

========================================
Device: /dev/sdc
Model:  ATA ST500DM002-1BD14
Serial: Z2AXE6DG
Sector size:    512
Total sectors:  976773168
 
Heads:  255
Sectors/track:  2
Cylinders:  1915241
 
Partition table:    msdos
 
Partition   Type    Start   End Flags   Partition Name  Filesystem  Label   Mount Point
/dev/sdc1   Primary 2048    976769023           ntfs    stuff   

========================================
Device: /dev/sdd
Model:  ATA WDC WD2500BEVT-7
Serial: WD-WXR1A60R1236
Sector size:    512
Total sectors:  488397168
 
Heads:  255
Sectors/track:  2
Cylinders:  957641
 
Partition table:    gpt
 
Partition   Type    Start   End Flags   Partition Name  Filesystem  Label   Mount Point
/dev/sdd1   Primary 4096    2097150 boot, esp       fat32       
/dev/sdd2   Primary 2097152 10485758    msftdata    recovery    fat32       
/dev/sdd3   Primary 10485760    480004462           ext4        
/dev/sdd4   Primary 480004464   488393070   swap        linux-swap      

========================================
Device: /dev/sde
Model:  USB DISK
Serial: 
Sector size:    512
Total sectors:  15730688
 
Heads:  255
Sectors/track:  2
Cylinders:  30844
 
Partition table:    msdos
 
Partition   Type    Start   End Flags   Partition Name  Filesystem  Label   Mount Point
/dev/sde1   Primary 8192    15728639            ntfs    NTFS    /media/yee/NTFS
/dev/sde2   Primary 15728640    15730687    lba     fat16   UEFI_NTFS   /media/yee/UEFI_NTFS

========================================
Shrink /dev/sdd3 from 223.88 GiB to 107.42 GiB  00:11:10    ( ERROR )
        
calibrate /dev/sdd3  00:00:02    ( SUCCESS )
        
path: /dev/sdd3 (partition)
start: 10485760
end: 480004462
size: 469518703 (223.88 GiB)
check filesystem on /dev/sdd3 for errors and (if possible) fix them  00:00:15    ( SUCCESS )
        
e2fsck -f -y -v -C 0 '/dev/sdd3'  00:00:15    ( SUCCESS )
        
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

527061 inodes used (3.59%, out of 14680064)
962 non-contiguous files (0.2%)
411 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 502974/140
24348903 blocks used (41.49%, out of 58689837)
0 bad blocks
15 large files

454992 regular files
45072 directories
15 character device files
1 block device file
7 fifos
4994 links
26959 symbolic links (23910 fast symbolic links)
6 sockets
------------
532046 files
e2fsck 1.46.5 (30-Dec-2021)
shrink filesystem  00:10:53    ( ERROR )
        
resize2fs -p '/dev/sdd3' 112640000K  00:10:53    ( ERROR )
        
Resizing the filesystem on /dev/sdd3 to 28160000 (4k) blocks.
Begin pass 2 (max = 10272100)
Relocating blocks XXXXXXXX--------------------------------
resize2fs 1.46.5 (30-Dec-2021)
resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev/sdd3
Please run 'e2fsck -fy /dev/sdd3' to fix the filesystem
after the aborted resize operation.

答案1

解决方案很简单:

不要缩小分区并复制它。

相反,在目标 SSD 上创建一个新分区,然后复制旧分区中的文件。您没有理由不这样做——而且更容易、更安全。

相关内容