0

I have an existing linux box, running Mint 15, using a single hard drive.

I'd like to install a new drive (an SSD FWIW), on which I would install up-to-date Mint.

I would like the old drive to remain attached (or to reattach it after the new install). I'm not particularly interested in moving settings from the old drive.

I want the old drive attached as it contains a lot of useful data. (Important data is backed up, but it would be nice just to have the data available in more or less the original file layout).

What's involved in accomplishing this? My main concern is where in the directory hierarchy the old drive's directories will appear, and that they don't collide with the same-named directories on the new drive. Indeed, it's fine if the system-related directories on the old HD were deleted... but obviously I can't do that before installing the new drive and OS.

Thanks!

  • Graham
1

No problem. That's a common scenario.

I recommend plugging your new HD into the first connector on your board, and unplugging your old drive during installation, but it's not critical.

After you get the new system installed (make sure you do it on the new drive! (-: ), plug in your old drive, boot to the new system, drop into a shell and type

sudo gparted -l

which will list all known hard drives, the manufacturer/model, the size and their respective partitions. You should be able to decipher which is your old drive. Look at the partitions and sizes of the drive. The disk itself has a name such as /dev/sdb and the partitions are numbered starting at 1. So the first partion on the drive will have a name such as /dev/sdb1 (partition number 1). Choose which one you want to mount, it will probably be /dev/sdb1 but could be anything, so look at the output of sudo gparted -l.

Choose where you want to mount it (usually under /mnt), make the directory, for example

sudo mkdir /mnt/old

and mount it

sudo mount /dev/sdx1 /mnt/old

where /dev/sdx1 is the partition you identified from parted -l.

Check it out, ls /mnt/old etc. and then add a line to /etc/fstab so that it always mounts when you boot. After that everything on your old drive will be available under /mnt/old or wherever you put it.

I'd like to mention that this is a great time to experiment with other distros. For example, you could plug in the new drive, and from your existing installation, you can partition the drive, make filesystems, and run debinstall to bootstrap a new Debian system without any installation media. You will probably have an extra 10 to 50 MB to put some other distros to experiment with. Nothing wrong with mint, but it's somewhat limiting on installation options.

Good luck to you and come back if you have any more questions.

| improve this answer | |
  • Thanks for your encouraging answer, but... at the point where I (re)plug in my old drive, and boot from the new drive, how will my old drive appear to the system? Will it simply not mount until I perform the mount procedure you outline? – gwideman Nov 8 '15 at 7:54
  • Exactly. That's why you run sudo parted -l to see the list of all drives and partitions. You'll also see the size and model (manufacturer) for each drive. Until you tell the Unix/Linux system you're running to do something with it, it's just another device out there that was recognized at boot. Seriously, plug that new drive in and play with it from your existing installation. Nothing to lose at this point and a lot of knowledge to gain. In the end you're going to wipe everything and set it up the way you want it anyway. – RobertL Nov 8 '15 at 8:26
  • I've edited my answer to give more info pertaining to your comment. – RobertL Nov 8 '15 at 8:41
  • This went relatively smoothly. As it happens, gparted is not installed by default on linux mint. More or less the same info from the Preferences > Disks GUI program. That might tempt using that tool to mount the old partition (works fine) and set the fstab entry (not so fine). Rebooting then ran into an error, remedied by removing the tool-inserted entry from fstab because for some reason it's incorrect. Instead I hand edited fstab and that worked OK on subsequent reboots. – gwideman Nov 14 '15 at 10:36
  • Congratulations! Thanks for the feedback, it really helps me. – RobertL Nov 14 '15 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.