0

I'm having some difficulty using a second hard drive. I want to mount a second hard drive, via sata, to directory /media/data. The problem is when I have my second hard drive attached the cli says that /dev/sdb1 is being booted and only shows what is on the first hard drive.

Boot order is correct, but once everything loads sdb1 is the only hard drive accessible. But it shows data from the first hard drive only regardless of name (sda sdb etc) and mounting sdb1 just mounts the original hard drive not the second one. I need to be able to swap out the second hard drive with others so I can't really rely on the UUID at least not that I know of.

How can I mount the second hard drive as /dev/sdb1 to a directory /media/data so I can read/write to it when needed?

I'm new to changing these settings and I can't find a single thread or question covering my issue so any help, links, etc are appreciated.

  • I have, sometimes, the same problem: an external USB disk that is detected as /dev/sda instead /dev/sdd for example. Since the /etc/fstab mounts the disks using the UUID it isn't a problem. – luisdarui Feb 20 '18 at 21:59
  • I'm connecting a hdd and SSD through SATA but no matter which one it says sda/sdb I only get the SSD – recursivePython Feb 20 '18 at 22:01
  • Ok, I think it is far more complicated than I understood at first. When you add another disk (SSD) but you only get the SSD but not the hdd. maybe check the following questions: https://askubuntu.com/questions/321862/grub2-points-to-the-wrong-harddisk-after-installing-one-more-harddisk and https://askubuntu.com/questions/371049/how-are-dev-sda-and-dev-sdb-chosen – luisdarui Feb 20 '18 at 22:08
  • When connecting drives to SATA ports on motherboard, order becomes important. You want first drive in SATA0 which then should be sda, and second drive in SATA1 which should be sdb. But UEFI/BIOS can see a drive in whatever order it comes up to speed so a SSD my mount first. Post this: sudo blkid -c /dev/null -o list and this: lsblk -o NAME,LABEL,PARTLABEL,SIZE,UUID,MOUNTPOINT – oldfred Feb 20 '18 at 22:37
  • You can still use UUID (blkdid) with all your drives, just put each in fstab, all mounting to /media/data ! As long as you don't connect more than one of your extra drives, this isn't an issue - even then Ubuntu will only mount the first time to /media/data – Robert Riedl Feb 21 '18 at 06:47
  • @ Robert Riedl how would that apply to constantly changing the drives? Wouldn't I have to enter a new UUID for each one? That's what I am trying to avoid. – recursivePython Feb 21 '18 at 14:05

0 Answers0