我已经安装Ubuntu 工作室,版本 22.04 LTS。我在同一个磁盘上还有一个 NTFS 分区,其中包含以前安装的 Windows 操作系统。Ubuntu Studio 似乎在每次计算机启动时都会自动安装 NTFS 分区(与普通 Ubuntu 不同)。
在哪里可以禁用每次计算机启动时自动安装 NTFS 分区的功能?
我期望自动挂载发生在/etc/fstab
,但它不存在(我用 替换了部分 UUID x
)。
cat /etc/fstab
:
UUID=664A-xxxx /boot/efi vfat umask=0077 0 2
UUID=6b1fe799-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext4 defaults,discard 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
UUID=6af10a10-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
自动挂载的分区是/dev/sda3
,它被挂载在 下。磁盘上/media/user/WIN10
还有另一个 NTFS 分区(500MB),但它有标志,并且不会自动挂载(仅供解释)。/dev/sda4
hidden,diag
我的blkid
输出:
/dev/sda1: LABEL_FATBOOT="EFIBOOT" LABEL="EFIBOOT" UUID="664A-xxxx" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="98cb88bd-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="c96cdcf0-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
/dev/sda3: LABEL="WIN10" BLOCK_SIZE="512" UUID="F60xxxxxxxxxxxxx" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="84569d75-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
/dev/sda4: BLOCK_SIZE="512" UUID="981xxxxxxxxxxxxx" TYPE="ntfs" PARTUUID="5c62d1c5-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
/dev/sda5: LABEL="UBUNTU" UUID="6b1fe799-xxxx-xxxx-xxxx-xxxxxxxxxxxx" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="7ed7d9b3-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
/dev/sda6: UUID="6af10a10-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="swap" PARTUUID="d74bac71-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
mount | grep sda
输出:
/dev/sda5 on / type ext4 (rw,relatime,discard)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda3 on /media/user/WIN10 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
dmesg | grep -i mount
:
[ 0.122566] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 0.122566] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 5.411235] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 5.755437] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 5.757201] systemd[1]: Mounting Huge Pages File System...
[ 5.757925] systemd[1]: Mounting POSIX Message Queue File System...
[ 5.758788] systemd[1]: Mounting Kernel Debug File System...
[ 5.759805] systemd[1]: Mounting Kernel Trace File System...
[ 5.773131] systemd[1]: Starting Remount Root and Kernel File Systems...
[ 5.779286] systemd[1]: Mounted Huge Pages File System.
[ 5.779562] systemd[1]: Mounted POSIX Message Queue File System.
[ 5.780677] systemd[1]: Mounted Kernel Debug File System.
[ 5.780872] systemd[1]: Mounted Kernel Trace File System.
[ 5.782590] EXT4-fs (sda5): re-mounted. Opts: discard. Quota mode: none.
[ 5.786367] systemd[1]: Finished Remount Root and Kernel File Systems.
[ 5.787998] systemd[1]: Mounting FUSE Control File System...
[ 5.789074] systemd[1]: Mounting Kernel Configuration File System...
[ 5.799944] systemd[1]: Mounted FUSE Control File System.
[ 5.800204] systemd[1]: Mounted Kernel Configuration File System.
dmesg | grep sda
:
[ 1.809792] sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[ 1.809809] sd 1:0:0:0: [sda] Write Protect is off
[ 1.809822] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 1.809884] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.818988] sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7
[ 1.830314] sd 1:0:0:0: [sda] supports TCG Opal
[ 1.830318] sd 1:0:0:0: [sda] Attached SCSI disk
[ 5.411235] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 5.782590] EXT4-fs (sda5): re-mounted. Opts: discard. Quota mode: none.
[ 6.872724] Adding 4002812k swap on /dev/sda6. Priority:-2 extents:1 across:4002812k SSFS
dmesg | grep -i ntfs
:
[ 62.029982] ntfs3: Max link count 4000
[ 62.029991] ntfs3: Enabled Linux POSIX ACLs support
[ 62.029992] ntfs3: Read-only LZX/Xpress compression included
[ 62.033266] ntfs3: Unknown parameter 'windows_names'
答案1
答案2
/etc/fstab
您可以使用选项添加分区noauto
。因此 fstab 条目应如下所示:
UUID=<UUID of Windows partition here> /media/user/WIN10 ntfs noauto
替换<UUID of Windows partition here>
为必要的值 - 您可以通过运行lsblk
来确定与 Windows 分区相对应的设备名称,然后运行blkid
以查找与该设备名称关联的 UUID。 (请注意,您想要 UUID,不是PART_UUID。