[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advice sought re HDD --> SSD migration





On Fri, Jun 10, 2016 at 7:14 PM Jonathan Dowland <jmtd@debian.org> wrote:
On Thu, Jun 09, 2016 at 02:13:58PM +0000, Mark Fletcher wrote:
> Apart from fixing that, what's left to do is to disconnect and remove the
> 500GB hard disk, move the SSD to the hard disk's SATA port so it is
> /dev/sda

Where do you depend upon it being /dev/sda? I'd strongly recommend using
filesystem labels (change an existing ext2,3,4 filesystem label with e2label,
other FS have similar tools) and UUIDs for identifying drives/partitions in
config files. In /etc/fstab, you can use LABEL=foo or UUID=xxxxx where you
would normally use a path to the device; elsewhere (e.g. systemd units) you can
use a path such as /dev/disk/by-label/foo or /dev/disk/by-uuid/xxxxx.


Don't recall suggesting I depend on it being /dev/sda. In fact right now it is /dev/sdc and everything seems to be working. UUIDs all the way here.

I just like to keep things neat and tidy -- two disks, the main one I boot from and a second with a big data space -- sda and sdb, makes sense to me. And I'm clearly not the only one who feels that way as one of the earliest replies on this thread made the same point.
 
Try to use non-ambiguous labels. If there's any chance of you mixing drives
from this machine and another

There isn't, but I can see in some people's cases there might be.
 
> modify grub.cfg to reflect the move and to remove the hard-disk
> boot menu items which grub-mkconfig, trying to be helpful, generated.

Unless you have customized your grub config, they should automatically disappear
after you've removed those drives and re-ran update-grub2. It should also be
working off UUIDs rather than device names like /dev/sda too, mind...

Um, not sure I understand that. To my thinking, I'll need to have updated grub.cfg _before_ shutting down to remove the hard disk, since after removing it I won't be able to boot since I'll have moved the SSD and it won't be on the SATA port the grub.cfg is expecting.... Oh hang on, your point is that it should be identified by UUID... Will need to check, maybe it is, that will be good -- but I think I remember seeing something like (hd2,msdos1) or something in the grub config generated by grub-mkconfig and that won't be true any more after I swap connectors on the SSD. So I was thinking I'd need to modify that, then shut down to physically remove the HDD and move the SSD, then bring it back up, and if I've messed up the grub config it will be time to boot from a live thumb drive to fix it...

> But I'm basically there apart from my question above about the permissions
> of /media.

mine is just

drwxr-xr-x 5 root root 4096 May  5 17:09 /media

Thanks to you, and to David Wright, for this info. Appreciate it. And it makes sense. I was worried about needing suid bits or some other magic, but seems not.

Thanks again for all the advice on this, list!

Mark

Reply to: