Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cannot boot with manual kernel or genkernel
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
costis
n00b
n00b


Joined: 14 Oct 2014
Posts: 12

PostPosted: Tue Dec 19, 2017 1:44 am    Post subject: [SOLVED] Cannot boot with manual kernel or genkernel Reply with quote

About 10 years ago, I installed gentoo using genkernel without any problems.
I only lasted for a couple of months though, because I, eventually, got tired with the USE flags.
Now, I am wiser and want to try gentoo again. 8)


I follow the handbook but I cannot boot it.
Since my initial systemd approaches failed, I am fine to go with OpenRC for the moment.
I install gentoo on /dev/sdb1 through Sabayon as a host system of a Lenovo Z70 laptop.

I have tried with both Manual Kernel Configuration and Genkernel but both fail with different messages, which I show on imgur.

Booting with Manual Kernel configuration throws a cryptic
Code:
0000:04:00.0 BAR 6: no space for [mem size 0x00080000 pref]
0000:04:00.0 BAR 6: failed to assign [mem size 0x00080000 pref]


Booting with Genkernel says:
Quote:
Could not find the root block device in UUID


This gist contains the .config for the Manual Kernel configuration (follows the Handbook) and the lspci -vvv.
Do you have any ideas to fix either of the problems?

For the installation, I follow these steps:

Code:

#!/bin/bash
sudo bash

# mkfs.ext4 /dev/sdb1 ! comment this line plz... accidental copy/paste hurts. :S
mount /dev/sdb1 /mnt/gentoo
cd /mnt/gentoo
cp /home/USERNAME/Downloads/stage3-amd64-20171215T184104Z.tar.bz2 /mnt/gentoo
tar xvjpf stage3-amd64-20171215T184104Z.tar.bz2  --xattrs --numeric-owner
nano -w /mnt/gentoo/etc/portage/make.conf
# CFLAGS="-march=native -O2 -pipe"
# MAKEOPTS="-j4"
mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
mkdir --parents /mnt/gentoo/etc/portage/repos.conf
cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
mount --types 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
test -L /dev/shm && rm /dev/shm && mkdir /dev/shm
mount --types tmpfs --options nosuid,nodev,noexec shm /dev/shm
chmod 1777 /dev/shm
ls -lha /dev/shm
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) ${PS1}"

# Configuring Portage
emerge-webrsync
emerge --sync
eselect profile list
eselect profile set 12
# eselect profile set 16
emerge --ask --update --deep --newuse @world
emerge --info | grep ^USE

# Configure locales
nano -w /etc/locale.gen
locale-gen
eselect locale list
eselect locale set 4
env-update && source /etc/profile && export PS1="(chroot) $PS1"

# Installing the sources
emerge --ask sys-kernel/gentoo-sources
# emerge --ask sys-kernel/gentoo-sources sys-kernel/genkernel && genkernel all
ls -l /usr/src/linux

# # Default: Manual configuration
# emerge --ask sys-apps/pciutils
# cd /usr/src/linux
# make menuconfig
# # make xconfig
# make -j4 && make -j4 modules_install
# make install
#
# # Configure your kernel and boot
# emerge --ask sys-kernel/genkernel
# genkernel --install initramfs
# # genkernel --lvm --mdadm --install initramfs
# ls /boot/initramfs*

# Alternative: Using genkernel
emerge --ask sys-kernel/genkernel && genkernel --kernname=GenKernel all
# * Kernel compiled successfully!
# *
# * Required Kernel Parameters:
# *     root=/dev/$ROOT
# *
# *     Where $ROOT is the device node for your root partition as the
# *     one specified in /etc/fstab
# *
# * If you require Genkernel's hardware detection features; you MUST
# * tell your bootloader to use the provided INITRAMFS file.
#
# * WARNING... WARNING... WARNING...
# * Additional kernel cmdline arguments that *may* be required to boot properly...
# * With support for several ext* filesystems available, it may be needed to
# * add "rootfstype=ext3" or "rootfstype=ext4" to the list of boot parameters.

