AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-343617

Victor's questions

Martin Hope
Victor
Asked: 2024-11-09 23:35:49 +0800 CST

升级至 24.10 后无法交换

  • 8

我全新安装了 Ubuntu 24.04,其中有 ZFS 和由 Ubuntu 安装程序自动创建的 8GB 交换分区,如下所示/dev/nvme0n1p3。

我升级到 24.10,重启后交换分区不可用。似乎swapon找不到加密分区。升级过程中出了什么问题?

/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>
/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-dm_crypt-0 none swap sw 0 0
# Use `zfs list` for current zfs mount info
# bpool none defaults 0 0
# Use `zfs list` for current zfs mount info
# rpool none defaults 0 0
# Use `zfs list` for current zfs mount info
# rpool / defaults 0 0
# Use `zfs list` for current zfs mount info
# rpool none defaults 0 0
# Use `zfs list` for current zfs mount info
# rpool /root defaults 0 0
# Use `zfs list` for current zfs mount info
# rpool /home defaults 0 0
# Use `zfs list` for current zfs mount info
# bpool /boot defaults 0 0
# /boot/efi was on /dev/nvme0n1p1 during curtin installation
/dev/disk/by-uuid/6DA7-371B /boot/efi vfat defaults 0 1

还有我的/etc/crypttab:

dm_crypt-0 PARTUUID=d5018485-33be-40b8-80a1-9adb3c96ff16 /dev/urandom swap,initramfs

我尝试用/etc/crypttab替换 ID ,但重启后问题仍未解决。PARTUUID=d5018485-33be-40b8-80a1-9adb3c96ff16/dev/nvme0n1p3

我还尝试添加以下选项: swap,initramfs,plain,cipher=aes-xts-plain64,size=256

$ sudo blkid:(我没有显示许多循环设备)

/dev/nvme0n1p1: UUID="6DA7-371B" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="604b52dd-b0fc-43d8-8661-3dcb64869220"
/dev/nvme0n1p4: LABEL="rpool" UUID="15673004915406136913" UUID_SUB="7631777870671497537" BLOCK_SIZE="4096" TYPE="zfs_member" PARTUUID="2157f054-6832-42fb-8032-8d2fb89b235b"
/dev/nvme0n1p2: LABEL="bpool" UUID="8036775395222734905" UUID_SUB="16758030276404416519" BLOCK_SIZE="4096" TYPE="zfs_member" PARTUUID="ec3c6766-9115-4fa6-b9d4-793d092a7bb4"
/dev/mapper/keystore-rpool: LABEL="keystore-rpool" UUID="bda5d08f-4300-4ecf-9dd1-9c6958d53738" BLOCK_SIZE="4096" TYPE="ext4"
/dev/nvme0n1p3: PARTUUID="d5018485-33be-40b8-80a1-9adb3c96ff16"
/dev/zd0: UUID="2586988a-ff8b-4fdf-96c1-dd1532b1eb90" TYPE="crypto_LUKS"
$ sudo swapon -a
swapon: cannot open /dev/disk/by-id/dm-uuid-CRYPT-PLAIN-dm_crypt-0: No such file or directory

$ sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-6.11.0-9-generic
cryptsetup: ERROR: dm_crypt-0: Source mismatch
device-mapper: table ioctl on dm_crypt-0  failed: No such device or address
Command failed.
cryptsetup: WARNING: Couldn't determine cipher modules to load for dm_crypt-0
mkinitramfs: copy_file: config '/etc/zfs/vdev_id.conf' not found
mkinitramfs: copy_file: config '/etc/zfs/initramfs-tools-load-key' not found
mkinitramfs: copy_file: config '/etc/zfs/initramfs-tools-load-key.d/*' not found
update-initramfs: Generating /boot/initrd.img-6.8.0-48-generic
cryptsetup: ERROR: dm_crypt-0: Source mismatch
device-mapper: table ioctl on dm_crypt-0  failed: No such device or address
Command failed.
cryptsetup: WARNING: Couldn't determine cipher modules to load for dm_crypt-0
mkinitramfs: copy_file: config '/etc/zfs/vdev_id.conf' not found
mkinitramfs: copy_file: config '/etc/zfs/initramfs-tools-load-key' not found
mkinitramfs: copy_file: config '/etc/zfs/initramfs-tools-load-key.d/*' not found
$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 3,64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: CT4000P3SSD8                            
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8B4A35DE-55EE-4ECA-99B3-E52D0FAC4A75

Device            Start        End    Sectors  Size Type
/dev/nvme0n1p1     2048    2203647    2201600    1G EFI System
/dev/nvme0n1p2  2203648    6397951    4194304    2G Linux filesystem
/dev/nvme0n1p3  6397952   23175167   16777216    8G Linux filesystem
/dev/nvme0n1p4 23175168 7814033407 7790858240  3,6T Linux filesystem
$ lsblk -o +PATH,UUID,PARTUUID
NAME             MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS                         PATH                       UUID                                 PARTUUID
zd0              230:0    0    20M  0 disk                                      /dev/zd0                   2586988a-ff8b-4fdf-96c1-dd1532b1eb90 
└─keystore-rpool 252:0    0     4M  0 crypt /run/keystore/rpool                 /dev/mapper/keystore-rpool bda5d08f-4300-4ecf-9dd1-9c6958d53738 
nvme0n1          259:0    0   3,6T  0 disk                                      /dev/nvme0n1                                                    
├─nvme0n1p1      259:1    0     1G  0 part  /boot/efi                           /dev/nvme0n1p1             6DA7-371B                            604b52dd-b0fc-43d8-8661-3dcb64869220
├─nvme0n1p2      259:2    0     2G  0 part                                      /dev/nvme0n1p2             8036775395222734905                  ec3c6766-9115-4fa6-b9d4-793d092a7bb4
├─nvme0n1p3      259:3    0     8G  0 part                                      /dev/nvme0n1p3                                                  d5018485-33be-40b8-80a1-9adb3c96ff16
└─nvme0n1p4      259:4    0   3,6T  0 part                                      /dev/nvme0n1p4             15673004915406136913                 2157f054-6832-42fb-8032-8d2fb89b235b
$ ls -al /dev/mapper/
crw-------  1 root root 10, 236 Nov 15 22:55 control
lrwxrwxrwx  1 root root       7 Nov 15 22:55 keystore-rpool -> ../dm-0
$ ls -al /dev/disk/by-uuid/
lrwxrwxrwx  1 root root  15 Nov 15 22:54 15673004915406136913 -> ../../nvme0n1p4
lrwxrwxrwx  1 root root   9 Nov 15 22:54 2586988a-ff8b-4fdf-96c1-dd1532b1eb90 -> ../../zd0
lrwxrwxrwx  1 root root  15 Nov 15 22:54 6DA7-371B -> ../../nvme0n1p1
lrwxrwxrwx  1 root root  15 Nov 15 22:54 8036775395222734905 -> ../../nvme0n1p2
lrwxrwxrwx  1 root root  10 Nov 15 22:55 bda5d08f-4300-4ecf-9dd1-9c6958d53738 -> ../../dm-0
$ ls -al /dev/block/
lrwxrwxrwx  1 root root    6 Nov 15 22:55 230:0 -> ../zd0
lrwxrwxrwx  1 root root    7 Nov 15 22:55 252:0 -> ../dm-0
lrwxrwxrwx  1 root root   10 Nov 15 22:55 259:0 -> ../nvme0n1
lrwxrwxrwx  1 root root   12 Nov 15 22:55 259:1 -> ../nvme0n1p1
lrwxrwxrwx  1 root root   12 Nov 15 22:55 259:2 -> ../nvme0n1p2
lrwxrwxrwx  1 root root   12 Nov 15 22:55 259:3 -> ../nvme0n1p3
lrwxrwxrwx  1 root root   12 Nov 15 22:55 259:4 -> ../nvme0n1p4
$ sudo parted /dev/nvme0n1 unit GB print free
Model: CT4000P3SSD8 (nvme)
Disk /dev/nvme0n1: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
        0,00GB  0,00GB  0,00GB  Free Space
 1      0,00GB  1,13GB  1,13GB  fat32              boot, esp
 2      1,13GB  3,28GB  2,15GB  zfs
 3      3,28GB  11,9GB  8,59GB
 4      11,9GB  4001GB  3989GB  zfs
        4001GB  4001GB  0,00GB  Free Space

另外,我不知道这是否相关,但在启动过程中,当提示输入(ZFS 加密)磁盘密码时,我收到以下警告: cryptsetup: WARNING: Option 'size' missing in crypttab for plain dm-crypt mapping dm_crypt-0. Please read /usr/share/doc/cryptsetup-initramfs/README.initramfs.gz and add the correct 'size' option to your crypttab(5).

fstab
  • 2 个回答
  • 242 Views
Martin Hope
Victor
Asked: 2016-11-17 11:29:34 +0800 CST

ls:无法打开目录:权限被拒绝

  • 16

username即使在获得所有权并授予其所有权限后,我也无法打开目录:

sudo mkdir /path/to/the/directory/
sudo chown -R username:username /path/to/the/directory/
sudo chmod -R 777 /path/to/the/directory/

我得到:

$sudo ls -al /path/to/the/directory/
total 0
drwxrwxrwx 1 username username   0 nov 16 15:13 .
drwx------ 1 root     root     208 nov 16 15:13 ..
$ ls -al /path/to/the/directory/
ls: cannot access '/path/to/the/directory/': Permission denied

会发生什么?

permissions
  • 1 个回答
  • 118620 Views
Martin Hope
Victor
Asked: 2016-10-06 02:20:16 +0800 CST

通过蓝牙将 Bose QuietComfort 35 与 Ubuntu 配对

  • 101

在系统设置 > 蓝牙中,搜索设备时可以看到 Bose QC 35 但配对失败。

在多次尝试并使用PIN 选项播放后,我设法配对它,但一旦在System Settings > Sound中选择它,它就会失败并回退到内置音频或播放一些乱码。

16.04
  • 4 个回答
  • 105981 Views
Martin Hope
Victor
Asked: 2016-09-30 08:48:16 +0800 CST

如何在 Ubuntu 上以桌面模式安装 pgAdmin 4

  • 118

如何在桌面模式下安装 pgAdmin 4?该文档仅详细说明了服务器模式。

software-installation
  • 4 个回答
  • 268658 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve