Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

device-mapper: reload ioctl on failed: invalid argument.

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

device-mapper: reload ioctl on failed: invalid argument.

  • Quote

Post by silentcola » Sun Dec 22, 2019 11:22 am

Hi all,

Going through install process for Gentoo with LUKS/LVM, first by following Sakaki's EFI Install Guide then MoJo's 'Encrypted Gentoo Linux Install Tutorial | LVM - LUKS - Plymouth' on youtube.

At reboot, I get warning, in my previous post I understood i do not need to worry about it but here he it is anyway.

Code: Select all

WARNING: Failed to connect to lvmtad. Falling back to device scanning
Enter passphrase for /dev/sda3
After entering my password

Code: Select all

device-mapper: reload ioctl on    failed: invalid argument.
Every time i enter correct password I get that message and cannot log in.

/etc/fstab

Code: Select all

/dev/sda2						/boot	    ext2	noatime                     0 2
/dev/mapper/gentoo-root			/			ext4	defaults,rw,relatime,data=ordered    0 1
/dev/mapper/gentoo-home			/home		ext4	rw,relatime,data=ordered	0 2
/dev/mapper/gentoo-swap			none		swap    defaults                    0 0
/etc/default/grub

Code: Select all

GRUB_PRELOAD_MODULES=lvm
GRUB_ENABLE_CRYPTODISK=y
GRUB_DEVICE=/dev/ram0
GRUB_CMDLINE_LINUX="crypt_root=/dev/sda3 real_root=/dev/mapper/gentoo-root rootfstype=ext4 dolvm quiet splash"
If anyone has any pointers, that would be great!
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Mon Dec 30, 2019 1:21 pm

Is this a Kernel or LVM issue? Where can I go for further documentation?
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Dec 31, 2019 1:56 am

I would start by enabling debug printing of the steps, so that you know which command triggers that message. My guess is that it is related to the cryptsetup phase, not the LVM phase. Have you checked that your kernel has the appropriate ciphers to access the LUKS device?
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Thu Jan 02, 2020 7:57 am

Hello Hu,

Thanks for the reply, I guess I need to boot again with CD installer, and allow logging at boot.

How do i do this properly? Because I enabled rc logging in [/etc/rc.conf], after rebooting I am stuck at EFI boot screen with EFI shell and Device mapping table.
I don't even have option to enter password.

I'm wondering if I need to remount everything when booting from CD after initial install.

Code: Select all

cryptsetup luksOpen /dev/sda3 gentoo
#Enter passphrase
mount /dev/mapper/gentoo-root /mnt/gentoo
mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash 
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Thu Jan 02, 2020 12:25 pm

My install instructions I modified are as follows:
https://pastebin.com/K7VZVKXP

Perhaps you can see what/where i go wrong in install process?
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Thu Jan 02, 2020 6:22 pm

Ok, I actually got a bit further, following details:

blkid

Code: Select all

/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="D945-098D" TYPE="vfat" PARTLABEL="grub" PARTUUID="ca3e3039-32cd-4c82-93fb-f0118ce50db6"
/dev/sda2: UUID="3C68-92D2" TYPE="vfat" PARTLABEL="boot" PARTUUID="803291be-25e0-48b0-9488-ddbb0d56f956"
/dev/sda3: UUID="fadccaa9-c99b-40e0-b4f7-a5b0e971ad5b" TYPE="crypto_LUKS" PARTLABEL="lvm" PARTUUID="3369bb30-5e3f-4a11-af2d-974cb67f6a00"
/dev/sr0: UUID="2019-10-28-03-14-25-28" LABEL="Gentoo amd64 20191027T214502Z" TYPE="iso9660" PTUUID="2584d85d" PTTYPE="dos"
/dev/mapper/gentoo: UUID="GxNWqQ-ULuq-Ntov-Z7Be-uN44-5Gb6-HW2y0Q" TYPE="LVM2_member"
/dev/mapper/gentoo-swap: UUID="93375a9d-eb0b-40db-a35b-35131060b5ec" TYPE="swap"
/dev/mapper/gentoo-root: UUID="d86ff021-f997-4991-b810-48c9ff87b5de" TYPE="ext4"
/dev/mapper/gentoo-home: UUID="d7c5df36-0e3e-4261-b2d7-16e00ef41846" TYPE="ext4"
vim /etc/fstab