ls /boot/kernel* /boot/initramfs*
# /boot/initramfs-GenKernel-x86_64-4.12.12-gentoo  /boot/kernel-GenKernel-x86_64-4.12.12-gentoo

emerge --ask sys-kernel/linux-firmware
#  * None of the installed packages claim the file(s).
#  *
#  * Package 'sys-kernel/linux-firmware-20170314' merged despite file
#  * collisions. If necessary, refer to your elog messages for the whole
#  * content of the above message.

# Filesystem information
blkid
nano -w /etc/fstab
# 43413173-0776-47cf-b1a7-737b95508f80
# /dev/sdb1               /               ext4            noatime         0 1

nano -w /etc/conf.d/hostname
# Set the hostname variable to the selected host name
# hostname="myhostname"

nano -w /etc/hosts
# left as is

# System information
passwd

nano -w /etc/rc.conf
# left as is
nano -w /etc/conf.d/keymaps
# left as is
nano -w /etc/conf.d/hwclock
# left as is

# System logger etc.
emerge  app-admin/sysklogd && rc-update add sysklogd default && emerge  sys-process/cronie && rc-update add cronie default && emerge  sys-apps/mlocate && rc-update add sshd default && emerge  sys-fs/e2fsprogs && emerge sys-fs/btrfs-progs
# nano -w /etc/inittab
   
# Networking tools
emerge  net-misc/dhcpcd && emerge  --verbose sys-boot/grub:2
grub-install /dev/sdb
grub-mkconfig -o /boot/grub/grub.cfg

# Rebooting the system
exit
cd
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -R /mnt/gentoo
reboot


Last edited by costis on Fri Dec 22, 2017 4:34 am; edited 2 times in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Tue Dec 19, 2017 2:28 am    Post subject: Reply with quote

The install with the "cannot find root UUID" error usually means your kernel is missing drivers - either for the filesystem, disk drive driver, controller driver, or bus driver for the disk controller. This error is coming from an initramfs, which I don't see your grub.cfg for... There should be somewhere in your grub.cfg

linux /path/to/your/kernel root=UUID=52ce8f01-8b7b-4d96-8627-cc3634dac242
initrd /path/to/your/initramfs

Also ensure this UUID is correct for your root partition. You can use 'blkid' on a livecd to see what UUIDs are available for your system.

The BAR address failure is kind of weird, both kernels should have given the same error as this is a PnP issue. I don't think this would kill your boot unless this is the disk drive controller your root filesystem is upon. If all else fails, you could try resetting your pnp data in BIOS and see if it's any better or not.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Tue Dec 19, 2017 1:28 pm    Post subject: Reply with quote

costis,

Post your lspci output and put your manual kernel .config file on a pastebin site.
Then we can check if your kernel matches your hardware.

To boot without an initrd, you must use root=/dev/.. or root=PARTUUID=
An initrd is required for UUID or LABEL as they are properties of a filesystem.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
costis
n00b
n00b


Joined: 14 Oct 2014
Posts: 12

PostPosted: Tue Dec 19, 2017 9:06 pm    Post subject: Reply with quote

NeddySeagoon wrote:
costis,

Post your lspci output and put your manual kernel .config file on a pastebin site.


Thanks, I also try t figure out what happens.

Yes, I linked both of them in the original post: https://gist.github.com/costis-t/f41894ae00ce7a8b6eefd720ec102643

I also include the .config and the output of lspci -vvv on https://pastebin.com/ntn1rPB4 and https://pastebin.com/Cdq1kGgb
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Tue Dec 19, 2017 9:37 pm    Post subject: Reply with quote

costis,

You have a
Code:
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)

Almost nothing works without the kernel driver, which in missing.

Code:
# CONFIG_INTEL_MEI is not set
# CONFIG_INTEL_MEI_ME is not set


You need partition tabe drivers. Thats good
Code:
CONFIG_MSDOS_PARTITION=y
CONFIG_EFI_PARTITION=y


Then you need your block device drivers
Code:
# CONFIG_IDE is not set
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_ATA=y
so far so good.

Code:
00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03) (prog-if 01 [AHCI 1.0])
    Subsystem: Lenovo Wildcat Point-LP SATA Controller [AHCI Mode]

Everything needed to boot must be =y.
Code:
CONFIG_SATA_AHCI=m
This is the driver for your SATA chip set. Its a loadable module, root needs to be mounted to load the module needed to mount the root filesystem.

Then you need the filesystem drivers. That's good.
Code:
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_ENCRYPTION is not set
# CONFIG_EXT4_DEBUG is not set


That's three changes in menuconfig and a kernel rebuild/reinstall. Then on to your next Gentoo learning opportunity.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
costis
n00b
n00b


Joined: 14 Oct 2014
Posts: 12

PostPosted: Wed Dec 20, 2017 2:46 am    Post subject: Reply with quote

Dear NeddySeagoon and eccerr0r,

Thanks for your support and care.

Yes, the UUID I mention is the correct one and I have verified it with blkid. I have also tried to use "root=PARTUUID=". When I do not use an initrd I use "root=/dev/sdb1" in GRUB2.

NeddySeagoon wrote:
That's three changes in menuconfig and a kernel rebuild/reinstall. Then on to your next Gentoo learning opportunity.


I have tried building from gentoo-sources and the vanilla kernel 4.14.7 using the .config from Sabayon (from its /proc/), implementing NeddySeagoon's changes, and some combinations of them as follows:

    1. I copy the say .config-with-changes-by-NeddySeagoon to /usr/src/linux/.config
    2. Run make clean && make menuconfig
    3. Load the .config-with-changes-by-NeddySeagoon verify its loaded correctly inside menuconfig and save it again as .config.
    4. Run make -j4 && make -j4 modules_install && make install && grub-mkconfig -o /boot/grub/grub.cfg

However, nothing seems to work.

Compiling vanilla 4.14.7 throws a "kernel panic - not syncing: VFS: Unable to mount root on unknown-block(0,0)" which rings some bells of wrong GRUB2 installation but I installed it correctly without error messages... pff...
Compiling from gentoo-sources does not panic, but I get a "Could not find the root block deice in UUID=..." as previously.

I have uploaded:
If nothing else comes to mind to solve the problem, I will install gentoo from scratch again for the 5th time, tomorrow.
People say "Repetition is the mother of learning", anyway... hahaah :)
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Dec 21, 2017 4:24 pm    Post subject: Reply with quote

Neddy said: Everything needed to boot must be =y.
Code:
CONFIG_SATA_AHCI=m
This is the driver for your SATA chip set. Its a loadable module, root needs to be mounted to load the module needed to mount the root filesystem.
Your config-with-changes-by-NeddySeagoon needs to be edited per his hint so that it includes:
Code:
CONFIG_SATA_AHCI=y
and the kernel recompiled, reinstalled, and booted.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Thu Dec 21, 2017 4:32 pm    Post subject: Reply with quote

costis,

Don't reinstall. It won't fix anything and its a waste of time.

You only made two of the three changes I pointed out. You must make all three.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
costis
n00b
n00b


Joined: 14 Oct 2014
Posts: 12

PostPosted: Fri Dec 22, 2017 4:31 am    Post subject: Reply with quote

NeddySeagoon wrote:
Don't reinstall. It won't fix anything and its a waste of time.

Yes, it makes sense, but I reinstalled anyway. I know the installation steps almost by heart now. :)

At one point, I needed to append "rootfstype=ext4" to the kernel parameters.
I didn't manage to boot without an initramfs, but perhaps I 'll investigate this in the future.
Now, I have also migrated to systemd with no problems so far, using genkernel-next for the initramfs.

Last time I was compiling a kernels was about 10-15 years ago. Oh boy, so many options now! It was really easy back then.
Anyway; also, thanks for your support to everybody (~40k posts!!!)
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