将我安装的 ubuntu 从一个磁盘移动到另一个磁盘的最佳方法是什么

将我安装的 ubuntu 从一个磁盘移动到另一个磁盘的最佳方法是什么

我想将整个 Linux/Ubuntu 安装从 1TB HDD 移至 256GB SSD。1TB 驱动器上几乎没有任何东西,因此我相信 SSD 驱动器上可以容纳所有内容。我想将其设为启动驱动器,并使用 1TB 驱动器进行数据存储,例如我的个人家庭驱动器。最终,我想为我的几个 1TB 驱动器添加 RAID,但那是另一回事。

有什么建议可以开始迁移操作系统吗?我仍处于学习阶段。

这是 fdisk -l 的结果

joe@joeslinux:~$ sudo fdisk -l
[sudo] password for joe: 
Disk /dev/loop0: 1.6 MiB, 1654784 bytes, 3232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 81.7 MiB, 85639168 bytes, 167264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 81.6 MiB, 85549056 bytes, 167088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 1.6 MiB, 1658880 bytes, 3240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 94.9 MiB, 99446784 bytes, 194232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 81.7 MiB, 85692416 bytes, 167368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C866B86E-2F90-4F99-9D6A-B56901D6D4AC


Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xee260f95

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sda1  *       2048     999423     997376  487M 83 Linux
/dev/sda2       1001470 1953523711 1952522242  931G  5 Extended
/dev/sda5       1001472 1953523711 1952522240  931G 8e Linux LVM

Partition 2 does not start on physical sector boundary.


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x76221e63


Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000680a0

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1        2048 1953525167 1953523120 931.5G 83 Linux


Disk /dev/mapper/ubuntu--vg-root: 867.2 GiB, 931097739264 bytes, 1818550272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/ubuntu--vg-swap_1: 63.9 GiB, 68589453312 bytes, 133963776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

答案1

  1. 使用备份程序备份您想要移动的操作系统。
  2. 在新硬盘上安装 Ubuntu。
  3. 在新驱动器上运行的 Ubuntu 操作系统上恢复备份。

希望有所帮助。

相关内容