Code: Select all

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>
UUID=3C68-92D2  /boot           vfat    noatime          1 2
UUID=d86ff021-f997-4991-b810-48c9ff87b5de       /               ext4    defaults,rw,relatime,data=ordered    0 1
UUID=d7c5df36-0e3e-4261-b2d7-16e00ef41846       /home           ext4    rw,relatime,data=ordered        0 2
UUID=93375a9d-eb0b-40db-a35b-35131060b5ec       none            swap    defaults
throws error when I boot:
https://imgur.com/a/J9Zrr5w
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Jan 03, 2020 1:58 am

That imgur link does not render for me. Please post the text of the error you receive.
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Sat Jan 04, 2020 4:19 pm

hello again.

I have sysklogd added as service default with following config.

Code: Select all

#  /etc/syslog.conf     Configuration file for syslogd.
#
#                       For more information see syslog.conf(5)
#                       manpage.

#
# First some standard logfiles.  Log by facility.
#

auth,authpriv.*                 /var/log/auth.log
*.*;auth,authpriv.none          -/var/log/syslog
#cron.*                         /var/log/cron.log
daemon.*                        -/var/log/daemon.log
kern.*                          -/var/log/kern.log
lpr.*                           -/var/log/lpr.log
mail.*                          -/var/log/mail.log
user.*                          -/var/log/user.log

#
# Logging for the mail system.  Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info                       -/var/log/mail.info
mail.warn                       -/var/log/mail.warn
mail.err                        /var/log/mail.err

# Logging for INN news system
#
news.crit                       /var/log/news/news.crit
news.err                        /var/log/news/news.err
news.notice                     -/var/log/news/news.notice

#
# Some `catch-all' logfiles.
#
*.=debug;\
        auth,authpriv.none;\
        news.none;mail.none     -/var/log/debug
*.=info;*.=notice;*.=warn;\
        auth,authpriv.none;\
        cron,daemon.none;\
        mail,news.none          -/var/log/messages

#
# Emergencies are sent to everybody logged in.
#
*.emerg                         *

#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
#       news.=crit;news.=err;news.=notice;\
#       *.=debug;*.=info;\
#       *.=notice;*.=warn       /dev/tty8

# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
# you must invoke `xconsole' with the `-file' option:
#
#    $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
#      busy site..
#
daemon.*;mail.*;\
        news.err;\
        *.=debug;*.=info;\
        *.=notice;*.=warn       |/dev/xconsole

unfortunately it does not log anything at boot.

Code: Select all

livecd / # ls -lah /var/log/
total 892K
drwxr-xr-x 6 root    root    4.0K Jan  1 14:55 .
drwxr-xr-x 9 root    root    4.0K Dec 29 22:55 ..
-rw-r--r-- 1 root    root       0 Dec 30 01:45 boot
drwxr-xr-x 2 root    root    4.0K Jan  1 03:18 ConsoleKit
drwxr-xr-x 2 root    root    4.0K Jan  1 01:30 cups
-rw-rw---- 1 portage portage  11K Jan  4 16:46 emerge-fetch.log
-rw-rw---- 1 portage portage 232K Jan  4 16:54 emerge.log
-rw-r--r-- 1 root    root    607K Jan  1 16:28 genkernel.log
-rw-r--r-- 1 root    root       0 Dec 29 22:55 .keep
drwxrwsr-x 3 portage portage 4.0K Dec 29 22:59 portage
drwxrwx--- 2 root    portage 4.0K Dec 30 01:46 sandbox
-rw------- 1 root    root     63K Jan  1 17:07 tallylog
tallylog is full of @@@@@@ symbols.

with this in mind I decided to go ahead and emerge syslog-ng
after emerging sucesffuly I am unable to enable it.

Code: Select all

livecd /var/log # rc-update syslog-ng add default
 * rc-update: invalid command `syslog-ng'

What am i missing?
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jan 04, 2020 4:41 pm

You have the parameters out of order. According to man rc-update, you should write rc-update add service runlevel, but you wrote rc-update service add runlevel. Swap the second and third parameters.
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Sun Jan 05, 2020 11:59 am

Thanks for the reply, you were correct. I had it the wrong way around.

However, this isn't easy...

After adding syslog-ng as default run level and rebooting, rebooted I no longer get grub splash screen. Instead it starts in EUFI Interactive Shell v2.1 with mapping table.

No logging done in /var/log/, which is understandable because this path is within a LUKS - LVM.

Honestly, I think I'll go back to non-encrypted lvm... this is getting far to in the weeds... Every change seems to break something else.
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jan 05, 2020 4:53 pm

LVM on LUKS on a partition is a pretty common setup. I've used this before, even with the root filesystem inside the LVM. It requires an initramfs to unlock LUKS and then scan/activate/mount the LVM, but it was worth it for me to be able to resize filesystems readily.

Since the initramfs handles mounting/unlocking, it is also on the initramfs to provide any debugging output you may need to understand why it does not work.

If you're being stopped at the UEFI shell, then that says your bootloader isn't even starting Linux, so your initramfs is currently irrelevant. We need to understand why the bootloader no longer starts Linux, and fix that first.
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Wed Jan 08, 2020 9:15 pm

Hello Hu,

I decided to start again completely, this time with simpler profile so that compile times would be shorter.


Managed to do full install, reboot system, unlocked luks partion and finally log in with no issue.

This morning when I rebooted I was welcomed by EUFI Interactive Shell v2.1 with mapping table. again.

blkid

Code: Select all

/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="D945-098D" TYPE="vfat" PARTLABEL="grub" PARTUUID="7b819e98-fa10-43bf-b288-864936725f21"
/dev/sda2: UUID="2E51-F53C" TYPE="vfat" PARTLABEL="boot" PARTUUID="18978e9e-5d7d-4666-849d-67eddf03f012"
/dev/sda3: UUID="a151876e-35b2-410d-98b3-230f24f68cd5" TYPE="crypto_LUKS" PARTLABEL="lvm" PARTUUID="08d797dc-7df1-44bc-8d28-c1725a77f732"
/dev/sr0: UUID="2019-10-28-03-14-25-28" LABEL="Gentoo amd64 20191027T214502Z" TYPE="iso9660" PTUUID="2584d85d" PTTYPE="dos"
/dev/mapper/gentoo: UUID="Go10hN-ux0B-LA5l-uq7Q-QL4v-h63D-ErgimR" TYPE="LVM2_member"
/dev/mapper/vg0-root: UUID="058ae0e8-821c-4dcd-9637-2afd6b6e8a92" TYPE="ext4"
/dev/mapper/vg0-home: UUID="0c128292-0977-4753-af1f-3a67147911a6" TYPE="ext4"
/etc/fstab

Code: Select all

UID=2E51-F53C                                  /boot           vfat            noauto,noatime  1 2
UUID=058ae0e8-821c-4dcd-9637-2afd6b6e8a92       /               ext4            defaults        0 1
UUID=0c128292-0977-4753-af1f-3a67147911a6       /home           ext4            defaults        0 1
tmpfs                                           /tmp            tmpfs           size=4Gb        0 0
tmpfs                                           /run            tmpfs           size=100M       0 0
shm                                             /dev/shm        tmpfs           nodev,nosuid,noexec 0 0

/etc/default/grub

Code: Select all

GRUB_DISTRIBUTOR="Gentoo"
GRUB_CMDLINE_LINUX="dolvm root_trim=yes crypt_root=UUID=a151876e-35b2-410d-98b3-230f24f68cd5 root=/dev/mapper/vg0-root"

I notice when I try to mount /boot following error: mount: /boot: special device UID=2E51-F53C does not exist.
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Thu Jan 09, 2020 3:16 am

If your firmware's shell is asking for input, that suggests it is not running Grub. How did you configure the system to run Grub as your bootloader?
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Thu Jan 09, 2020 5:35 pm

Umm like this?

Code: Select all

$echo "sys-boot/grub:2 device-mapper" >> /etc/portage/package.use/sys-boot

$emerge -av grub

$mount /boot 

$grub-install --target=x86_64-efi --efi-directory=/boot

$grub-mkconfig -o /boot/grub/grub.cfg 

$rc-update add lvm default
After this i changed passwd, then ran reboot.

It rebooted, showed grub menu, then was able to log in.


Next day I boot machine and am welcomed with firmware's shell. I changed nothing after initial log in...
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Jan 10, 2020 3:47 am

That suggests your system's firmware is silently resetting your boot preferences. That is unpleasant, and very system dependent.
Top
silentcola
n00b
n00b
Posts: 23
Joined: Sun Nov 17, 2019 9:26 pm

  • Quote

Post by silentcola » Wed Jan 15, 2020 8:42 am

Ok, strange, but i'm running this within a VM.
VM software wasn;t changed between boots either.
Top
Post Reply

16 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic