Kernel rebuilding first time ...
Hi.
I started with this guide from Bruce Hill : http://slackwarebox.com/resources/2.6-kernel-build.txt I went through all steps in this guide but after reboot i got black screen. So i guess i was missing something. I read the guide again and again and found some points i don`t understand. Before i started to build new kernel i got in /boot : 1. system map pointing to my generic-smp kernel System.map -> System.map-generic-smp-2.6.21.5-smp 2.config file pointing to my config-generil-smp config -> config-generic-smp-2.6.21.5-smp 3. the kernel vmlinuz -> vmlinuz-generic-smp-2.6.21.5-smp 4. initrd-tree was install with generic-smp kernel. After all process of building kernel i got 1. New system.map i was copy from new kernel directory. No questions here. 2.The same config file i got before. Here i am not sure. Where new config file? I didn't get it from the guide. So my config file still pointing to : config -> config-generic-smp-2.6.21.5-smp 3.The new kernel - linux-2.6.24.4 . It's here in /boot. i got it from arch/i386/boot/bzImage. Interesting, why it's in this directory? Every time i build new kernel it's going there? 4. initrd. Not sure if i have to change anything here. Is the new kernel use it? If yes, i can leave it in my grub menu unchanged? A lot of question, but we talking here about some important stuff. :) Thanks. |
Hey din,
Here are some answers. And yes, your questions are important. Forgive me for one thing ... Slackware by default uses LiLO as the boot loader. LILO is the most used Linux Loader for the x86 flavor of Linux. Therefore, my guide assumes LiLO as the bootloader, and my answers will, also. Since you choose to use GrUB, you will need to translate this information to GrUB. I never could get the hang of GrUB when I first started using Linux. Q1: The System.map file is generated to document addresses of all kernel symbols. The default location for it is /boot, though if you don't copy it there, the kernel will find it anyway. Q2: The .config file for the new kernel is still in the directory where you built it. If you desire to copy it to /boot, that is fine. It's not necessary to have it there, just personal preference. Since I know where I build all my kernels (~/kernel/linux-version/), it has been my preference not to copy it to /boot. If you'd like it there, you may copy it there. On my workstation, I backup all my important files to ~/config-files/ and every night all our PC's home directories are backed up to our server via cron job. After building my kernel, I copy the .config file to that directory. At the moment I have two files in there: Code:
mingdao@silas:~$ ls -1 config-files/2.6.24.4-config-* Code:
cp .config /boot/config-2.6.24.4 ; ln -sf /boot/config-2.6.24.4 /boot/config Q3: The newly built kernel will be located at arch/$(SUBARCH)/boot/bzImage, and the default path for it is /boot. In /etc/lilo.conf you have a line like this: Code:
boot = /dev/sda Code:
image = /boot/vmlinuz-generic-smp-2.6.24.4-smp Q4: This depends upon whether or not you need an initrd (initial ramdisk image). In Slackware /boot/README.initrd will tell you about this. Basically, if you have support for your / (root) filesystem built into the kernel (not as a module), and support for the drive containing your kernel, you will not need an initrd. There are exceptions, such as my LUKS encrypted root partition. On my workstation: I am running JFS for my / (root) filesystem and the motherboard has a VIA VT6420 SATA RAID Controller where the SATA drive containing Slackware is attached. Therefore it needs JFS for the filesystem and SATA_VIA for my hard drive. I have a choice to either (a) build JFS and SATA_VIA as modules and make an initrd image, or (b) build them into the kernel. Either one is acceptable, so long as the kernel in /boot as the support for them or you have an initrd to load them. When you edit /etc/lilo.conf (the LiLO configuration file), the boot= directive in /etc/lilo.conf tells LiLO where it should place its primary boot loader. Either the MBR (master boot record) of a hard drive accessible by the BIOS, or the root partition of your Linux OS is acceptable (but not only). When you boot your Slackware system, LiLO loads the kernel, then the kernel mounts the / (root) filesystem and runs /sbin/init. Therefore, you must have the drivers for your / (root) filesystem either in the kernel or in an initrd image. Probably the black screen is due to not having console display driver support in the kernel. Do you have FRAMEBUFFER_CONSOLE=y in your new kernel? These are my choices: Code:
# Console display driver support |
Hi, Bruce.
Thank you! Your answers is very helpfull. I will take my time, try check everything again and post the resalts. . |
Hi, Bruce.
After some tinkering with "Console display driver support" options i got my screen after boot. But, i got kernel panic with "No kernel modules found" . After some research i tried to run mkinitrd again with new kernel options. Now i get : Mount : mounting /dev/sda5 on /mnt failed. Error: no /sbin/init found on rootdev (or not mounted) Kernel panic. To tell you the truth, i have no idea how to continue from here. Maybe you have a clue? :) Thanks in advance. PS. I don't like to give up... :) |
Hey, I don't give up, either. If so, this box would be running Windoze eXPeriment. ;)
Bask in one victory ... have don't have a black screen! Error: Code:
Mount : mounting /dev/sda5 on /mnt failed. Let me go out on a limb, from some experience here, and take some guesses and offer suggestions. From looking at other posts you've made, it seems you have an Intel chipset. Since it is mounted on /dev/sda5 with a kernel with a lot of modules, it is probably a Serial-ATA (SATA) drive. Now your new kernel might be assigning it to /dev/hda5, which is not in your /etc/fstab file. First, try adding "hda=noprobe" to the kernel boot command in grub. If it will boot, then I'm on the right path. If so, my recommendation would be to change some options in your kernel. From the Slackware kernel which works, please post the output of: Code:
/etc/fstab Note to self: should his controller use libata ATA_PIIX driver |
If Bruce Hill's advice doesn't work, an obvious possibility is that your initrd was not created (or created incorrectly, or specified incorrectly in /etc/lilo.conf [well, actually, since you use GRUB, it would be incorrectly specified in /boot/grub/menu.lst]). I would recommend building the filesystem used for your root partition into the kernel instead of as a module, if you haven't already -- that way you don't need an initrd, even if other partitions use different filesystems that are compiled as modules (they'll load automatically after / is mounted).
Good luck. |
Hi.
First of all, big thanks for help and for "no give up"! :) I will try to provide maximum info i can. 1. Option "hda=noprobe" changed nothing. I got the same error. Some info: i use grub from arch linux. In the menu i have options loading arch or slackware. In case something going wrong i boot to arch and try to fix what needed... menu.lst # (0) Arch Linux title Arch Linux root (hd0,2) kernel /boot/vmlinuz26 root=/dev/sda3 ro initrd /boot/kernel26.img # (1) Arch Linux title Arch Linux Fallback root (hd0,2) kernel /boot/vmlinuz26 root=/dev/sda3 ro initrd /boot/kernel26-fallback.img title Slack (/dev/sda5) root (hd0,4) kernel /boot/vmlinuz root=/dev/sda5 ro vga=773 hda=noprobe initrd /boot/initrd.gz 2. About T3slider post: When i recompiled the kernel i run initrd with new kernel parameters: mkinitrd -c -k 2.6.24.4 -f ext3 -r /dev/sda5 + add to grub line initrd /boot/initrd.gz At least, with generic 12.0 kernel it worked. so i guess i am Ok here. About "recommend building the filesystem used for your root partition into the kernel instead of as a module". I don't get 100% what it means. Can you explain how i do it? In config menu i have option file systems -> Ext3 journalling file system support. Now it is on "M" This option you recommend to change to "Y" ? 3. About partitions. I have Sata disk 160GB sda1 - swap sda2 - partition to try new distros :) sda3 - arch sda4 - extended sda5 - slackware sda6 - free. 4. fstab /dev/sda1 swap swap defaults 0 0 /dev/sda5 / ext3 defaults 1 1 #/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 proc /proc proc defaults 0 0 5. mount mount /dev/sda5 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) usbfs on /proc/bus/usb type usbfs (rw) /dev/sda3 on /mnt/arch type ext3 (rw) 6. lsmod lsmod Module Size Used by i915 25088 0 drm 75156 1 i915 snd_seq_dummy 6788 0 snd_seq_oss 32896 0 snd_seq_midi_event 10112 1 snd_seq_oss snd_seq 50640 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event snd_seq_device 10508 3 snd_seq_dummy,snd_seq_oss,snd_seq snd_pcm_oss 42784 0 snd_mixer_oss 18048 1 snd_pcm_oss ipv6 254496 18 capability 7304 0 commoncap 9344 1 capability lp 13736 0 parport_pc 27812 0 parport 34760 2 lp,parport_pc pcspkr 6528 0 psmouse 39048 0 pcmcia 34988 0 snd_hda_intel 20248 4 snd_hda_codec 209152 1 snd_hda_intel snd_pcm 72068 4 snd_pcm_oss,snd_hda_intel,snd_hda_codec snd_timer 22532 3 snd_seq,snd_pcm yenta_socket 27148 1 snd 47204 15 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_hda_codec,snd_pcm,snd _timer rsrc_nonstatic 14848 1 yenta_socket sdhci 18828 0 tifm_7xx1 10496 0 pcmcia_core 36500 3 pcmcia,yenta_socket,rsrc_nonstatic soundcore 9824 1 snd mmc_core 25988 1 sdhci tifm_core 10368 1 tifm_7xx1 tg3 107780 0 ndiswrapper 185884 0 snd_page_alloc 11528 2 snd_hda_intel,snd_pcm sg 30364 0 i2c_i801 11408 0 ata_generic 9220 0 serio_raw 9220 0 intel_agp 25116 1 shpchp 33172 0 agpgart 31432 3 drm,intel_agp evdev 11904 1 7. lspci lspci 00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03) 00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03) 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03) 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3) 00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03) 00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03) 02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5787M Gigabit Ethernet PCI Express (rev 02) 04:00.0 Network controller: Broadcom Corporation BCM94311MCG wlan mini-PCI (rev 01) 0f:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller 0f:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller 0f:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD) 0f:06.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller |
OK.
After some tinkering again and again (close to pull hair out :) ) i able to boot !!!!! Not sure how i did it, but i changed some options. Good news - it works!!! bad news i am not sure why... If i need to compile again i still don't know how. Problems now : usb mouse + sound complitely out of work. Continue from here ... |
For sound you need SND_HDA_INTEL=m in the kernel;
for the mouse you need CONFIG_USB_UHCI_HCD=m, CONFIG_HID=m, and CONFIG_USB_HID=m. |
Hi, Bruce.
Thanks a lot !!!! for help. At the and it works! You know the feeling :) 1. Mouse is working now. Sound: i have this option enabled with M SND_HDA_INTEL=m still, when i boot i get : Sound server informational message: Error while initializing the sound driver: device: default can't be opened for playback (Function not implemented) The sound server will continue, using the null output device. 2. How can i save this config i just made? can i use it in the future with new kernels? 3. Is there any way to check if i enabled things i don't need and can remove in config? THANKS!!! |
A1: In a previous post your lsmod output shows snd_hda_intel. First issue "lsmod" and see if the same modules are loaded. If not, you could run "alsaconf" as root. If this loads it, then run "alsamixer" as root and unmute (with the M key) at least Master and PCM, then turn up the sliders with the up arrow key. Close the mixer with the Esc key, the run "alsactl store" to save your settings across reboot.
If this doesn't help, boot into your kernel with working sound and issue "lspci -v" which will show you which kernel modules are being used for your devices. Then you will know what you need to compile in your kernel. A2: I posted before how I save my kernel .config files. Just save it somewhere outside of the directory where you build kernels, and give it an unique name that you will remember. Typically before I upgrade my kernel to new sources from kernel.org, I will read the Changelog there and see what has changed. Then I copy my old kernel .config to the new kernel source directory and run "make silentoldconfig", which will only ask questions about new options that were not in your old .config. Then if I want to make other changes with that new source, I'll run "make xconfig" again and modify it. A3: To find out about your hardware, once you get it all working you can issue "lspci -v" which will also show you the modules your hardware is using. Output will look like this: Code:
00:0c.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03) Code:
Loopback device support (BLK_DEV_LOOP) Code:
root@silas:~# logout |
I will check this.
Now its Mutch!!! more clear to me :) Thanks! |
Hi.
Another question here. After kernel recompilation i have problem with ndiswrapper module. I get "module ndiswrapper not found". If i run "ndiswrapper -l" - it's works. But i can't modprobe it. I think i have to rebuild this module? Anyone will give me a clue - how? And why it's happening? Maybe i need to find ndiswrapper for my new kernel - 2.6.24.4 and reinstall it? |
Hi din!
We have one Ralink wireless device and two Atheros ones, so we have not used ndiswrapper here. Alien BOB has a good tutorial for ndiswrapper in his Wiki. |
Bruce, thanks for a link.
I compiled ndiswrapper from source and it's working now. I running now 2.6.24.4 kernel with old 12.0 packages, and i have another problem. When i try to remove or upgrade any package i get : chmod: /lib/libc.so.6: version `GLIBC_2.4' not found (required by chmod) I checked - i have glibc-2.5-i486-4 Why system searching for glibc_2.4? |
All times are GMT -5. The time now is 11:34 PM. |