Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fresh Install Encrypted Drive hangs on Loading Modules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Mon Jan 23, 2017 11:32 pm    Post subject: Fresh Install Encrypted Drive hangs on Loading Modules Reply with quote

Hey Gentoo Fans,

I'm having a terrible time trying to just get an encrypted drive to work with Gentoo, I've formatted my hard-disk 5 times so far starting from scratch each time but to no avail.

Here are my installation notes:
#Gentoo Install
lsblk
cfdisk
#Select DOS
#Create New
#Size of 100M and set bootable
# New select remaining space
# Write and exit
mkfs.ext4 /dev/sda1
cryptsetup -s 512 -y luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 gentoo
pvcreate /dev/mapper/gentoo
vgcreate gentoo /dev/mapper/gentoo
lvcreate -L 512m -n swap gentoo
lvcreate -l 100%free -n root gentoo
vgscan
vgchange -ay
mkswap /dev/gentoo/swap
swapon /dev/gentoo/swap
mkfs.ext4 /dev/gentoo/root
mount /dev/gentoo/root /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
cd /mnt/gentoo
wget stage3.tar.bz2
tar xvjpf stage3.tar.gz2 --xattrs
nano -w /mnt/gentoo/etc/portage/make.conf
emerge-webrsync
emerge --sync
emerge --ask --update --deep --newuse @world
echo "Canada/Atlantic" > /etc/timezone
emerge --config sys-libs/timezone-data
nano -w /etc/locale.gen
locale-gen
eselect locale list
eselect locale set 3
env-update && source /etc/profile && export PS1="(chroot) $PS1"
#USE="linux lxdm driver tools i3 pulseaudio alsa X x11 crypt cryptsetup opengl dvd dbus -kde -gnome flac lame twolame vorbis network visualizer fifo bindist"
#PYTHON_TARGETS="python2_7 python3_4"
#PYTHON_SINGLE_TARGET="python3_4"
#INPUT_DEVICE="evdev virtualbox"
#VIDEO_CARDS="virtualbox"
#MAKEOPTS="-j2"
#CFLAGS="-march=(native|amdfam10) -02 -pipe"
#INSTALL
emerge --ask sys-kernel/gentoo-sources
emerge --ask sys-fs/cryptsetup
emerge --ask sys-fs/lvm2
rc-update add lvm boot
emerge --ask sys-fs/e2fsprogs
emerge --ask sys-kernel/genkernel
nano -w /etc/fstab
genkernel --luks --lvm --install initramfs all
emerge --ask sys-boot/grub
emerge --ask app-portage/flaggie
flaggie sys-boot/grub +mount +device-mapper
emerge --ask sys-boot/grub
nano -w /etc/default/grub
#GRUB_PRELOAD_MODULES=lvm
#GRUB_CRYPTODISK_ENABLE=y
#GRUB_DEVICE=/dev/ram0
#GRUB_CMDLINE_LINUX="real_root=/dev/mapper/gentoo-root crypt_root=/dev/sda2 dolvm"
grub-install --modules="linux crypto search_fs_uuid luks lvm" --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
emerge --ask x11-drivers/nvidia-drivers
emerge --ask media-video/nvidia-settings
eselect opengl set nvidia

I get the following errors, had to take a picture of this one:
https://s27.postimg.org/ww8a70x2b/Screenshot_from_2017_01_23_19_21_40.png

It finds the drive alright after I put in my password then it starts to boot off the disk but hangs at:
>> Loading modules
:: Loading from crypto: sha256_generic cbc xts

I must be doing something wrong perhaps someone could enlighten me?

I appreciate any help.

Thanks.

lillypad
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 255

PostPosted: Tue Jan 24, 2017 3:45 pm    Post subject: Reply with quote

Hello,

It seems as if your kernel is double-loading modules and this is causing the cryptoloop device to hang.

Code:
genkernel --install --no-ramdisk-modules initramfs --gpg --luks --lvm


Additionally, avoid using modules for hardware required for booting. This might mean you have to eschew genkernel for kernel compilation though the above modification should get it working.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Jan 24, 2017 7:44 pm    Post subject: Reply with quote

