我有一台运行 Ubuntu 22.04.1 LTS 的机器,并收到以下错误。我做了一些挖掘,在此过程中,UUID 似乎自行更新。每个分区的 UUID 都是唯一的。提前致谢!
该机器有2个硬盘-这是分区图:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 4K 1 loop /snap/bare/5
loop1 7:1 0 9M 1 loop /snap/canonical-livepatch/146
loop2 7:2 0 9M 1 loop /snap/canonical-livepatch/164
loop3 7:3 0 116.7M 1 loop /snap/core/14399
loop4 7:4 0 63.2M 1 loop /snap/core20/1623
loop5 7:5 0 63.2M 1 loop /snap/core20/1738
loop6 7:6 0 237.5M 1 loop /snap/firefox/2154
loop7 7:7 0 238.9M 1 loop /snap/firefox/2186
loop8 7:8 0 346.3M 1 loop /snap/gnome-3-38-2004/115
loop9 7:9 0 346.3M 1 loop /snap/gnome-3-38-2004/119
loop10 7:10 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop11 7:11 0 49.6M 1 loop /snap/snapd/17883
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 46.6G 0 part /var/snap/firefox/common/host-hunspell
│ /
├─sda2 8:2 0 29.8G 0 part
├─sda3 8:3 0 29.8G 0 part /tmp
├─sda4 8:4 0 55.9G 0 part /var
└─sda5 8:5 0 61.5G 0 part /home
mmcblk0 179:0 0 7.3G 0 disk
├─mmcblk0p1 179:1 0 953M 0 part /boot/efi
├─mmcblk0p2 179:2 0 953.7M 0 part /boot
└─mmcblk0p3 179:3 0 5.4G 0 part /BACKUP
mmcblk0boot0 179:8 0 4M 1 disk
mmcblk0boot1 179:16 0 4M 1 disk
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=214D-F8FD /boot/efi vfat umask=0077 0 2
UUID=93c3d235-47b3-482c-aa36-3aabbb2a8fbe /boot ext4 defaults,discard 0 2
UUID=97c7ace2-37a8-40aa-9771-fdf9cb2f6e54 /BACKUP ext4 defaults,discard 0 2
UUID=defbea08-edb4-4474-926b-17812c8d5939 / ext4 defaults,discard 0 1
UUID=05a809ef-edd1-425a-a5b4-84621973e76e /var ext4 defaults,discard 0 2
UUID=7b57c124-3528-4889-909b-d2ff6a8d9e66 /home ext4 defaults,discard 0 2
UUID=c67c46d0-6ad8-4153-9e93-fbc68208df48 /tmp ext4 defaults,discard 0 2
/swapfile swap swap defaults 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
来自 /var/log/syslog 的错误:
kernel: [ 698.762590] systemd-fstab-generator[3740]: Failed to create unit file /run/systemd/generator/tmp.mount, as it already exists. Duplicate entry in /etc/fstab?
systemd[3729]: /usr/lib/systemd/system-generators/systemd-fstab-generator failed with exit status 1.
答案1
您的系统可能已启用 systemd tmp.mount
。检查以下命令:
systemctl status tmp.mount
如果是这样,您不需要/tmp
在您的中安装/etc/fstab
,因为systemd-fstab-generator
将生成条目。