2

I'm running dual boot Windows 10 and Ubuntu. I have several disks including a WD SSD which I only for Windows (NTFS) and don't need to mount it in Ubuntu.

However, since installing this new disk, every time I boot Ubuntu it spends several minutes checking the disk before finally giving me the Gnome/Ubuntu log in screen. I'd like to continue check the other disks, but skip this one, as it's Windows' responsibility.

I have tried removing/commenting it from fstab, but that doesn't make any difference. Is there a way to automatically skip, rather than having to press Ctrl+C every time?

This is what my fstab currently looks like:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=d4ae91d8-28db-476f-95f6-27d6cabbb816 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda5 during installation
#UUID=edb1d7c4-7f64-494b-970a-30e19e551a99 /boot           ext4    defaults        0       2
# /raptor was on /dev/sdb2 during installation
UUID=7583d83a-c588-474b-8523-3d501d2e8413 /raptor         ext4    defaults        0       2
# /win_C was on /dev/sda1 during installation
UUID=6E4EABC64EAB8605 /win_C          ntfs    defaults,umask=007,gid=46 0       0
# /win_d was on /dev/sdb1 during installation
UUID=EA9CDD939CDD5AA1 /win_d          ntfs    defaults,umask=007,gid=46 0       0
# /win_e was on /dev/sdc1 during installation
UUID=7A4E15745CE2076E /win_e          ntfs    defaults,umask=007,gid=46 0       0
# /win_f was on /dev/sdd1 during installation
UUID=A8DC8E26DC8DEF3E /win_f          ntfs    defaults,umask=007,gid=46 0       0
# swap was on /dev/sdb3 during installation
UUID=674fa812-da28-43c1-b9de-d805551f88a6 none            swap    sw              0       0
# Manually added WD SSD 500GB (mostly used for windows)
UUID=7C5E67055E66B792 none   ntfs defaults,noauto 0  0

# Keep /tmp in RAM (faster and less SSD wear)
# http://www.howtogeek.com/62761/how-to-tweak-your-ssd-in-ubuntu-for-better-performance/
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
# NAS on zotac
192.168.50.186:/nas/shared /zotac-shared nfs rsize=8192,wsize=8192,timeo=14,intr,nfsvers=3

UUID=edb1d7c4-7f64-494b-970a-30e19e551a99  /boot       ext4    defaults      0       2
James Bradbury
  • 325
  • 1
  • 6
  • 20

2 Answers2

1

The simplest solution would be to use the noauto flag in your /etc/fstab file. This will prevent the OS from mounting a given partition completely.

For example:

/dev/sda3    none    ntfs-3g    defaults,noauto    0    0

or:

UUID=b72e8406-34e8-4e38-a422-e4ab6e35e6b8 none    ntfs-3g    defaults,noauto    0    0

If you choose to do this by UUID, you can list the values for each mount point in your system with sudo blkid, which will return something like:

/dev/nvme0n1p3: UUID="b72e8406-34e8-4e38-a422-e4ab6e35e6b8" TYPE="swap" PARTUUID="4b9f203e-de2c-4cc0-a9a6-2ac423b1b0e9"
/dev/nvme0n1p2: UUID="b33696cc-f2db-4dd4-9a63-15028cf5afc4" TYPE="ext4" PARTUUID="cd2a90a1-5a6b-4468-a4da-0a2f7c2a8f54"
/dev/nvme0n1p1: UUID="D3F2-9195" TYPE="vfat" PARTUUID="4e505bb1-c12b-4c71-afdf-42ac9a2f721b"
/dev/mmcblk0p1: UUID="dd5dffcf-9e3b-43eb-82a2-36137fc249be" TYPE="crypto_LUKS" PARTUUID="7688e21d-c1d3-4f02-95ac-5e816e2c1e05"

Note: I've removed all the squashfs records from the list just to keep it clean.

This should give you a faster boot time while also ensuring the Windows-only partitions are not visible in the Ubuntu UI.

  • Thanks, this looks like it should work but, for me at least, it doesn't. Is there a log or something I can look at to see what is going on? – James Bradbury Feb 26 '21 at 15:41
  • The information in `/var/log/syslog` should let you know if something's not quite right. –  Feb 26 '21 at 15:53
0

Comment the line with the disk that you wanted to skip in /etc/fstab using

sudo nano /etc/fstab

Then find the line that you want to comment and put an asterisk(*) at the beginning.

Logan
  • 472
  • 3
  • 22
  • According to this, comment lines start with a hash character (#). https://www.man7.org/linux/man-pages/man5/fstab.5.html – James Bradbury Mar 05 '21 at 14:32
  • The hash (#) character signifies root access. When you access root with sudo su, there is a hash at the beginning of every line. However, when copying and pasting, it would not work with the hash pasted, as it would fail as an error (because the hash already exists) – Logan Apr 12 '21 at 18:48
  • Jeff we're talking about inside an fstab file, which the link above explains. I think the hash (#) you're talking about signifies root access at the command line. – James Bradbury Apr 13 '21 at 18:08
  • 1
    Ha, sorry, my bad. I thought the comment said command lines. – Logan Apr 14 '21 at 18:24