hi

I use maybe a similar setup.

partitions from gentoo handbook. / as lvm2 container => luks container => ext4
initramfs from genkernel or genkernel-next => + edit the initramfs because of an error a year ago in that build script. More politely, I had to adapt the initramfs because it had errors, did not work out of the box.

Handmade grub menu entry, handmade kernel, handmade adapted genkernel initramfs.

My suggestion is that you go from top bottom, and check if every requirement is met at that stage of the "boot process".
The genkernel initramfs is kinda similar to read as if you would mount it in a chroot environment. When you can crasp how it works in a chroot, you should be able to check and verify if that genkernel initramfs does its job, or adapt it and repack it.

Personal opinion: I highly doubt htose automatic self destruction scripts from grub / genkernel works. They overwrite boot configs when you use for example a popular binary distro without user intervention. Same applies for Windoze... You may be faster checking everything by hand, if everything is there and go on.

e.g.

grub has a build in shell, you can use taht to check if you named the partitions correctly
feedback of kernel can be used to debug / verify
feedback of initramfs can be used to debug / verify

--

Gentoo is a DIY linux, and using luks requires some knowledge about booting and bootloaders. E.g. use the bootlaoder which you are most familar with, init which you are most familiar with and so on.

There are so many options where you could go wrong when you go with automatic build bootloader, kernel and initramfs. That may work when you use only linux mint binary distro on a plain, virgin disk.

--

Quote:
#CFLAGS="-march=(native|amdfam10) -02 -pipe"


Just don*t. Just plain march native wiht O optimizations, pipe and fomit-framepointer(check gcc handbook on how these are proper written!)

---

Quote:
#GRUB_CMDLINE_LINUX="real_root=/dev/mapper/gentoo-root crypt_root=/dev/sda2 dolvm"


My box wants

Quote:
real_root=/dev/mapper/root crypt_root=/dev/mapper/vg_ASUS_G75_root-lv_ASUS_G75_root


*) Check your initramfs / your init what is needed for real_root
*) same .... what is needed for crypt_root
crypt root is usually /dev/mapper/(volume_group_name)-(logical_volume_name)
note they are connected with a -

--

Can you please enlight me on the following

Quote:
pvcreate /dev/mapper/gentoo


Usually you use /dev/sdb2 for example. Partitions or hole disks.

--

Personal opinion

Quote:
cryptsetup luksOpen /dev/sda2 gentoo
pvcreate /dev/mapper/gentoo
vgcreate gentoo /dev/mapper/gentoo
lvcreate -L 512m -n swap gentoo
lvcreate -l 100%free -n root gentoo


Naming everthing gentoo is nuts.

usually you namy logical volumes like lv_....
volume_groups vg_....
makes it easier to read, easier to recognize errors and such

luckily there exists lv_rename, vg_rename.

You rely on how the tools name their paramters. i think one of the caues why your box is unable too boot also.

unreadable code, which is hard to crasp. use proper names please and rename those lvm components, adapt your bootloader by hand, check your kernel and initramfs, than our box should boot. also check your kernel support for encryption, hardware device support, file system support, kernel parameters for the bootloader.
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Wed Jan 25, 2017 3:46 am    Post subject: Reply with quote

R0b0t1 wrote:
Hello,

It seems as if your kernel is double-loading modules and this is causing the cryptoloop device to hang.

Code:
genkernel --install --no-ramdisk-modules initramfs --gpg --luks --lvm


Additionally, avoid using modules for hardware required for booting. This might mean you have to eschew genkernel for kernel compilation though the above modification should get it working.


Hello R0b0t1,

I'll try this out soon and will let you know if it makes a difference.

If that fails I'll move to the next suggestion thank you so much for the suggestions :D

lillypad
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Jan 25, 2017 10:54 am    Post subject: Reply with quote

You won't solve it when you just try scripts without debugging the real cause.
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Fri Jan 27, 2017 4:27 am    Post subject: Reply with quote

Roman_Gruber wrote:
You won't solve it when you just try scripts without debugging the real cause.


I've tried all these methods and still running into issues.

