2

Folks, I am looking for the easiest way to transfer my OS, without reinstalling everything from one machine to another. Ubuntu is running on a Asus PC with a 500G hard drive and I want it to run on a Intel Nuc with a 60G SSD.

I have an external usb drive for my data.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           386M   40M  346M  11% /run
/dev/sda2       454G  6.9G  425G   2% /
tmpfs           1.9G   20K  1.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdb1       7.3T  3.1T  3.9T  45% /media/data
/dev/sda1       511M  3.4M  508M   1% /boot/efi
tmpfs           386M     0  386M   0% /run/user/1000

I am a newbie at this, so the easiest the better. I have accessed to the hardwares and it is not critical to have my server running all the time...

Thanks for your help.

Edwin
  • 129
  • 2
  • 13

1 Answers1

1

If you don't want to use a tool like clonezilla, then what you can do is:

  • take a live or rescue disk or USB stick
  • boot from that
  • partition the disk of your new computer (maybe take a hint from the partition setup on your old computer)
  • either attach your old disk to your new computer or vice versa or connect both computers on a network
  • then copy the contents of the filesystems on the old computer to the new one - see here: https://superuser.com/questions/307541/copy-entire-file-system-hierarchy-from-one-drive-to-another
  • once the content is copied make the system bootable
  • make sure /etc/fstab is correct (i.e. either contains the correct blockdevice UUIDs or contains /dev/sdaX style block device identifiers)
  • Ok, I finally got to the point I need to make the system bootable. How do I do that??? – Edwin Dec 01 '17 at 11:23
  • have a look at this: https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/ – Tomáš Pospíšek Dec 01 '17 at 20:17
  • I manage to "repair the grub2" but with errors. First, in Gparted, it says “physical block size is 2048 bytes, but Linux says it is 512". Do I have to ignore this? And then, the sda1 filesystem is BOOT BIOS when my original machine has EFI. Does this matter? – Edwin Dec 11 '17 at 11:42
  • Did you google or search "ask Ubuntu" for “physical block size is 2048 bytes, but Linux says it is 512"? In short: if you still have your original data on your old computer and you do *not* have data you want to keep on your new computer, then redo the disk partitioning so that physical block size and what linux thinks match. See this:https://askubuntu.com/questions/781223/physical-block-size-is-2048-bytes-but-linux-says-it-is-512-when-formatting-us. Warning: *repartitioning will render all data inaccessible*! – Tomáš Pospíšek Dec 11 '17 at 18:39