91
Distribuce / Re:Instalace Linux Mint na decrypted oddil
« Poslední příspěvek od martin.maly kdy 27. 03. 2025, 22:49:04 »Kód: [Vybrat]
root@mint:/# cryptsetup luksOpen /dev/nvme1n1p3 cryptroot
Enter passphrase for /dev/nvme1n1p3:
root@mint:/# mount /dev/mapper/cryptroot /mnt
root@mint:/# mount /dev/nvme1n1p4 /mnt/boot
root@mint:/# mount --bind /dev /mnt/dev
root@mint:/# mount --bind /proc /mnt/proc
root@mint:/# mount --bind /sys /mnt/sys
root@mint:/# mount --bind /run /mnt/run
root@mint:/# chroot /mnt
lsblk; blkid; fdisk -l
Kód: [Vybrat]
root@mint:/# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 2.3G 1 loop
sda 8:0 1 58.6G 0 disk
├─sda1 8:1 1 2.7G 0 part
├─sda2 8:2 1 5M 0 part
└─sda3 8:3 1 55.9G 0 part
nvme1n1 259:0 0 1.9T 0 disk
├─nvme1n1p1 259:1 0 128M 0 part
├─nvme1n1p2 259:2 0 500M 0 part
├─nvme1n1p3 259:3 0 1.9T 0 part
│ └─cryptroot 252:0 0 1.9T 0 crypt /
└─nvme1n1p4 259:4 0 1.5G 0 part /boot
nvme0n1 259:5 0 1.9T 0 disk
├─nvme0n1p1 259:6 0 200M 0 part
├─nvme0n1p2 259:7 0 128M 0 part
├─nvme0n1p3 259:8 0 1.9T 0 part
├─nvme0n1p4 259:9 0 990M 0 part
└─nvme0n1p5 259:10 0 1.5G 0 part
root@mint:/# blkid
/dev/nvme0n1p1: LABEL="ESP" UUID="62DB-5ACD" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="46223a33-015c-4db6-b777-1ac91b2400cc"
/dev/nvme0n1p3: LABEL="OS" BLOCK_SIZE="512" UUID="F42ADD772ADD36F8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a1a3515a-eafd-4a92-95e8-c5d944a60cfc"
/dev/nvme0n1p4: LABEL="WINRETOOLS" BLOCK_SIZE="512" UUID="B280A05F80A02BB3" TYPE="ntfs" PARTUUID="0dc2485e-64c8-4c15-a2ab-81cf64318895"
/dev/nvme0n1p5: LABEL="DELLSUPPORT" BLOCK_SIZE="512" UUID="B65C9AB95C9A73B9" TYPE="ntfs" PARTUUID="1fb5cd1f-2b42-42c5-abe3-a44b95bc07da"
/dev/nvme1n1p2: UUID="50BD-0E69" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="2fbe27f1-1445-4909-a9e9-1a140903664f"
/dev/nvme1n1p4: UUID="2b24c6e3-0526-4351-9fb6-5f5f79217bec" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="51d30eac-33be-44fa-b409-8c346a4f61e1"
/dev/sda1: BLOCK_SIZE="2048" UUID="2025-01-10-14-57-02-00" LABEL="Linux Mint 22.1 Xfce 64-bit" TYPE="iso9660" PARTUUID="2e213007-01"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="c5c1b861-34df-4ee3-af0d-fa59af5f531e"
/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/mapper/cryptroot: UUID="0088bfad-89a4-4629-af37-d9b81a4aade2" BLOCK_SIZE="4096" TYPE="ext4"
/dev/nvme1n1p3: UUID="0be2ea99-0791-47f8-83d9-3d4e65d0361a" TYPE="crypto_LUKS" PARTUUID="36263761-0286-493c-be3f-e08f9d8cbee0"
/dev/nvme1n1p1: PARTLABEL="Microsoft reserved partition" PARTUUID="15b29e4b-35dd-445a-9802-6aec8ccf5e39"
/dev/sda2: SEC_TYPE="msdos" UUID="6781-353E" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="2e213007-02"
/dev/sda3: LABEL="writable" UUID="68ec7ae1-07c3-4fcc-87e9-324235ba86d7" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="2e213007-03"
root@mint:/# fdisk -l
Disk /dev/loop0: 2.27 GiB, 2440761344 bytes, 4767112 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/nvme1n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
Disk model: PC811 SK hynix 2048GB
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: 62DEFA29-62A0-4375-BDB0-06FEA73DF3DF
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 264191 262144 128M Microsoft reserved
/dev/nvme1n1p2 264192 1288191 1024000 500M EFI System
/dev/nvme1n1p3 4360192 4000796671 3996436480 1.9T unknown
/dev/nvme1n1p4 1288192 4360191 3072000 1.5G Linux filesystem
Partition table entries are not in disk order.
Disk /dev/nvme0n1: 1.86 TiB, 2048408248320 bytes, 4000797360 sectors
Disk model: PC811 SK hynix 2048GB
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: F9310264-3D61-4509-89C6-CB4629827AF0
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 411647 409600 200M EFI System
/dev/nvme0n1p2 411648 673791 262144 128M Microsoft reserved
/dev/nvme0n1p3 673792 3995672575 3994998784 1.9T Microsoft basic data
/dev/nvme0n1p4 3995672576 3997700095 2027520 990M Windows recovery environment
/dev/nvme0n1p5 3997702144 4000776191 3074048 1.5G Windows recovery environment
Disk /dev/sda: 58.57 GiB, 62889394176 bytes, 122830848 sectors
Disk model: Cruzer Dial
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: dos
Disk identifier: 0x2e213007
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 64 5636095 5636032 2.7G 0 Empty
/dev/sda2 8460 18699 10240 5M ef EFI (FAT-12/16/32)
/dev/sda3 5636096 122830847 117194752 55.9G 83 Linux
Disk /dev/mapper/cryptroot: 1.86 TiB, 2046158700544 bytes, 3996403712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Kód: [Vybrat]
root@mint:/# ls /boot/
System.map-6.8.0-51-generic efi/ initrd.img initrd.img.old vmlinuz
config-6.8.0-51-generic grub/ initrd.img-6.8.0-51-generic lost+found/ vmlinuz-6.8.0-51-generic
root@mint:/# ls /boot/efi/
root@mint:/# ls /boot/grub/
fonts gfxblacklist.txt grub.cfg grubenv locale unicode.pf2 x86_64-efi
Kód: [Vybrat]
root@mint:/# cat /etc/crypttab
nvme0n1p3_crypt UUID=0be2ea99-0791-47f8-83d9-3d4e65d0361a none luks,discard
Kód: [Vybrat]
root@mint:/# 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>
/dev/mapper/nvme0n1p3_crypt / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme0n1p4 during installation
UUID=2b24c6e3-0526-4351-9fb6-5f5f79217bec /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=50BD-0E69 /boot/efi vfat umask=0077 0 1
Kód: [Vybrat]
root@mint:/# cat /etc/cryptsetup-initramfs/conf-hook
#
# Configuration file for the cryptroot initramfs hook.
#
#
# KEYFILE_PATTERN: ...
#
# The value of this variable is interpreted as a shell pattern.
# Matching key files from the crypttab(5) are included in the initramfs
# image. The associated devices can then be unlocked without manual
# intervention. (For instance if /etc/crypttab lists two key files
# /etc/keys/{root,swap}.key, you can set KEYFILE_PATTERN="/etc/keys/*.key"
# to add them to the initrd.)
#
# If KEYFILE_PATTERN if null or unset (default) then no key file is
# copied to the initramfs image.
#
# Note that the glob(7) is not expanded for crypttab(5) entries with a
# 'keyscript=' option. In that case, the field is not treated as a file
# name but given as argument to the keyscript.
#
# WARNING:
# * If the initramfs image is to include private key material, you'll
# want to create it with a restrictive umask in order to keep
# non-privileged users at bay. For instance, set UMASK=0077 in
# /etc/initramfs-tools/initramfs.conf
# * If you use cryptsetup-suspend, private key material inside the
# initramfs will be in memory during suspend period, defeating the
# purpose of cryptsetup-suspend.
#
#KEYFILE_PATTERN=
#
# ASKPASS: [ y | n ]
#
# Whether to include the askpass binary to the initramfs image. askpass
# is required for interactive passphrase prompts, and ASKPASS=y (the
# default) is implied when the hook detects that same device needs to be
# unlocked interactively (i.e., not via keyfile nor keyscript) at
# initramfs stage. Setting ASKPASS=n also skips `cryptroot-unlock`
# inclusion as it requires the askpass executable.
ASKPASS=y
CRYPTSETUP=y
root@mint:/# cat /etc/cryptsetup-initramfs/cryptroot.conf
target=nvme0n1p3_crypt
source=0be2ea99-0791-47f8-83d9-3d4e65d0361a