This howto tells you how to install a hard drive with existing data on it into a new computer. You could use a UI if you wanted, alternatively.
Find existing mount points
- See what we already have mounted.
reubenf@fridge:~$ df -k | grep /dev
/dev/sda1 14535584 3074640 10728384 23% /
udev 1815524 88 1815436 1% /dev
devshm 1815524 0 1815524 0% /dev/shm
/dev/sda2 19380708 192860 18211096 2% /home
/dev/sda4 446745948 203020 424028236 1% /media1
/dev/sdb1 484535504 202800 459913504 1% /media2
Find all physical devices
- Now find the disk(s) that aren’t mounted. Note /dev/sdc1, below (which isn’t listed above).
reubenf@fridge:~$ ls /dev/disk/by-uuid/ -alh
total 0
drwxr-xr-x 2 root root 160 2008-06-26 08:07 .
drwxr-xr-x 6 root root 120 2008-06-26 08:07 ..
lrwxrwxrwx 1 root root 10 2008-06-26 08:07 1d063f18-5d5b-4ab1-b93a-35af33706059 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2008-06-26 08:07 20c4feb1-90e2-42ec-88a3-7936950deeed -> ../../sda1
lrwxrwxrwx 1 root root 10 2008-06-26 08:07 756f4338-d991-47e6-807b-0962f9f01cad -> ../../sda3
lrwxrwxrwx 1 root root 10 2008-06-26 08:07 b9eeeeab-e30c-48bb-ae6f-9ece052db597 -> ../../sda4
lrwxrwxrwx 1 root root 10 2008-06-26 08:07 c8aec34b-a197-42fc-ae9d-481e0e20132f -> ../../sda2
lrwxrwxrwx 1 root root 10 2008-06-26 08:07 e19a4234-d7e3-45a7-b369-b6c1724ba0c6 -> ../../sdc1
Find file system type
reubenf@fridge:~$ sudo parted /dev/sdc1 p
Disk /dev/sdc1: 165GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00kB 165GB 165GB ext3
Make a mount point for the partition
reubenf@fridge:~$ sudo mkdir /media3
Add line to /etc/fstab
reubenf@fridge:~$ sudo vim /etc/fstab
...
# /dev/sdc1
UUID=e19a4234-d7e3-45a7-b369-b6c1724ba0c6 /media3 ext3 relatime 0 2
All done. Reboot.
Related Leave a Comment