Hive OS将U盘上的系统 写入 到SSD或者HDD 硬盘的方法

首先用fdisk -l查看各磁盘对应的设备名称
返回结果大概就像下面这样

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 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: dos
   Disk identifier: 0x244b7fbe

   Device     Boot     Start       End   Sectors  Size Id Type
   /dev/sda1            2048     43007     40960   20M  e W95 FAT16 (LBA)
   /dev/sda2           43008 188786687 188743680   90G 83 Linux
   /dev/sda3       188786688 234441647  45654960 21.8G 82 Linux swap / Solaris


   Disk /dev/sdb: 14.4 GiB, 15489564672 bytes, 30253056 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: dos
   Disk identifier: 0x244b7fbe

   Device     Boot Start      End  Sectors Size Id Type
   /dev/sdb1        2048    43007    40960  20M  e W95 FAT16 (LBA)
   /dev/sdb2  *    43008 14690303 14647296   7G 83 Linux

说明 sda是 SSD固态硬盘, sdb是我们的 U盘(这里要注意,你得仔细观察设备名字,有可能和这个顺序不一样)

然后执行命令

dd if=/dev/sdb of=/dev/sda bs=10M count=800 status=progress

“if=”后面跟的是 源盘, “of=” 后面跟的是目标盘

特别说明:反向操作也是可以的,比如你想把ssd上的系统 克隆到 U盘上,那么交换一下if of设备的位置即可
类似

dd if=/dev/sda of=/dev/sdb bs=10M count=800 status=progress

最后等待它执行完成就OK

然后 关机 拔U盘, 重新开机

参考资料
https://hiveos.farm/guides-hdd_move/



发表评论

您的电子邮箱地址不会被公开。

9 + 1 =