It's difficult when grub is not set to quiet and no error message is displayed or recorded again it hangs...

I'm using -march=amdfam10 as I have a AMD Phenom II x6 3.2GHZ Processor

I've tried compiling the kernel by following this guide: https://www.preney.ca/paul/archives/389

I've tried the suggestions here with no success i.e. this: genkernel --install --no-ramdisk-modules initramfs --gpg --luks --lvm

I've tried this article for how the kernel is compiled: https://mzanfardino.wordpress.com/2008/10/23/installing-gentoo-with-root-encryption-notes/

doing the modprobe commands before compiling the kernel this way didn't make a difference:
modprobe dm-crypt
modprobe dm-mod

I've specified the initramfs and kernel in /boot/grub/grub.conf using ls /boot/initramfs* /boot/kernel* with no success.

I'm pretty much at the end of my rope here, I know it's a kernel issue but even compiling all the functionality the kernel needs it still refuses to work.

The same exact thing I'm doing here work perfectly fine using -march=native on an intel machine in virtualbox which makes me thing it's related to what cpu flags I'm using which is really sounds like it's not probable.

I'm not sure what to do next here I mean if it worked with march=native on intel wouldn't it work with march=native on AMD processor?

Everything I've been tried has just been an utter failure and I been at this for about a week and a half now almost thinking of going back to arch but I like Gentoo a lot as I've used it in virtualbox with encryption on rooted drives with no issues at all.

Is there anything else I can try to get this up and going?


Last edited by lillypad on Sat Jan 28, 2017 4:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Sat Jan 28, 2017 1:37 am    Post subject: Reply with quote

I'm going to dive into my research over the last week and a half in grave detail from start to finish.

Before I begin since I had Arch on this before and wish to start fresh I clear the MBR from the last installation of Grub by doing:
Code:
dd if=/dev/zero of=/dev/sda bs=2048 count=1


Once this is done I use cfdisk /dev/sda, select the label dos, then create two partitions the first one being 100M and bootable and the other uses the remaining space as sda2.

I aim to have my swap partition encrypted for obvious reasons.

Please note the current process here works with Virtualbox having no issue only difference is the CFLAGS has -march=native.

I'm going to go over now how I setup everything command by command.

Setting up the Disks:
Code:
cfdisk /dev/sda
mkfs.ext4 /dev/sda1
cryptsetup -s 512 -y luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 gentoo
pvcreate /dev/mapper/gentoo
vgcreate gentoo /dev/mapper/gentoo
lvcreate -L 512m -n swap gentoo
lvcreate -l 100%free -n root gentoo
vgscan
vgchange -ay
mkswap /dev/mapper/gentoo-swap
swapon /dev/mapper/gentoo-swap
mkfs.ext4 /dev/mapper/gentoo-root
mount /dev/gentoo/root /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
cd /mnt/gentoo


Installing Stage 3
Code:
wget http://distfiles.gentoo.org/releases/amd64/autobuilds/20170126/stage3-amd64-20170126.tar.bz2
tar xvjpf stage3-amd64-20170126.tar.bz2 --xattrs
nano -w /mnt/gentoo/etc/portage/make.conf
#CFLAGS="-march=amdfam10 -02 -pipe"
#MAKEOPTS="-j6"


I've chosen -march=amdfam10 for CFLAGS as for this processor it's recommended for Gentoo from several sources one of the being:
http://serverfault.com/questions/185737/what-are-the-kernel-and-cflags-for-amd-phenom-ii-x6-k10-thuban

Here is output from /proc/cpuinfo:
Code:
cat /proc/cpuinfo | grep "model name" | head -1
AMD Phenom(tm) II x6 1090T Processor


Up to this point I think I've done pretty well, the naming convention of Gentoo works fine in Virtualbox so I know for a fact this is definitely not the issue at hand.

Installing the Base System:
Code:
mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
mkdir /mnt/gentoo/etc/portage/repos.conf
cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1"
emerge-webrsync
emerge --sync
emerge --ask --update --deep --newuse @world
echo "Europe/Brussels" > /etc/timezone
emerge --config sys-libs/timezone-data
nano -w /etc/locale.gen
#Set as en_US.UTF-8 UTF-8
locale-gen
eselect locale list
eselect locale set 3 #Or whatever number en_US.UTF-8 UTF-8 is
env-update && source /etc/profile && export PS1="(chroot) $PS1"


Setting Up Kernel with Luks and LVM:
Emerge Required Packages for Luks and LVM:
Code:
emerge --ask sys-kernel/gentoo-sources
emerge --ask sys-fs/cryptsetup
emerge --ask sys-fs/lvm2
rc-update add lvm boot
emerge --ask sys-fs/e2fsprogs
emerge --ask sys-kernel/genkernel


The fstab file:
Code:
cat /etc/fstab
/dev/sda1 /boot /ext4 noauto,noatime 1 2
/dev/mapper/gentoo-root / /ext4 noatime 0 1
/dev/mapper/gentoo-swap none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0


Compile the Gentoo Kernel with Luks, LVM and initramfs Support:
Code:
genkernel --luks --lvm --install initramfs all


Configuring the Boot Loader AKA Grub:
Code:
emerge --ask sys-boot/grub
emerge --ask app-portage/flaggie
flaggie sys-boot/grub +mount +device-mapper
emerge --ask sys-boot/grub


Note: I'm adding +device-mapper and +mount to Grub as per this solved article in the Gentoo Forum:
https://forums.gentoo.org/viewtopic-p-7972896.html?sid=073f67cc4669785b3b6b885a8386594e

I'm trying to follow all the information provided by the Handbook as well as the forum verbatim for best results as you can see.

The Grub Configuration:
Code:
cat /etc/default/grub
GRUB_PRELOAD_MODULES="lvm luks cryptsetup"
GRUB_CRYPTODISK_ENABLE=y
GRUB_DEVICE=/dev/ram0
GRUB_CMDLINE_LINUX="real_root=/dev/mapper/gentoo-root rootfstype=ext4 crypt_root=/dev/sda2 dolvm"


Install Grub with Luks and LVM Support:
Code:
grub-install --modules="linux crypto search_fs_uuid luks lvm" --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg


Reboot the System:
Code:
exit
umount -R /mnt/gentoo
reboot


An Image of the issue after reboot:
https://s27.postimg.org/ww8a70x2b/Screenshot_from_2017_01_23_19_21_40.png

I can still get into the root partition and mount everything and chroot into the environment for troubleshooting which has been making things slightly easier however still have had no success.

I've tried a suggestion already from #gentoo in irc.freenode.net where they stated to try booting without quiet set in Grub however it's not set to quiet and the kernel isn't showing errors just hanging it what appears to be an infinite loop.

Again I hope this in much more detail from start to finish if you can point out what I'm doing wrong I'll buy you a beer or send you some bitcoin.

Thank you for the help everyone :D

lillypad


Last edited by lillypad on Sat Jan 28, 2017 4:22 pm; edited 2 times in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Jan 28, 2017 11:50 am    Post subject: Reply with quote

I'm out of this topic.

I suspect that you named your vg / lv wrong, as stated earlier. just using scripts won't solve it anyway
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Sat Jan 28, 2017 12:20 pm    Post subject: Reply with quote

Roman_Gruber wrote:
I'm out of this topic.

I suspect that you named your vg / lv wrong, as stated earlier. just using scripts won't solve it anyway


Hey Roman,

I'll give naming it something different like lvm0 a shot, I have some more time on my hands here today.

lillypad
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Sat Jan 28, 2017 3:55 pm    Post subject: Reply with quote

Hello Everyone,

I've completed the task of starting from scratch and have done the following instead of using the Gentoo naming convention:

Code:
cfdisk /dev/sda
mkfs.ext4 /dev/sda1
cryptsetup -s 512 -y luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 vg0
pvcreate /dev/mapper/vg0
vgcreate vg0/dev/mapper/vg0
lvcreate -L 512m -n swap vg0
lvcreate -l 100%free -n root vg0
vgscan
vgchange -ay
mkswap /dev/mapper/vg0-swap
swapon /dev/mapper/vg0-swap
mkfs.ext4 /dev/mapper/vg0-root
mount /dev/mapper/vg0-root /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
cd /mnt/gentoo


However I still get to the same place as before as I've predicted where it says: ":: Loading from crypto: sha256_generic cbc xts" and does not continue:
https://s27.postimg.org/ww8a70x2b/Screenshot_from_2017_01_23_19_21_40.png

My next step is to maybe try checking which default encoding was used on the luks partition and see if I can compile the kernel with --menuconfig to enable it explicitly.

I will enable cbc, xts, sha512 and sha256 and see if this makes a difference in the menuconfig.

By doing:
Code:
genkernel --luks --lvm --install initramfs --menuconfig all


I gave your suggestion a shot there Roman but no dice it still hangs.

If you guys have more suggestions please let me know I'll be working on it all day today.

I really appreciate the help so thank you for the suggestions so far.

lillypad


Last edited by lillypad on Sat Jan 28, 2017 4:15 pm; edited 2 times in total
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2970
Location: Germany

PostPosted: Sat Jan 28, 2017 3:59 pm    Post subject: Reply with quote

Is it a custom configured/compiled kernel?

You need aes, sha1 (sometimes used indirectly), .... If in doubt enable everything crypto.
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Sat Jan 28, 2017 4:17 pm    Post subject: Reply with quote

frostschutz wrote:
Is it a custom configured/compiled kernel?

You need aes, sha1 (sometimes used indirectly), .... If in doubt enable everything crypto.


Hey frostschutz,

Thank you very much for this suggestion the kernel is compiling right now with cbc, xts, sha256 and sha512 support but if it fails again this time I will try to enable everything to see if it works, good to know those are used indirectly sometimes.

At this point I've basically memorized the whole Gentoo installation procedure which I suppose isn't a bad thing.

:wink:

UPDATE: Just did this and it now hangs at: ":: Loading from crypto:" this is different so it's likely the kernel and not other configs, I'm going to attempt to enable everything under crypto now.

lillypad
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Sat Jan 28, 2017 5:10 pm    Post subject: Reply with quote

Hey guys,

Now I've enabled all crypto it says this:
:: Loading from firewire:

Even blacklisted all firewire modules and...

TADA! It still hangs :evil:

This is going to drive me crazy..

I'm honestly stumped seems like it just loves to suck.

Only thing I can think of is try it with -march=native but I highly doubt it will work.

This is how I feel right now:
http://i.giphy.com/OG8jlh9Pkcpm8.gif

UPDATE:
Just re-compiled the kernel with -march=native and still the same issue:
":: Loding from firewire: ohci1394 sbp2"

Starting to wonder how the heck anyone deals with these difficulties installing Gentoo is this a bug????

lillypad
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Mon Jan 30, 2017 12:53 am    Post subject: Reply with quote

So Here is another update been at this full time all weekend:

Compiling the Kernel:
Code:
zcat /proc/config.gz > /usr/share/genkernel/arch/x86_64/kernel-config
genkernel –no-clean –menuconfig –save-config –luks –lvm all
Device Drivers  —>
Multi-device support (RAID and LVM)  —>
[*] Multiple devices driver support (RAID and LVM)
< >   RAID support
<*>  Device mapper support
<*>  Crypt target support

File Systems —>
<*>  The Extended 4 (ext4) filesystem

Cryptographic API  —>
<*>  SHA256 digest algorithm
<*>  AES cipher algorithms


Now it boots again but hangs here:
Code:
:: Loading from net: bnx2 e1000 igb pcnet32 r8169 sky2 tg3 virtio_net


So thinking this is because I'm missing those modules I add them to /etc/conf.d/modules as:
Code:
modules="bnx2 e1000 igb pcnet32 r8169 sky2 tg3 virtio_net"


Reboot the machine and guess what same issue:
Code:
:: Loading from net: bnx2 e1000 igb pcnet32 r8169 sky2 tg3 virtio_net


By now I'm confused and wonder well are the modules even there and the answer is YUP!:
Code:
find /lib/modules/4.4.39-gentoo/ -type f -iname '*.o' -or -iname '*.ko' | grep -E 'bnx2|e1000|igb|pcnet32|r8169|sky2|tg3|virtio_net'
#Too much to type but all their respective .ko files are there... ODD


So okay I compiled the kernel and the modules are there and specified explicitly to load on boot in the file /etc/conf.d/modules but why in the heck do they not LOAD?

It's like it's there but refuses to work for some reason....

So I thought well maybe I was dumb and didn't check these off in the kernel menuconfig and nope no options to enable these so can't be that.

Now I'm thinking perhaps gentoo doesn't support my motherboard it's the CROSSHAIR IV FORMULA by Asus:
https://www.asus.com/ca-en/ROG-Republic-Of-Gamers/CROSSHAIR_IV_FORMULA/

But it's odd because the network drivers work fine for the live cd and I literally used it as a template so the modules should work fine for net.

I thought maybe I'm missing some firmware so I did an emerge of this:
Code:
emerge --ask sys-kernel/linux-firmware


Still same issue..

Going to keep trying went on Google looking for an answer couldn't find one and entries in the kernel log are not helpful :(

UPDATE:

I went through everything that I can think of and this thread is dead, with exhausting the irc channel, the forum and it's help, and Googles countless articles and over two weeks of absolute pain dealing with this I am waving the white flag I just can't take anymore Gentoo it has been a terrible experience but thank you everyone for your support. Bye everyone.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13865

PostPosted: Mon Jan 30, 2017 4:47 am    Post subject: Reply with quote

The "Loading from" messages are part of the initramfs, not the kernel. Your problem is that the initramfs is neither making progress nor asking the user for help. While it is possible that a kernel configuration error is contributing to your problem, I would look first at the initramfs. Boot with initramfs verbosity increased. I do not know how to do that with genkernel. I use a minimal initramfs customized to my needs.
Back to top
View user's profile Send private message
lillypad
n00b
n00b


Joined: 23 Jan 2017
Posts: 20

PostPosted: Wed Feb 01, 2017 3:11 am    Post subject: Reply with quote

Hello Everyone,

I'd like to confirm that the issue was not initramfs because I am able to enter the password for the drive. If I was unable to enter the password for the drive it would of been an issue with initramfs as initramfs contains a static compiled version of cryptsetup and or lvm2 and with the arguments passed to genkernel the initramfs was built with this support.

The issue at hand is the video kernel modules though it will hang on everything but video issues... and the /var/log/kernel.log is pretty much useless to aid in your discovery of what the real problem at hand is. So this is something that can trip almost anyone up.

There were several changes to many Linux kernels to use video drivers before X is loaded thus this is why the issue happens even if you do not have xorg-server installed yet:
Code:
"nomodeset - Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded."


The issue was with the video drivers, I was unable to boot because the kernel was trying to load a video driver for the card however one is not available that is supported so it decided to hang in the balance. Unfortunately this means for some people out there you may not be able to boot into the Live DVD's UI as it would appear the generic Nvidia drivers were not included however you can still get to a shell with the same method below.

The solution to get around this was to simply boot the system and once in grub press 'e' then modify this:
Code:
real_root=/dev/mapper/gentoo-root rootfstype=ext4 crypt_root=/dev/sda2 dolvm


To this:
Code:
real_root=/dev/mapper/gentoo-root rootfstype=ext4 crypt_root=/dev/sda2 dolvm nomodeset nox


Afterwards press F10 to boot and you will be greeted with the shell you were praying for the last two weeks.

I'm hoping someone could enter this into the general installation guide like:
Code:
If your installation hangs at Loading Modules try [insert what said here] or something.


To get this figured out it was not oddly not on the Gentoo forum but in this article from system-rescue-cd:
https://www.system-rescue-cd.org/forums/viewtopic.php?f=14&t=4663

Which led to obvious further investigation where I could choose the right parameters to boot.

So next step is on to the Nvidia Drivers and getting that going just fine after which I suspect I will be able to boot without the nomodeset and nox option and be greeted with a nice X session.

Again hope this helps someone out there because it surely threw me for a loop for like 2 weeks.

Cheers,

lillypad
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum