Gentoo Archives: gentoo-user

From: Harry Putnam <reader@×××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: kernel choices for booting gentoo as guest in vbox vm
Date: Fri, 02 Feb 2018 04:22:26
Message-Id: 87lggcaunf.fsf@local.lan
In Reply to: Re: [gentoo-user] Re: kernel choices for booting gentoo as guest in vbox vm by David Haller
1 David Haller <gentoo@×××××××.de> writes:
2
3 [...]
4
5 >>I've never used genkernel, but from what I understand it builds
6 >>everything + the kitchen sink.. so should get the right drivers
7 >>hopefully.
8 >
9 > Actually no, you can quite easily configure it to just the tedious
10 > work.
11
12 First, thanks for the cogent and helpful post.
13
14 Now about the statements above.
15
16 Its hard to tell what you mean there. I said I figured since genkernel
17 builds so much stuff, its a good chance I will have the stuff I need
18 to get booted.
19
20 You start by saying `Actually no,' so do you mean there is a pretty good
21 chance I will NOT get the drivers I need? If so, then I may be wasting
22 my time with genkernel.
23
24 Or were you just saying that if you configure genkernel correctly you
25 can keep it from creating so much unneded junk?
26
27
28 > Currently I use this:
29 >
30 > 1. install new kernel sources (in my case vanilla-sources)
31 > 2. copy over old config from last source tree, /boot/, /proc/config.gz
32 > whatever
33 > 3. run 'make oldconfig'
34 > 4. optionally note down some new options and then checkup on them using
35 > 'make menuconfig' and searching for the noted options
36 > it's this step I want to be able to do why I configured genkernel as
37 > I did (see below)
38 > 5. run 'genkernel --kerneldir=. all', but note config below!
39 > 6. check /boot/ and /boot/grub*/ if all went right
40 > 7. recompile neccessary out-of-tree drivers like e.g.
41 > x11-drivers/nvidia
42 > 8. done
43 >
44 > If I just reconfigure, I start at step 4, change the localversion too
45 > in menuconfig. If something breaks, I run 'make clean', save config
46 > and run 'make mrproper' restore config, etc.
47
48 That is a nice walk thru... I can't say I understand all of it, and
49 currently I have a genkernel compile running... (It seems to take a
50 really long time to complete) So probably it'll be tomorrow.
51
52 Nice to see. Lots of it is default.
53
54 I think I would like to have a look at /usr/src/linux/.confg if that
55 is not getting too snoopy. I realize it will not be the same as mine
56 but what is
57
58 > ==== delcomments /etc/genkernel.conf ====[1]
59 > OLDCONFIG="no"
60 > MENUCONFIG="no"
61
62 [...]
63
64 > Of course you must adapt the options for your needs, esp. those for
65 > the initrd if you boot from e.g. a md-device and some such.
66 >
67 > I don't actually use the generated initrd, but having them in /boot
68 > with less that 3MB in my case is ok and might come in handy when
69 > something fails.
70
71 I have'nt used an initrd for at least 15 yrs. So all pretty much like
72 new stuff.
73
74 > For me, this has worked nicely the last years. Esp. generating the
75 > grub1 entries and handling the symlinks to the current and last
76 > kernel, initrd and System.map works flawlessly[2].
77
78 OK, that sounds comforting, and promising
79
80 [...]
81
82
83 > [2] ok, if you manually prune versions from the middle, you'll need to
84 > set the .old symlinks back to an older version (or the current?),
85 > haven't checked that yet, but setting it to the previous remaining
86 > version works nicely.
87 >
88 > I still haven't checked too, if you could have this setup:
89
90 No, not like that... In this case there has been no OS before. This a
91 fresh install after a hiatus from gentoo of about a year. I did run
92 gentoo for 4-5 yrs awhile back..
93
94 I've been running primarily openindiana (x86 solaris-11* ish, powered
95 by illumos) I like that zfs file system. But also have kept my home
96 mail setup on Debian. I've tinkered fairly extensively with `lubuntu'
97 (Notice the `el'(l) in front... supposed to indicate a lightish version of
98 ububtu) It defaults to the lxde desktop which I like a lot too.
99
100 >
101 > title=Gentoo current kernel
102 > root (hd0,1)
103 > kernel /boot/kernel OPTIONS...
104 > [initrd /boot/initramfs]
105
106
107 I also see you are using legacy grub. I moved to grub2 some 5-6 mnths
108 ago. But not on Openindiana
109
110
111 > and that new versioned entries would be put at the "HERE" or at the top.
112 >
113 > I marked the 'initrd' stuff as optional with the [], as I don't use
114 > an initrd.
115
116 I'm not really sure how blend your approach into grub2 but I could
117 drop back to legacy grub
118
119 > And maybe some other boot options (e.g. for another distro or Winders)
120 > sprinkled in at some location.
121 >
122 > Anyway, generally genkernel is a great help and occasionally
123 > pruning/reordering entries in the grub1 /boot/grub/menu.lst is easy,
124 > just delete/move stuff around with $EDITOR :)
125 >
126 > I never understood why grub2 chucked out the major advantage grub1 had
127 > over lilo: not needing to re-install the boot-sector / stage1 of the
128 > bootloader after every change to the config... Beats me still today.
129 > Which is why I continue to use grub1, which can do all I need (and
130 > more) just nicely. Thank you very much.
131
132 Some of the debian based OSs' out there do not make that too
133 easy... (staying with grub1) But it seems easily done in gentoo.
134
135 Thanks again for the helpful post.