View previous topic :: View next topic |
Author |
Message |
ReemZ n00b
Joined: 08 Oct 2012 Posts: 7 Location: .nl
|
Posted: Mon Oct 08, 2012 10:50 pm Post subject: Man. config'd kernel won't boot, genkernel won't build mods. |
|
|
Hi all,
I've been using Sabayon for a year or five now and decided to take the plunge and try Gentoo.
I've got an old box dedicated to playing with distros and generally messing about, so I can break as much as possible without having to fear loss of data or anything.
Partitioning is as follows:
/dev/sda1: /boot (Sabayon kernels and initramfs only, grub2 stuffz)
/dev/sda2: swap
/dev/sda3: / (Sabayon)
/dev/sda5: PCLinuxOS (just to see if I could manage dual-booting two Linux distros)
/dev/sda6: Arch (out of curiosity and to see if tri-boot would work too)
/dev/sda7: Gentoo
sda1 is ext2, sda3-7 are ext4.
I've removed Grub Legacy from PCLOS and have not installed a bootloader in Arch as the SL Grub picks them all up nicely.
Now I've managed to extract the stage 3 tarball (amd64, of 17-9) and Portage snapshots (of 6-10 but synced afterwards) but I'm stuck on compiling the kernel and modules.
I've tried manual configuration and compilation, which seemed to've worked, left the chroot and had grub re-probe and re-write the config (grub.cfg as it's grub 2) and it did pick up the Gentoo kernel.
However, it wouldn't boot, the box just froze. Not sure if that's because of lack of an initramfs as I wasn't sure whether or not I had to create one when manually building a kernel.
Also tried the genkernel way (genkernel --menuconfig --no-mrproper --no-clean --save-config all) but that got stuck on building the modules. Config wasn't saved btw.
Did all from the Sabayon install, via ssh.
I did change Processor type and features ---> Processor family from Generic-x86-64 to Intel P4 / older Netburst based Xeon as per the info in /proc/cpuinfo (P4 and cpu family 15).
I've read the Handbook, the Quick Install Guide and KC11 - kernel compiling for the beginner, but I have to say I'm a bit confused.
If I read the Handbook and the QIG right, all should be done as root, however KC11 says kernel configuration and building should be done as user. Genkernel won't let me run it as user.
Some hardware info and logs:
Code: | # lsmod
Module Size Used by
ipv6 244158 32
radeon 699646 2
snd_hda_codec_realtek 44032 1
snd_hda_intel 20888 0
snd_hda_codec 67503 2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 4542 1 snd_hda_codec
snd_pcm 56407 2 snd_hda_codec,snd_hda_intel
snd_page_alloc 5925 2 snd_pcm,snd_hda_intel
snd_timer 14262 1 snd_pcm
snd 46367 6 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_hda_codec,snd_hda_intel
i2c_piix4 9056 0
microcode 10651 0
8139too 20648 0
pcspkr 1520 0
shpchp 20351 0
8139cp 15168 0
firewire_ohci 24056 0
pci_hotplug 8625 1 shpchp
firewire_core 38214 1 firewire_ohci
sha512_generic 4545 0
sha1_generic 1787 0
virtio_pci 6011 0
virtio_blk 5497 0
virtio_net 13035 0
virtio_console 13486 0
virtio_balloon 4011 0
virtio_ring 4658 5 virtio_blk,virtio_net,virtio_pci,virtio_balloon,virtio_console
virtio 3309 5 virtio_blk,virtio_net,virtio_pci,virtio_balloon,virtio_console
xts 2773 0
gf128mul 5338 1 xts
cryptd 6863 0
aes_x86_64 7340 0
sha256_generic 9549 0
iscsi_tcp 7676 0
tg3 117410 0
e1000 108578 0
fuse 56588 0
zfs 816172 0
zcommon 28284 1 zfs
znvpair 24477 2 zfs,zcommon
zavl 4187 1 zfs
zunicode 316738 1 zfs
spl 103567 5 zfs,zavl,zunicode,zcommon,znvpair
xfs 412647 0
nfs 221014 0
lockd 51657 1 nfs
auth_rpcgss 26280 1 nfs
nfs_acl 1983 1 nfs
sunrpc 145223 4 nfs,auth_rpcgss,lockd,nfs_acl
jfs 139905 0
reiserfs 206125 0
ext4 246369 1
jbd2 48809 1 ext4
ext3 107397 0
jbd 37438 1 ext3
ext2 53462 1
mbcache 4529 3 ext2,ext3,ext4
scsi_wait_scan 695 0
sl811_hcd 8919 0
hid_generic 1025 0
xhci_hcd 100882 0
ohci_hcd 24190 0
uhci_hcd 20386 0
ehci_hcd 44303 0
sx8 10965 0
imm 8661 0
parport 26727 1 imm
pata_pcmcia 9621 0
pcmcia 38968 1 pata_pcmcia |
Code: | # lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] nee ATI Radeon Xpress 200 Host Bridge (rev 01)
00:01.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI RS480 PCI Bridge
00:11.0 IDE interface: Advanced Micro Devices [AMD] nee ATI IXP SB400 Serial ATA Controller (rev 80)
00:12.0 IDE interface: Advanced Micro Devices [AMD] nee ATI IXP SB400 Serial ATA Controller (rev 80)
00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI IXP SB400 USB Host Controller (rev 80)
00:13.1 USB controller: Advanced Micro Devices [AMD] nee ATI IXP SB400 USB Host Controller (rev 80)
00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI IXP SB400 USB2 Host Controller (rev 80)
00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI IXP SB400 SMBus Controller (rev 82)
00:14.1 IDE interface: Advanced Micro Devices [AMD] nee ATI IXP SB400 IDE Controller (rev 80)
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI IXP SB4x0 High Definition Audio Controller (rev 01)
00:14.3 ISA bridge: Advanced Micro Devices [AMD] nee ATI IXP SB400 PCI-ISA Bridge (rev 80)
00:14.4 PCI bridge: Advanced Micro Devices [AMD] nee ATI IXP SB400 PCI-PCI Bridge (rev 80)
01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RC410 [Radeon Xpress 200]
02:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
02:06.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev 80) |
Code: | # cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping : 9
microcode : 0x3
cpu MHz : 3066.590
cache size : 1024 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips : 6117.72
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping : 9
microcode : 0x3
cpu MHz : 3066.590
cache size : 1024 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 0
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips : 6117.72
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management: |
/etc/fstab from within the chroot:
Code: | # /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
# /dev/sda1 /boot ext2 default,noatime 1 2
/dev/sda7 / ext4 noatime 0 1
/dev/sda2 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,users 0 0 |
/var/log/genkernel.log is a bit long, so I've chucked that into the SL pastebin
I have probably just overlooked something really simple but at this point I can't seem to figure out what.
If anyone could point me in the right direction, explain to me whether or not I need an initramfs when I build a kernel manually, and clear up the user/root kernel config and build confusion, I'd greatly appreciate it. |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Mon Oct 08, 2012 11:05 pm Post subject: |
|
|
Welcome to Gentoo!
You missed one very important website when configuring a kernel: http://kernel-seeds.org/ That should be enough to get a manually configured kernel working.
An initramfs is only needed if /var and /usr are separate partitions and you use udev > 180, or you have an encrypted root or root on lvm. If you wish, I can point you to an excellent source on rolling your own initramfs using busybox. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Mon Oct 08, 2012 11:19 pm Post subject: |
|
|
ReemZ,
Could you also wgetpaste ls -l /boot and the gentoo section of grub.cfg _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
ReemZ n00b
Joined: 08 Oct 2012 Posts: 7 Location: .nl
|
Posted: Mon Oct 08, 2012 11:31 pm Post subject: |
|
|
Dear god, those colours are awful! Seems like a heap of useful information though, thanks Doc.
I assume the info in the Linux-3.2.0 section is still relevant to later 3.x kernels, I'll read it tomorrow as it's rather late here now.
As for initramfs, I don't have /var or /usr on separate partitions atm nor do I use encryption or lvm, that's something I might play with in a later stadium. Step-by-step kinda thing
I could always bookmark that source you're referring to though, something to read when I'm in suck-in-info mode.
Bill I'll get that info in a minute, however I must tell you that grub.cfg will still point to the manually config'd and built kernel, where /boot will have the genkernel.
The two will therefore not match. |
|
Back to top |
|
|
ReemZ n00b
Joined: 08 Oct 2012 Posts: 7 Location: .nl
|
Posted: Mon Oct 08, 2012 11:35 pm Post subject: |
|
|
/boot/grub/grub.cfg, Gentoo section:
Code: | menuentry 'Gentoo Base System release 2.1' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-420f40de-8e2e-4cbe-bedb-b8479e54b2c4' {
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 420f40de-8e2e-4cbe-bedb-b8479e54b2c4
else
search --no-floppy --fs-uuid --set=root 420f40de-8e2e-4cbe-bedb-b8479e54b2c4
fi
linux /boot/kernel-3.4.9-gentoo root=/dev/sda7
}
submenu 'Advanced options for Gentoo Base System release 2.1' $menuentry_id_option 'osprober-gnulinux-advanced-420f40de-8e2e-4cbe-bedb-b8479e54b2c4' {
menuentry 'Gentoo Base System release 2.1 (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/kernel-3.4.9-gentoo--420f40de-8e2e-4cbe-bedb-b8479e54b2c4' {
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 420f40de-8e2e-4cbe-bedb-b8479e54b2c4
else
search --no-floppy --fs-uuid --set=root 420f40de-8e2e-4cbe-bedb-b8479e54b2c4
fi
linux /boot/kernel-3.4.9-gentoo root=/dev/sda7
}
} |
/boot within chroot:
Code: | # ls -l /boot/
total 4048
-rw-r--r-- 1 root root 2487120 Oct 8 20:40 kernel-genkernel-x86_64-3.4.9-gentoo
-rw-r--r-- 1 root root 1652163 Oct 8 20:40 System.map-genkernel-x86_64-3.4.9-gentoo |
|
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Mon Oct 08, 2012 11:40 pm Post subject: |
|
|
ReemZ wrote: | I could always bookmark that source you're referring to though, something to read when I'm in suck-in-info mode. |
certainly. Here is the short version of creating an initramfs: http://en.gentoo-wiki.com/wiki/Initramfs#Busybox I should warn you that it can get a bit involved. But If you need one, there is nothing superior to rolling your own in terms of support and knowing what is going on. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Tue Oct 09, 2012 12:12 am Post subject: |
|
|
ReemZ,
If you're not going to use an initramfs then you can't use the entry --fs-uuid --set=root 420f40de-8e2e-4cbe-bedb-b8479e54b2c4
I dual boot lmde and gentoo on this laptop from lmde. Here's my grub entry:
Code: | menuentry "Gentoo linux gentoo-sources (on /dev/sda7)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
echo 'Setting Linux'
set root='(hd0,msdos7)'
echo 'Booting Linux'
linux /boot/kernel root=/dev/sda7 rootfstype=ext3
}
|
Kernel is a symlink to the kernel image
Code: | laptop boot # ls -lh
total 6.0M
-rw-r--r-- 1 root root 2.1M Oct 6 22:46 System.map-3.4.9-gentoo
-rw-r--r-- 1 root root 79K Oct 6 22:46 config-3.4.9-gentoo
lrwxrwxrwx 1 root root 20 Oct 4 17:19 kernel -> vmlinuz-3.4.9-gentoo
-rw-r--r-- 1 root root 3.9M Oct 6 22:46 vmlinuz-3.4.9-gentoo
|
You might have some luck booting the kernel by modifying grub.cfg. _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
ReemZ n00b
Joined: 08 Oct 2012 Posts: 7 Location: .nl
|
Posted: Wed Oct 10, 2012 11:26 pm Post subject: |
|
|
Thank you very much for the help so far.
I've managed to emerge the 3.6.1 kernel and I've downloaded the appropriate .config from kernel-seeds.org, I've entered my lspci -n output (pasted below for reference) in the Device Driver Check & Report.
Pasting the output here gets messy so I've uploaded a screenie.
Code: | # lspci -n
00:00.0 0600: 1002:5a33 (rev 01)
00:01.0 0604: 1002:5a3f
00:11.0 0101: 1002:437a (rev 80)
00:12.0 0101: 1002:4379 (rev 80)
00:13.0 0c03: 1002:4374 (rev 80)
00:13.1 0c03: 1002:4375 (rev 80)
00:13.2 0c03: 1002:4373 (rev 80)
00:14.0 0c05: 1002:4372 (rev 82)
00:14.1 0101: 1002:4376 (rev 80)
00:14.2 0403: 1002:437b (rev 01)
00:14.3 0601: 1002:4377 (rev 80)
00:14.4 0604: 1002:4371 (rev 80)
01:05.0 0300: 1002:5a61
02:05.0 0200: 10ec:8139 (rev 10)
02:06.0 0c00: 1106:3044 (rev 80) |
Now I'm stuck on Device Drivers ---> Character Devices ---> Hardware Random Number Generator.
I can select Timer IOMEM, Intel, AMD and/or VIA, according to their help texts the choice depends on the type of main board, and both dmidecode and lshw tell me I have a Packard-Bell GA-8TRC410M-NF board. If built as modules the name would be timeriomem-rng, intel-rng, amd-rng or via-rng, the VIA one is selected to be built-in and as can be seen in abovementioned screenie, there's no mention of any -rng module. Googling on that mobo didn't provide me with an answer to my question so I'm simply gonna have to ask it here: which of those four, if any of those, do I select? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Oct 10, 2012 11:46 pm Post subject: |
|
|
Quote: | <*> Hardware Random Number Generator Core support
< > Timer IOMEM HW Random Number Generator support
< > Intel HW Random Number Generator support
< > AMD HW Random Number Generator support
< > VIA HW Random Number Generator support | just as pappy says works for me _________________ Defund the FCC. |
|
Back to top |
|
|
ReemZ n00b
Joined: 08 Oct 2012 Posts: 7 Location: .nl
|
Posted: Thu Oct 11, 2012 12:00 am Post subject: |
|
|
Ta mate, finished config and building now. Fingers crossed! |
|
Back to top |
|
|
ReemZ n00b
Joined: 08 Oct 2012 Posts: 7 Location: .nl
|
Posted: Thu Oct 11, 2012 2:38 am Post subject: |
|
|
Kernel and modules built succesfully, copied the kernel image to /boot, left the chroot and made sure the grub entry pointed to the right file, but it won't boot.
Handbook chapter 7.e has me at a bit of a loss as I'm not entirely sure if I should add anything to /etc/conf.d/modules and if so, what.
Nothing is added in the Sabayon and PCLOS versions of that file and Arch doesn't even have it.
Here's the output of the find command:
Code: | # find /lib/modules/3.6.1-gentoo/ -type f -iname '*.o' -or -iname '*.ko'
/lib/modules/3.6.1-gentoo/kernel/net/netfilter/xt_mark.ko
/lib/modules/3.6.1-gentoo/kernel/net/netfilter/xt_LOG.ko
/lib/modules/3.6.1-gentoo/kernel/drivers/hwmon/it87.ko
/lib/modules/3.6.1-gentoo/kernel/drivers/hwmon/hwmon-vid.ko
/lib/modules/3.6.1-gentoo/kernel/drivers/hid/hid-logitech-dj.ko
/lib/modules/3.6.1-gentoo/kernel/drivers/net/ethernet/realtek/8139cp.ko
/lib/modules/3.6.1-gentoo/kernel/drivers/net/ethernet/realtek/8139too.ko
/lib/modules/3.6.1-gentoo/kernel/drivers/char/kcopy/kcopy.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-ca0110.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-analog.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-via.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-si3054.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-cmedia.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-conexant.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-realtek.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-hdmi.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-idt.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-ca0132.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec.ko
/lib/modules/3.6.1-gentoo/kernel/sound/pci/hda/snd-hda-codec-cirrus.ko
/lib/modules/3.6.1-gentoo/kernel/sound/core/snd-hwdep.ko
/lib/modules/3.6.1-gentoo/kernel/sound/core/snd-page-alloc.ko
/lib/modules/3.6.1-gentoo/kernel/sound/core/snd-pcm.ko
/lib/modules/3.6.1-gentoo/kernel/sound/core/snd-timer.ko
/lib/modules/3.6.1-gentoo/kernel/arch/x86/kernel/test_nx.ko |
I've also compared entries in grub.cfg to see what boot options I might have to add but no two entries look alike so I'm a bit at a loss here.
Perhaps someone could have a look at the whole thing and give me a pointer or two.
For completeness, my kernel configuration, there could well still be something I've missed. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Oct 11, 2012 2:42 am Post subject: |
|
|
add anything to /etc/conf.d/modules -- don't bother with this step -- udev will handle
will look at pastes
pastes look ok (except pastebin.sabayon.org cut off bottom half of configuration) _________________ Defund the FCC. |
|
Back to top |
|
|
ReemZ n00b
Joined: 08 Oct 2012 Posts: 7 Location: .nl
|
Posted: Thu Oct 11, 2012 4:16 am Post subject: |
|
|
Ta mate
DONAHUE wrote: | pastebin.sabayon.org cut off bottom half of configuration |
Grr! Good thing it lets me upload files as well |
|
Back to top |
|
|
|
|
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
|
|