I'm trying to install funtoo and I want my laptop to be encrypted. I choose to install firstly funtoo on a USB disk to test how it behave before moving it to the laptop disk eventually.
I'm using the regular gnome stage 3.
Everything is going well until now. I'm in at the chroot on my laptop actually trying to finalize installatiion.
But I'm having an issue to add a new passphrase on a keyfile for the 2 encrypted disks (root and swap).
Here is the disk (One touch HDD USB3 1Tb):
# lsblk /dev/sda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1G 0 part
├─sda2 8:2 0 447.7G 0 part
│ └─root 254:3 0 447.7G 0 crypt funtoo root encrypted
├─sda3 8:3 0 17G 0 part
│ └─swap 254:2 0 17G 0 crypt funtoo swap encrypted
└─sda4 8:4 0 465.8G 0 part backup disk ext4
#
I can't add the new passphrase from the keyfile. Here is what happens :
### keyfile was generated with dd if=/dev/random bs=63 of=bt_keyfile.bin ###
# ls -al bt_keyfile.bin
-rw------- 1 root root 63 Dec 29 15:42 bt_keyfile.bin
#
cryptsetup open /dev/sda3 swap
####typing passphrase here###
#
###Now trying to add a new key from the keyfile
#
# cryptsetup -v luksAddKey swap bt_keyfile.bin --debug
# cryptsetup 2.4.2 processing "cryptsetup -v luksAddKey swap bt_keyfile.bin --debug"
# Running command luksAddKey.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device swap.
# Trying to open and read device swap with direct-io.
# Trying to open device swap without direct-io.
Device swap does not exist or access denied.
# Unlocking memory.
Command failed with code -4 (wrong device or file specified).
#
### But the device is really there and open. Why ??????
#
# ls /dev/mapper
control swap
# cryptsetup status swap
/dev/mapper/swap is active.
type: LUKS1
cipher: aes-xts-plain64
keysize: 512 bits
key location: dm-crypt
device: /dev/sda3
sector size: 512
offset: 4096 sectors
size: 35647488 sectors
mode: read/write
I have been searching/googling around for a while, but no luck.
I have the same error if I try to add the new passphrase from the linux on the laptop (GarudaLinux (arch based)) or if I try from the funtoo live iso either.
Anybody would have some clues to help me solve this ? I need to be able to mount the swap without typing a second passphrase.
Question
perfmonk
I'm trying to install funtoo and I want my laptop to be encrypted. I choose to install firstly funtoo on a USB disk to test how it behave before moving it to the laptop disk eventually.
I'm using the regular gnome stage 3.
Everything is going well until now. I'm in at the chroot on my laptop actually trying to finalize installatiion.
But I'm having an issue to add a new passphrase on a keyfile for the 2 encrypted disks (root and swap).
Here is the disk (One touch HDD USB3 1Tb):
# lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 1G 0 part ├─sda2 8:2 0 447.7G 0 part │ └─root 254:3 0 447.7G 0 crypt funtoo root encrypted ├─sda3 8:3 0 17G 0 part │ └─swap 254:2 0 17G 0 crypt funtoo swap encrypted └─sda4 8:4 0 465.8G 0 part backup disk ext4 #
I can't add the new passphrase from the keyfile. Here is what happens :
### keyfile was generated with dd if=/dev/random bs=63 of=bt_keyfile.bin ### # ls -al bt_keyfile.bin -rw------- 1 root root 63 Dec 29 15:42 bt_keyfile.bin # cryptsetup open /dev/sda3 swap ####typing passphrase here### # ###Now trying to add a new key from the keyfile # # cryptsetup -v luksAddKey swap bt_keyfile.bin --debug # cryptsetup 2.4.2 processing "cryptsetup -v luksAddKey swap bt_keyfile.bin --debug" # Running command luksAddKey. # Locking memory. # Installing SIGINT/SIGTERM handler. # Unblocking interruption on signal. # Allocating context for crypt device swap. # Trying to open and read device swap with direct-io. # Trying to open device swap without direct-io. Device swap does not exist or access denied. # Unlocking memory. Command failed with code -4 (wrong device or file specified). # ### But the device is really there and open. Why ?????? # # ls /dev/mapper control swap # cryptsetup status swap /dev/mapper/swap is active. type: LUKS1 cipher: aes-xts-plain64 keysize: 512 bits key location: dm-crypt device: /dev/sda3 sector size: 512 offset: 4096 sectors size: 35647488 sectors mode: read/write
I have been searching/googling around for a while, but no luck.
I have the same error if I try to add the new passphrase from the linux on the laptop (GarudaLinux (arch based)) or if I try from the funtoo live iso either.
Anybody would have some clues to help me solve this ? I need to be able to mount the swap without typing a second passphrase.
Regards,
Bernard
My emerge --info
(chroot) gag4ruda ~ # emerge --info Portage 3.0.14 (python 3.7.10-final-0, funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-9.2.0, glibc-2.33, 5.15.11-zen1-1-zen x86_64) ================================================================= System uname: Linux-5.15.11-zen1-1-zen-x86_64-AMD_Ryzen_7_5700U_with_Radeon_Graphics-with-gentoo-1.4 KiB Mem: 15829400 total, 10375752 free KiB Swap: 50992832 total, 50990528 free sh bash 5.0_p18 ld GNU ld (Gentoo 2.36.1 p1) 2.36.1 app-shells/bash: 5.0_p18::core-kit dev-lang/perl: 5.32.0::perl-kit dev-lang/python: 2.7.18::python-kit, 3.7.10::python-kit dev-util/cmake: 3.19.7::core-kit sys-apps/baselayout: 2.6.1-r2::core-kit sys-apps/openrc: 0.41.2-r3::core-kit sys-apps/sandbox: 2.24::core-kit sys-devel/autoconf: 2.13-r1::core-kit, 2.69-r4::core-kit sys-devel/automake: 1.16.1-r1::core-kit sys-devel/binutils: 2.36.1-r1::core-kit sys-devel/gcc: 9.2.0::core-kit sys-devel/gcc-config: 2.4::core-kit sys-devel/libtool: 2.4.6-r5::core-kit sys-devel/make: 4.2.1-r4::core-kit sys-kernel/linux-headers: 4.19::core-kit (virtual/os-headers) sys-libs/glibc: 2.33::core-kit Repositories: nokit location: /var/git/meta-repo/kits/nokit masters: core-kit priority: -500 browser-kit location: /var/git/meta-repo/kits/browser-kit masters: core-kit priority: 1 core-gl-kit location: /var/git/meta-repo/kits/core-gl-kit masters: core-kit priority: 1 core-hw-kit location: /var/git/meta-repo/kits/core-hw-kit masters: core-kit priority: 1 core-kit location: /var/git/meta-repo/kits/core-kit priority: 1 aliases: gentoo core-server-kit location: /var/git/meta-repo/kits/core-server-kit masters: core-kit priority: 1 desktop-kit location: /var/git/meta-repo/kits/desktop-kit masters: core-kit priority: 1 dev-kit location: /var/git/meta-repo/kits/dev-kit masters: core-kit priority: 1 editors-kit location: /var/git/meta-repo/kits/editors-kit masters: core-kit priority: 1 games-kit location: /var/git/meta-repo/kits/games-kit masters: core-kit priority: 1 gnome-kit location: /var/git/meta-repo/kits/gnome-kit masters: core-kit priority: 1 haskell-kit location: /var/git/meta-repo/kits/haskell-kit masters: core-kit priority: 1 java-kit location: /var/git/meta-repo/kits/java-kit masters: core-kit priority: 1 kde-kit location: /var/git/meta-repo/kits/kde-kit masters: core-kit priority: 1 lang-kit location: /var/git/meta-repo/kits/lang-kit masters: core-kit priority: 1 lisp-scheme-kit location: /var/git/meta-repo/kits/lisp-scheme-kit masters: core-kit priority: 1 llvm-kit location: /var/git/meta-repo/kits/llvm-kit masters: core-kit priority: 1 mate-kit location: /var/git/meta-repo/kits/mate-kit masters: core-kit priority: 1 media-kit location: /var/git/meta-repo/kits/media-kit masters: core-kit priority: 1 ml-lang-kit location: /var/git/meta-repo/kits/ml-lang-kit masters: core-kit priority: 1 net-kit location: /var/git/meta-repo/kits/net-kit masters: core-kit priority: 1 perl-kit location: /var/git/meta-repo/kits/perl-kit masters: core-kit priority: 1 python-kit location: /var/git/meta-repo/kits/python-kit masters: core-kit priority: 1 python-modules-kit location: /var/git/meta-repo/kits/python-modules-kit masters: core-kit priority: 1 qt-kit location: /var/git/meta-repo/kits/qt-kit masters: core-kit priority: 1 ruby-kit location: /var/git/meta-repo/kits/ruby-kit masters: core-kit priority: 1 science-kit location: /var/git/meta-repo/kits/science-kit masters: core-kit priority: 1 security-kit location: /var/git/meta-repo/kits/security-kit masters: core-kit priority: 1 text-kit location: /var/git/meta-repo/kits/text-kit masters: core-kit priority: 1 xfce-kit location: /var/git/meta-repo/kits/xfce-kit masters: core-kit priority: 1 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=znver2 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=znver2 -O2 -pipe" DISTDIR="/var/cache/portage/distfiles" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=znver2 -O2 -pipe" GENTOO_MIRRORS="https://fastpull-us.funtoo.org" LANG="fr_CA.utf8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed" LINGUAS="cf" PKGDIR="/var/cache/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl alsa amd64 apng berkdb bluray btrfs bzip2 cdda cddb cdio cdr colord cracklib crypt cups curl cxx dbus dnssd dri dts dvd dvdr dvdread eds egl elogind encode evo exif faac faad ffmpeg flac gdbm gif glamor glvnd gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gtkstyle ico iconv icu ieee1394 introspection ios ipod ipv6 jpeg jpeg2k lame libass libguess libmpeg2 libnotify mad matroska mjpeg mmx modules mp3 mpeg mtp mudflap nautilus ncurses nls nptl nsplugin nvenc ogg opengl openmp openrc-force pam pcre pdf png policykit postproc pppd pulseaudio python quicktime readline resolvconf sdl sdl1 sndfile sse sse2 ssl startup-notification svg taglib tcpd theora tiff tracker truetype twolame udev unicode v4l vaapi vdpau vorbis vpx vulkan wav wavpack webp win32codecs wmf x264 x265 xa xattr xinerama xml xvid xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias authn_core authz_core socache_shmcb unixd" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" L10N="en fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby27 ruby26" USERLAND="GNU" VIDEO_CARDS="radeon amdgpu vulkan-amdgpu gallium-radeonsi radeonsi fbdev gallium-r600 gallium-vmware nvidia osmesa qxl r600 swrast vaapi vdpau vmware xa xvmc" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, ENV_UNSET, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS (chroot) gag4ruda ~ #
my inxi -Faz info
Info from
SOLVED
Link to comment
Share on other sites
1 answer to this question
Recommended Posts