当我重新排列 SSD 上的分区时,我愚蠢地删除了交换分区,并在另一个地方创建了一个新分区,而不是复制它并删除原始分区。现在我的 Ubuntu 可能再也找不到我的交换分区了,因为它总是需要超过 1 分钟才能启动。我尝试让 Ubuntu 使用 gparted 中的分区,但这没有帮助,因为当我关闭计算机时它总是被关闭。
输出sudo blkid
:
/dev/nvme0n1p6: UUID="141bd540-84cc-4fcc-bf9b-914db6dc8ee9" TYPE="ext4" PARTUUID="9eece7db-bee3-42b4-b254-469b16d231a0"
/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/nvme0n1p1: LABEL="Wiederherstellung" UUID="4AA28F48A28F3809" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="ca8f0733-127c-4cb4-a644-7264d92a8437"
/dev/nvme0n1p2: UUID="328F-907C" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="f04a933c-365a-4deb-819c-ab384f38f791"
/dev/nvme0n1p4: LABEL="Windows" UUID="151C597062F22D20" TYPE="ntfs" PTTYPE="dos" PARTUUID="a0d6cfcb-85c0-4d52-8f2c-bae46aa4d4bd"
/dev/nvme0n1p5: TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="7eddf910-b128-01d6-88e0-2e3f9458eb00"
/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/loop16: TYPE="squashfs"
/dev/loop17: TYPE="squashfs"
/dev/loop18: TYPE="squashfs"
/dev/loop19: TYPE="squashfs"
/dev/loop20: TYPE="squashfs"
/dev/nvme0n1p3: PARTLABEL="Microsoft reserved partition" PARTUUID="8e7e7e06-1f83-422d-beb4-b34778e24bc2"
输出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>
# / was on /dev/nvme0n1p6 during installation
UUID=141bd540-84cc-4fcc-bf9b-914db6dc8ee9 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=328F-907C /boot/efi vfat umask=0077 0 1
# swap was on /dev/nvme0n1p5 during installation
UUID=3297fa29-51d3-4be0-9701-9eafdaa1bb26 none swap sw 0 0
/dev/disk/by-uuid/e6188b5c-99c6-4c49-9403-5203338981b4 / ext4 errors=remount-ro 0 0
答案1
跑步
sudo nano /etc/fstab
并替换
UUID=3297fa29-51d3-4be0-9701-9eafdaa1bb26 none swap sw 0 0
和
/dev/nvme0n1p5 none swap sw 0 0