启动时未安装安全分区上的交换

启动时未安装安全分区上的交换

我有一台工作笔记本电脑 Lenovo P51。安全分区上有 Win10。我也在安全分区上安装了 Ubuntu 18.04。另外,我已经创建了一个用于交换的安全分区,但它没有安装。启动时间大约2分钟,这很烦人

这是须藤块输出并且没有用于交换的安全分区(我认为它应该看起来像/dev/mapper/nvme0n1p6

$ sudo blkid                                       
/dev/mapper/nvme0n1p7_crypt: UUID="94fe7730-b54e-43a6-be1c-ec4c1fcec084" TYPE="ext4"
/dev/nvme0n1p1: LABEL="BOOT" UUID="56A4-3F33" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="b2acdb69-298e-4720-8368-30a86df0d055"
/dev/nvme0n1p4: LABEL="DATA" UUID="160E3B620E3B3A57" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="e05129b9-f57e-48b3-8502-ad7129883615"
/dev/nvme0n1p5: UUID="95aa2c8c-2cd1-4fef-8dc3-c93a896e9f15" TYPE="ext4" PARTUUID="f12911aa-86cc-4d9a-8117-39fd5a31bd8e"
/dev/nvme0n1p7: UUID="20adda12-da97-4c79-af97-cb69a7a4af00" TYPE="crypto_LUKS" PARTUUID="26e3155a-aee1-4185-82d2-a4d41d6cee6c"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/nvme0n1: PTUUID="71954aea-d40f-480d-ad82-e574d4960a4d" PTTYPE="gpt"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="db7c9553-7b2e-4b8d-acd4-b04a66af3bc2"
/dev/nvme0n1p3: PARTLABEL="Basic data partition" PARTUUID="cc57510d-4af0-4c72-9233-e2acf8b439d6"
/dev/nvme0n1p6: PARTUUID="00d5b8ac-276c-4662-acfc-16f9b3eaa098"

系统表内容:

$ sudo cat /etc/fstab
# /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=94fe7730-b54e-43a6-be1c-ec4c1fcec084 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/nvme0n1p5 during installation
UUID=95aa2c8c-2cd1-4fef-8dc3-c93a896e9f15 /boot           ext4    defaults        0       2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=56A4-3F33  /boot/efi       vfat    umask=0077      0       1
# /media/DATA was on /dev/nvme0n1p4 during installation
UUID=160E3B620E3B3A57 /media/DATA     ntfs    defaults,umask=007,gid=46 0       0
#/dev/mapper/nvme0n1p6_crypt none            swap    sw              0       0

UPD。取消注释最后一行系统表(但它没有解决任何问题)

$ sudo swapon -a              
swapon: cannot open /dev/mapper/nvme0n1p6_crypt: No such file or directory

发现这个在/var/log/系统日志

Aug 22 14:41:15 ThinkPad-P51 dockerd[1973]: time="2018-08-22T14:41:15.630102414+02:00" level=warning msg="Your kernel does not support swap memory limit"
Aug 22 14:42:38 ThinkPad-P51 systemd[1]: dev-mapper-nvme0n1p6_crypt.swap: Job dev-mapper-nvme0n1p6_crypt.swap/start failed with result 'dependency'.

UPD2。lsblk-f输出:

NAME                FSTYPE      LABEL UUID                                 MOUNTPOINT
loop0               squashfs                                               /snap/gnome-calculator/199
loop1               squashfs                                               /snap/canonical-livepatch/41
loop2               squashfs                                               /snap/gnome-system-monitor/51
loop3               squashfs                                               /snap/gimp/40
loop4               squashfs                                               /snap/gnome-logs/37
loop5               squashfs                                               /snap/gnome-system-monitor/36
loop6               squashfs                                               /snap/gnome-3-26-1604/59
loop7               squashfs                                               /snap/gtk-common-themes/319
loop8               squashfs                                               /snap/canonical-livepatch/42
loop9               squashfs                                               /snap/gnome-logs/25
loop10              squashfs                                               /snap/gnome-logs/40
loop11              squashfs                                               /snap/gnome-characters/103
loop12              squashfs                                               /snap/gnome-calculator/180
loop13              squashfs                                               /snap/gnome-characters/117
loop14              squashfs                                               /snap/core/4486
loop15              squashfs                                               /snap/gnome-system-monitor/54
loop16              squashfs                                               /snap/gnome-characters/69
loop17              squashfs                                               /snap/gnome-calculator/154
loop18              squashfs                                               /snap/core/5145
loop19              squashfs                                               /snap/gnome-3-26-1604/70
nvme0n1                                                                    
├─nvme0n1p1         vfat        BOOT  56A4-3F33                            /boot/efi
├─nvme0n1p2                                                                
├─nvme0n1p3                                                                
├─nvme0n1p4         ntfs        DATA  160E3B620E3B3A57                     /media/DATA
├─nvme0n1p5         ext4              95aa2c8c-2cd1-4fef-8dc3-c93a896e9f15 /boot
├─nvme0n1p6         swap              8c875a48-443f-4e04-9fd1-9a56b1da73cc [SWAP]
└─nvme0n1p7         crypto_LUKS       20adda12-da97-4c79-af97-cb69a7a4af00 
  └─nvme0n1p7_crypt ext4              94fe7730-b54e-43a6-be1c-ec4c1fcec084 /

UPD3。系统分析责备输出:

6.228s NetworkManager-wait-online.service
3.782s apt-daily.service
3.459s plymouth-quit-wait.service
1.751s apt-daily-upgrade.service
1.343s docker.service
 847ms bolt.service
 770ms fwupd.service
 622ms snapd.service
 506ms systemd-logind.service
 496ms dev-mapper-nvme0n1p7_crypt.device
 471ms nvidia-fallback.service
 428ms snap-core-5145.mount
 427ms snap-gnome\x2d3\x2d26\x2d1604-70.mount
 407ms snap-gnome\x2dcalculator-154.mount
 399ms snap-gnome\x2dsystem\x2dmonitor-54.mount
 398ms snap-gnome\x2dcharacters-69.mount
 384ms snap-gnome\x2dcharacters-117.mount
 379ms snap-core-4486.mount
 355ms snapd.seeded.service
 264ms snap-gnome\x2dcalculator-180.mount
 246ms snap-gnome\x2dcharacters-103.mount
 244ms dev-loop0.device
 231ms dev-loop3.device
 227ms dev-loop2.device
 218ms dev-loop1.device
 205ms dev-loop6.device
 204ms NetworkManager.service
 200ms dev-loop4.device
 189ms dev-loop8.device
 183ms dev-loop5.device
 181ms dev-loop9.device
 171ms dev-loop10.device
 160ms snap-gnome\x2dlogs-40.mount
 156ms dev-loop7.device
 146ms systemd-timesyncd.service
 133ms snap-canonical\x2dlivepatch-42.mount
 132ms snap-gnome\x2dlogs-25.mount
 129ms networkd-dispatcher.service
 124ms systemd-resolved.service
 116ms udisks2.service
 110ms upower.service
 110ms snap-gtk\x2dcommon\x2dthemes-319.mount
 102ms systemd-journal-flush.service
  99ms systemd-udev-trigger.service
  94ms ModemManager.service
  80ms snap-gnome\x2dsystem\x2dmonitor-36.mount
  80ms dev-loop11.device
  78ms snap-gnome\x2dlogs-37.mount
  76ms snap-gnome\x2d3\x2d26\x2d1604-59.mount
  75ms accounts-daemon.service
  74ms dev-loop12.device
  72ms apparmor.service
  71ms keyboard-setup.service
  70ms apport.service
  66ms snap-gnome\x2dsystem\x2dmonitor-51.mount
  58ms snap-gimp-40.mount
  56ms snap-canonical\x2dlivepatch-41.mount
  47ms systemd-journald.service
  46ms thermald.service
  45ms speech-dispatcher.service
  45ms [email protected]
  44ms [email protected]
  42ms packagekit.service
  42ms systemd-rfkill.service
  38ms alsa-restore.service
  37ms gpu-manager.service
  36ms avahi-daemon.service
  35ms grub-common.service
  35ms systemd-fsck@dev-disk-by\x2duuid-56A4\x2d3F33.service
  32ms systemd-udevd.service
  29ms snap-gnome\x2dcalculator-199.mount
  25ms rsyslog.service
  24ms wpa_supplicant.service
  23ms systemd-fsck@dev-disk-by\x2duuid-95aa2c8c\x2d2cd1\x2d4fef\x2d8dc3\x2dc93a896e9f15.service
  22ms pppd-dns.service
  22ms bluetooth.service
  21ms networking.service
  19ms media-DATA.mount
  16ms ureadahead-stop.service
  16ms gdm.service
  16ms systemd-modules-load.service
  14ms colord.service
  14ms plymouth-start.service
  13ms plymouth-read-write.service
  13ms systemd-tmpfiles-clean.service
  12ms dns-clean.service
  12ms polkit.service
  12ms systemd-tmpfiles-setup-dev.service
  11ms systemd-tmpfiles-setup.service
  10ms kmod-static-nodes.service
   9ms systemd-remount-fs.service
   9ms dev-hugepages.mount
   8ms docker.socket
   8ms kerneloops.service
   7ms boot.mount
   7ms sys-kernel-debug.mount
   7ms systemd-sysctl.service
   6ms systemd-update-utmp-runlevel.service
   6ms dev-mqueue.mount
   6ms dev-loop13.device
   6ms dev-disk-by\x2duuid-8c875a48\x2d443f\x2d4e04\x2d9fd1\x2d9a56b1da73cc.swap
   6ms boot-efi.mount
   5ms ufw.service
   5ms systemd-update-utmp.service
   5ms dev-loop15.device
   4ms systemd-cryptsetup@nvme0n1p7_crypt.service
   4ms systemd-user-sessions.service
   4ms systemd-backlight@backlight:intel_backlight.service
   4ms console-setup.service
   4ms dev-loop18.device
   4ms systemd-backlight@leds:tpacpi::kbd_backlight.service
   3ms dev-loop19.device
   3ms systemd-random-seed.service
   3ms dev-loop16.device
   3ms dev-loop17.device
   3ms sys-kernel-config.mount
   2ms dev-loop14.device
   2ms rtkit-daemon.service
   2ms sys-fs-fuse-connections.mount
   2ms setvtrgb.service
   1ms snapd.socket

答案1

启动时未安装安全分区上的交换

但是......交换分区在您的注释中/etc/fstab

#/dev/mapper/nvme0n1p6_crypt none            swap    sw              0       0

以 开头的行#不会被读取。

相关内容