Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't install correct kernel option for docker
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
malcolmmaya
n00b
n00b


Joined: 30 Oct 2017
Posts: 43

PostPosted: Wed Nov 22, 2017 3:14 pm    Post subject: Can't install correct kernel option for docker Reply with quote

I'm trying to get Docker on my machine but I keep on failing :(

When I select the kernel options as in here, then I rebuild my kernel using make, then make_modules and finally make install. That all goes well but when I restart my session, I only have one resolution for the screen which isn't my native resolution. I also think I don't have any network configuration anymore.

My only solution then is to use
Code:
genkernel all
to recompile the kernel :(.

I'm using the kernel 12.12. Any solution to get docker to work :/?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Wed Nov 22, 2017 3:18 pm    Post subject: Reply with quote

You can run genkernel with --menuconfig option for select correct config in kernel
Code:
# genkernel --menuconfig all

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Nov 22, 2017 3:31 pm    Post subject: Reply with quote

make_modules ?

Typo?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Nov 22, 2017 3:47 pm    Post subject: Reply with quote

Maybe I've been doing an extra step for 20 years or so. I do:
Code:

make menuconfig
mount /boot
make && make modules && make modules_install && make install
grub-mkconfig > /boot/grub/grub.cfg


And, if I'm doing this on a remote machine, I do it inside of tmux with top running in a nearby pane. Using tmux allows me to disconnect from the session -- voluntarily or accidentally -- and then reconnect later. Locally I do it that way because I'm used to tmux. Pretty much every terminal I use has it running. And that way if I get happy with the mouse and close the wrong terminal I still have my compile working.
Back to top
View user's profile Send private message
malcolmmaya
n00b
n00b


Joined: 30 Oct 2017
Posts: 43

PostPosted: Wed Nov 22, 2017 3:53 pm    Post subject: Reply with quote

Yes it was
Code:
make modules_install
that was indeed a typo :). I'm trying again with genkernel before choosing the options.

I'll try the other options if that doesn't work. Thanks a lot for you help, keeping y'all updated

_____

EDIT: genkernel with menuconfig lead to the same result as before when I sellected what was needed for docker :(. I have an unknown display and only 640x480 is available

____
EDIT2: configuring grub2 to after didn't solve the problem either :(
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Nov 22, 2017 5:43 pm    Post subject: Reply with quote

Actually I have a couple extra things I do to simplify configuration. People have commented that what I do is convoluted, but it works well for me.

My kernel sources, of course, go to /usr/src/ by default. As usual, you get multiple kernel sources after awhile.

Code:

root@spidermonkey /usr/src
# ll
total 40K
drwxr-xr-x  7 root root 4.0K Nov  6 14:49 .
drwxr-xr-x 12 root root 4.0K Aug  4  2015 ..
-rw-r--r--  1 root root    0 Jul 30  2015 .keep
lrwxrwxrwx  1 root root   27 Nov  6 14:45 linux -> /usr/src/linux-4.12.12-gentoo
drwxr-xr-x 25 root root 4.0K Nov  6 14:16 linux-4.12.12-gentoo
drwxr-xr-x 22 root root 4.0K Nov  4 18:38 linux-4.12.12-g-k1
drwxr-xr-x 22 root root 4.0K Nov  6 14:16 linux-4.12.12-g-k2
drwxr-xr-x  3 root root 4.0K Nov  6 14:54 linux-4.12.12-g-k3
drwx------  2 root root  16K Oct  1  2015 lost+found
lrwxrwxrwx  1 root root   20 Sep 14 13:04 master -> linux-4.12.12-gentoo
lrwxrwxrwx  1 root root   27 Nov  6 14:45 next -> /usr/src/linux-4.12.12-g-k3
lrwxrwxrwx  1 root root   27 Nov  4 18:40 previous -> /usr/src/linux-4.12.12-g-k2


The 'linux' symbolic link is the customary purpose.
The 'master' symbolic link points to the downloaded source I intend to use for the next build. Usually the same as 'linux'
The 'next' symbolic link points to the working build directory for the next kernel to be compiled.
The 'previous' symbolic link points to the one I used for the most recent built kernel.

I have a script called "kernel-setup" which is here:
Code:

#!/bin/bash

if [[ $# != 1 ]];then
        echo "Usage: kernel-setup k2"
        exit 1
fi

MASTER=$(readlink -e "/usr/src/master")
echo "Base kernel directory is $MASTER"
LBSD=${MASTER/gentoo/g}
echo $LBSD
SUFFIX="$1"
NKSD="$LBSD-$SUFFIX"

# Remove previous

NEXT='/usr/src/next'
PREVIOUS='/usr/src/previous'

if [ -e "$NEXT" ];then
        echo "$NEXT exists"
        if [ -e "$PREVIOUS" ];then
                echo "$PREVIOUS exists"
                if [ -L "$PREVIOUS" ];then
                        echo "Removing $PREVIOUS link"
                        rm -f $PREVIOUS
                else
                        echo "$PREVIOUS is not a symbolic link!"
                        exit 1
                fi
        fi

        if [ -L "$NEXT" ];then
                echo "Moving $NEXT to $PREVIOUS"
                mv $NEXT $PREVIOUS
        else
                echo "$NEXT is not a symbolic link!"
                exit 2
        fi
fi

echo "Creating $NKSD"
mkdir $NKSD
$MASTER/scripts/mkmakefile $MASTER $NKSD
cd /usr/src

echo "Marking $NKSD as 'next'"
ln -s $NKSD $NEXT
cd $NKSD
pwd
zcat /proc/config.gz > .config


I use kernel suffixes per build, which is the reason for the argument for the above script.

This script uses the 'master' as sources and puts all build products in the new work directory. Builds I make have /usr/src/linux-<version>-g-k# format. I change 'gentoo' to 'g' and then add my suffix that is then configured into the kernel by you.

Now, finally I have a script called kcheck:
Code:

#!/bin/bash

echo "Watched:"
cat .config \
| grep -f /root/kernel.grepf \
| grep -vf /root/kernel.grepv

echo "Not Found:"
cat .config \
| grep -Lf /root/kernel.grepf


I keep two files in /root/kernel.grepf and /root/kernel.grepv which have kernel options I need to have configured a certain way for the current host.

kernel.grepf looks like this:
Code:

CONFIG_64BIT\>
CONFIG_9P_FS\>
CONFIG_9P_FS_POSIX_ACL\>
CONFIG_BRIDGE_EBT_MARK_T\>
CONFIG_BRIDGE_EBT_T_NAT\>
CONFIG_BRIDGE_EBT_VLAN\>
CONFIG_BRIDGE_NF_EBTABLES\>
CONFIG_COMPILE_TEST\>


It contains all the kernel options I want to check with my script.

kernel.grepv looks like this:
Code:

CONFIG_64BIT=y
CONFIG_9P_FS_POSIX_ACL=y
CONFIG_9P_FS=y
CONFIG_BRIDGE_EBT_MARK_T=y
CONFIG_BRIDGE_EBT_T_NAT=y
CONFIG_BRIDGE_EBT_VLAN=y
CONFIG_BRIDGE_NF_EBTABLES=y
CONFIG_COMPILE_TEST=y
CONFIG_DCA=y
CONFIG_DM_MULTIPATH=y


So anything I'm not interested in is filtered out by grepf, and then anything whose value is not what I want is printed as output of grepv.

I cd to /usr/src/next, then run kcheck. The version suffix always prints, so I check that. Otherwise, the only things that print are things which are not configured the way I want.
Back to top
View user's profile Send private message
malcolmmaya
n00b
n00b


Joined: 30 Oct 2017
Posts: 43

PostPosted: Wed Nov 22, 2017 7:25 pm    Post subject: Reply with quote

Well I'll look at that tomorrow. And now I'm stuck with that kernel that do not detect my screen and give me the wrong resolution. I'm at a loss with what to do to solve this, and using old config files doesn't seem to work :/
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Nov 22, 2017 7:35 pm    Post subject: Reply with quote

For sake of simplicity, make invoked without specifying the target does make bzImage and make modules.

I personally do not do make install, I copy the image over by hand, it has always the same name and I do not have to reconfigure the bootloader afterwards.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Nov 22, 2017 10:33 pm    Post subject: Reply with quote

Jaglover wrote:
For sake of simplicity, make invoked without specifying the target does make bzImage and make modules.

I personally do not do make install, I copy the image over by hand, it has always the same name and I do not have to reconfigure the bootloader afterwards.


I've made too many broken kernels to trust that approach. I keep at least 3 active, two working kernels and one test kernel. Sometimes the thought-to-be-working one has some secret time bomb I didn't think to test before deciding it was good.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Nov 23, 2017 8:03 pm    Post subject: Reply with quote

That's been my method for a long time too: `make install` manages the /boot/vmlinuz{,.old} symlinks automatically for me, and every so often I run `for i in config System.map vmlinuz; do cp -L /boot/$i{,.good}; done` manually. I have the default bootloader entry set to vmlinuz.good and use the oneshot feature in lilo/efibootmgr to boot into vmlinuz after an update.

It may sound like overkill, but when you're dealing with headless or remote systems it pays off.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Nov 23, 2017 8:20 pm    Post subject: Reply with quote

1clue wrote:
Jaglover wrote:
For sake of simplicity, make invoked without specifying the target does make bzImage and make modules.

I personally do not do make install, I copy the image over by hand, it has always the same name and I do not have to reconfigure the bootloader afterwards.


I've made too many broken kernels to trust that approach. I keep at least 3 active, two working kernels and one test kernel. Sometimes the thought-to-be-working one has some secret time bomb I didn't think to test before deciding it was good.

I never said I have no backup kernel. Actually I always keep a known good one. :)
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
malcolmmaya
n00b
n00b


Joined: 30 Oct 2017
Posts: 43

PostPosted: Sat Nov 25, 2017 7:22 pm    Post subject: Reply with quote

Ok so I found the change that ruined my display:

Code:

 CGROUP_DEBUG n -> y
 CGROUP_HUGETLB n -> y
 CGROUP_NET_PRIO n -> y
 CGROUP_PIDS n -> y
 CRYPTO_DH n -> y
 ENCRYPTED_KEYS n -> m
 IP_NF_NAT n -> m
 KEY_DH_OPERATIONS n -> y
 NETFILTER_XT_NAT n -> m
 NETFILTER_XT_TARGET_NETMAP n -> m
 NETFILTER_XT_TARGET_REDIRECT n -> m
 NET_L3_MASTER_DEV n -> y
 NF_NAT_MASQUERADE_IPV4 n -> m
 NF_NAT_REDIRECT n -> m
 OVERLAY_FS n -> y
 PERSISTENT_KEYRINGS n -> y
+CRYPTO_KPP y
+IPVLAN m
+IPVTAP n
+IP_NF_TARGET_MASQUERADE m
+IP_NF_TARGET_NETMAP m
+IP_NF_TARGET_REDIRECT m
+NET_VRF n
+OVERLAY_FS_REDIRECT_DIR n


Not sure what happens here that made my display not being detected anymore :S. But I've inverted all those and now it's all good again :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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