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

Re: adding a second HDD in debian



On Sat, 21 Nov 2020 18:31:53 -0400
Antonio Barragan <ajbg96r@gmail.com> wrote:

> Hi
> 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.
> How could that be done?
> Any clue will be greatly appreciated
> 

Just connect it and boot up. The system will find the drive and
partitions by itself, and various utilities will be able to see them,
but they will not get mounted automatically. If you want the partitions
to be mounted at future boots, you need to add entries to the
/etc/fstab file. It is also possible to automount them when you try to
read them rather than at boot time, but you still need fstab entries.
You can also mount partitions from the command line when required, but
this gets tedious quite quickly.

You need to create a mount point in the filesystem, which is simply an
empty directory somewhere, positioned and named according to what the
data is and who will use it. If it's just you, you might create a
directory in your home directory named 'HDD2' and inside it, an
appropriately-named directory for each partition on the new drive. Or
you could just create the mount points directly within your home if it
makes sense to do so.

Then you need /etc/fstab entries for each partition, linking the device
name of the partition with the mount point, as well as the filesystem
type, who will use it, default permissions on new files and a few other
things. Look at the existing entries in the file, and also open a
terminal and look at man fstab for exact details.

It's a bit of fiddling around to organise the mounting of your new
partitions, but there's no formatting or partition editing needed. Only
a new blank drive would need that.

-- 
Joe


Reply to: