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

Re: adding a second HDD in debian



On Sat 21 Nov 2020 at 18:31:53 (-0400), Antonio Barragan wrote:
> I have a PC with Debian 10 installed (on dev/sda), and working properly.
> Now I would like to add to it a second, 150 GB HDD (SATA), taken from
> another machine.
> It is already partitioned with a combination of ntfs and ext4 partitions,
> and I would like to keep it that way, because I want the info stored in it.
> I have seen several posts in the web on this subject, but almost all
> talk about formating and
> repartitioning the second HDD, which I'd rather not do.

Make sure that your current /etc/fstab is using LABELs or UUIDs to
specify the mounts. This will make sure that when you add the second
drive, your computer still finds the correct partitions to boot etc.

Having added the second drive, just add more lines to /etc/fstab
according to what you want mounted, using LABELs or UUIDs again,
and mkdir the corresponding mount points.

I write lines like

LABEL=olaf04 /ya ext4 defaults,errors=remount-ro,nofail 0 2

so that things don't stall if you remove the disk again.
For ntfs, you might also want to set masks/ownerships etc,
and you can also add noauto if you want to only mount the
partitions manually.

Cheers,
David.


Reply to: