0

I've done lots of research and I found that /dev/sda cannot be unmounted on Ubuntu; however, I have Ubuntu and Windows on separate drives. Ubuntu is on an SSD (/dev/nvme0n1) and Windows is on and HDD (/dev/sda).

Here is the output from lsblk:

sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0    16M  0 part 
└─sda2        8:2    0 931.5G  0 part 
nvme0n1     259:0    0 465.8G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part 
└─nvme0n1p2 259:2    0 465.3G  0 part /

I cannot find /dev/sda in the output from the mount command because /dev/sda doesn't seem to be mounted.

When I run sudo fdisk -l /dev/sda, this is the output:

Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ04ABF1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 94F88F12-C169-4D88-9FD1-19C9781D8130

Device Start End Sectors Size Type /dev/sda1 2048 34815 32768 16M Microsoft reserved /dev/sda2 34816 1953523711 1953488896 931.5G Microsoft basic data

Is there a way to unmount or remove (or at least stop the HDD from running when I'm on Ubuntu)?

P.S. as per HappyTux's recommendation, I tried sudo hdparm -S 6 /dev/sda (to set the spindown time to 30 seconds), but the HDD is never idle; so it's constantly running.

  • Interesting. What did you try? Why does umount not work? And: where did you install grub? – kanehekili Feb 20 '21 at 20:35
  • /dev/sda is not a partition, it's the name of the disk device. What does sudo fdisk -l /dev/sda show (please add to your question)? – ajgringo619 Feb 20 '21 at 20:38
  • And there's the second problem here that if this disk was created by Windows, both code Linux and Windows doesn't mix together. And there were a lots of discussions about this topic. Since my vast experience on this, I'll assume it was created by Windows. – Satoshi Nakamoto Feb 20 '21 at 21:55
  • @kanehekili the output for umount /dev/sda' is:umount: /dev/sda: not mounted.` I didn't install grub. I had Ubuntu installed on the SSD, then I installed Windows on the HDD. – thetipsyhacker Feb 20 '21 at 22:04
  • @ajgringo619 I've updated my question with your recommendation – thetipsyhacker Feb 20 '21 at 22:06
  • Since you did not install grub on the Windows disk, then the answer provided by @HappyTux should be sufficient. Since none of the /dev/sda partitions are mounted, there's nothing to do there. – ajgringo619 Feb 20 '21 at 22:11
  • @Tyþë-Ø I first had Ubuntu on the SSD, but then I installed Windows on the HDD. The BIOS indicates that Windows has installed a boot partition on the SSD (which is why I have to go into the BIOS and select Ubuntu every time I restart my computer; because Windows is the default boot partition) and had everything else on the HDD. – thetipsyhacker Feb 20 '21 at 22:12
  • @ajgringo619 I've updated my question with the my attempted hdparm usage (to power down the HDD). The drive never seems to be idle. – thetipsyhacker Feb 20 '21 at 22:35
  • It is strange, when Windows installed boot config on SSD, and it didn't affected Ubuntu? I'm even assuming you're using UEFI. However your problem that Windows starting first can be solved by installing GRUB again in Ubuntu and overwriting Windows whatever BOOT previous configuration – Satoshi Nakamoto Feb 20 '21 at 22:43
  • By the way I believe it's not possible to shut off your HDD since the motherboard will always do the job of connecting it – Satoshi Nakamoto Feb 20 '21 at 22:47

1 Answers1

1

When a drive is not spinning down, like I think you describe you want, then use the hdparm it has option to set the time it takes for it to go to sleep.

How can I control HDD spin down time?

  • Thank you. I tried setting the spindown time to 30 seconds for the HDD, but it seems that the HDD is never idle. Very weird... :-( – thetipsyhacker Feb 20 '21 at 22:30
  • Must not support that flag then, really weird all modern drives should spin down. In fact most question are how to stop it from happening, with a data drive for instance. –  Feb 20 '21 at 23:37