我需要将 UUID 更改为另一个 UUID

我需要将 UUID 更改为另一个 UUID

更新:

大家好,非常感谢你们的回答 - 我非常高兴收到你们的回复 - 查看完整故事:https://forum.manjaro.org/t/if-i-close-the-lid-the-notebook-does-not-shutdown/83103/3 - 我不知道如何应用这些更改!?

很高兴收到您的来信 - 谨致问候

完整故事在这里...查看全部我有一个特殊情况,我需要将 UUID 更改为另一个 UUID。我格式化了它,显然数字变了...我知道我需要更改这些文件。但我在网上找不到有关自定义 UUID 的任何地方的信息。

问题:合上盖子时 - 笔记本电脑无法关机 - 或者关机

我需要改变

UUID=ae33e597-0c72-4c66-9f16-6606322111c3 交换交换默认值,noatime 0 2

对此

UUID=ae33e597-0c72-4c66-9f16-6606322111c3 交换 交换默认值

如何实现?

顺便说一句:看看我迄今为止遇到的休眠问题

martin-pc martin]# 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=A790-35CD                            /boot/efi      vfat    defaults,noatime 0 2
UUID=1bf0c824-0645-47da-b8a1-88eaaabecc33 /              ext4    defaults,noatime 0 1
UUID=ae33e597-0c72-4c66-9f16-6606322111c3 swap           swap    defaults,noatime 0 2
[martin-pc martin]# cat /etc/default/grub
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=ae33e597-0c72-4c66-9f16-6606322111c3"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
[martin-pc martin]#

顺便提一句- 我遇到了一些问题 - 由于升级过程挂起而导致休眠(不幸的是被中断了=)

如果我们使用 ext:

tune2fs /dev/{device} -U {uuid}

来自 man tune2fs

-U UUID

将文件系统的通用唯一标识符 (UUID) 设置为 UUID。UUID 的格式是一系列用连字符分隔的十六进制数字,例如:c1b9d5a2-f162-11cf-9ece-0020afc76f16。UUID 参数也可能是以下之一:

清除 清除文件系统 UUID 随机 生成一个新的随机生成的 UUID 时间 生成一个新的基于时间的 UUID

mount(8)、fsck(8) 和 /etc/fstab(5)(可能还有其他程序)可以通过指定 UUID=uuid 来使用 UUID,而不是像 /dev/hda1 这样的块特殊设备名。

相关内容