You are not logged in.

#1 2009-10-02 21:50:39

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

[Solved] Custom Kernel Doesnt Find HDD

Im having a hell of a time trying to get my custom kernel to boot, it always dies at the part where it tries to find the HDD and then drops me to a shell, which I cant do anything with since my keyboard wont work. To make this even harder on myself Im trying not to use udev since Im compiling a new kernel to decrease my boot time, which dropped from 24 secs to 15 secs (by removing udev and specifying the modules in rc.conf, removing certain hooks from mkinitcpio.conf, etc...), and apparently im missing a driver/module for my hdd and I cant figure out for the life of me what it is.

here the output of lspci -k

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge
        Subsystem: Advanced Micro Devices [AMD] RS780 Host Bridge  
00:02.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
        Kernel driver in use: pcieport-driver                                            
        Kernel modules: shpchp                                                           
00:0a.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 5)   
        Kernel driver in use: pcieport-driver                                            
        Kernel modules: shpchp                                                           
00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]     
        Subsystem: Giga-byte Technology Device b002                                      
        Kernel driver in use: ahci                                                       
        Kernel modules: ahci                                                             
00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller            
        Subsystem: Giga-byte Technology Device 5004                                      
        Kernel driver in use: ohci_hcd                                                   
        Kernel modules: ohci-hcd                                                         
00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller                  
        Subsystem: Giga-byte Technology Device 5004                                      
        Kernel driver in use: ohci_hcd                                                   
        Kernel modules: ohci-hcd                                                         
00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller             
        Subsystem: Giga-byte Technology Device 5004                                      
        Kernel driver in use: ehci_hcd                                                   
        Kernel modules: ehci-hcd                                                         
00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller            
        Subsystem: Giga-byte Technology Device 5004                                      
        Kernel driver in use: ohci_hcd                                                   
        Kernel modules: ohci-hcd                                                         
00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller                  
        Subsystem: Giga-byte Technology Device 5004                                      
        Kernel driver in use: ohci_hcd                                                   
        Kernel modules: ohci-hcd                                                         
00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller             
        Subsystem: Giga-byte Technology Device 5004                                      
        Kernel driver in use: ehci_hcd                                                   
        Kernel modules: ehci-hcd                                                         
00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3a)                      
        Subsystem: Giga-byte Technology Device 4385                                      
        Kernel driver in use: piix4_smbus                                                
        Kernel modules: i2c-piix4                                                        
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller                   
        Subsystem: Giga-byte Technology Device 5002                                      
        Kernel driver in use: pata_atiixp                                                
        Kernel modules: ata_generic, pata_acpi, pata_atiixp, ide-pci-generic, atiixp     
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)                      
        Subsystem: Giga-byte Technology Device a102                                      
        Kernel driver in use: HDA Intel                                                  
        Kernel modules: snd-hda-intel                                                    
00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller                 
        Subsystem: ATI Technologies Inc SB700/SB800 LPC host controller                  
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge                         
00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller            
        Subsystem: Giga-byte Technology Device 5004                                      
        Kernel driver in use: ohci_hcd                                                   
        Kernel modules: ohci-hcd
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
        Kernel driver in use: k8temp
        Kernel modules: k8temp
01:00.0 VGA compatible controller: nVidia Corporation G84 [GeForce 8600 GTS] (rev a1)
        Subsystem: Device 19f1:0480
        Kernel modules: nvidia, nvidiafb
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
        Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard
        Kernel driver in use: r8169
        Kernel modules: r8169
03:07.0 Multimedia video controller: NEC Corporation Dual Tuner/MPEG Encoder (rev 0b)
        Subsystem: Lumanate, Inc. Device 001a

heres my rc.conf (which i doubt matters at this point since it seems to fail while using the initrd)

LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="EST"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
MOD_AUTOLOAD="no"
MODULES=(hwmon-vid vhba fuse snd-seq-midi-event shpchp snd_seq r8169 snd_seq_device hid_logitech ff_memless usbhid ohci-hcd ehci-hcd i2c-piix4 k8temp hid snd_hda_codec_realtek mii evdev cdrom snd_hda_codec i2c_core rtc_core rtc_lib sd_mod ext4 mbcache jbd2 crc16 usbcore ahci libata !scsi_mod slhc snd-mixer-oss !snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore !snd_pcsp)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="ra"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
eth0="dhcp"
INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
DAEMONS=(syslog-ng hal @network !wicd @kdm @cups @alsa !avahi-daemon !avahi-dnsconfd !cdemud @sensors)

heres my /etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.
MODULES="scsi_mod sd_mod ata_generic pata_acpi ide-pci-generic atiixp pata_atiixp i2c-piix4 ahci ehci-hcd ohci-hcd ext4"

# BINARIES
# This setting includes, into the CPIO image, and additional
# binaries a given user may wish.  This is run first, so may
# be used to override the actual binaries used in a given hook.
# (Existing files are NOT overwritten is already added)
# BINARIES are dependancy parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in anyway.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options,
# like so:
#    FILES="/etc/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'modload' may be used in place of 'udev', but is not recommended
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
HOOKS="base autodetect sata keymap"

# COMPRESSION
# Use this to compress the initramfs image. With kernels earlier than
# 2.6.30, only gzip is supported, which is also the default. Newer kernels
# support gzip, bzip2 and lzma.
COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"

heres the latest kernel config that ive tried: kernel config


I saw in the kernel help that it said I shouldnt compile scsi_mod as a module if my root filesystem is on a scsi drive (from what ive read sata drives are seen as scsi drives hence the reason i need scsi drivers when i dont have a true scsi drive, correct?) but theres no option to build it into the kernel, its either modularized or de-selected. Also if I modularize it and try to build an initrd with mkinitcpio it says: ERROR: module 'scsi[-_]mod' not found even though it exists:

[bran@ra ../scripts/kernel26parallel]$ locate scsi_mod
/lib/modules/2.6.30-ARCH/kernel/drivers/scsi/scsi_mod.ko
/lib/modules/2.6.31-ARCH/kernel/drivers/scsi/scsi_mod.ko

There are two other modules/drivers that Im confused by: ide-pci-generic and shpchp. I finally located them in the kernel config but ide-pci-generic said it shouldnt be used unless you really need it since it steals IRQs from other devices and wont release them, and after a little searching (the most helpful thing was actually just 'locate shpchp' since i couldnt really find any info on the net what it was) i found out that shpchp is used for pci hotplugging. I would never use that feature but since its loaded/in use by the default arch kernel should I include it in my custom kernel even if im not using the hotplugging feature?

Last edited by brando56894 (2009-10-06 03:25:04)

Offline

#2 2009-10-03 03:53:59

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Solved] Custom Kernel Doesnt Find HDD

Easiest way is to copy the default Arch kernel config and then remove as necessary. Also, check to make sure your /etc/mkinitcpio.conf is correct.

In this case, its a mkinitcpio problem, probably, but you'd need static /dev for one and the specific drivers in your kernel config for another. It does not need to be compiled in, it can be a module and listed in mkinitcpio.conf's MODULES


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2009-10-03 12:16:57

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: [Solved] Custom Kernel Doesnt Find HDD

Try removing "ide-pci-generic" from your mkinitcpio.conf. This module belongs to the old (and deprecated) IDE driver stack which has been replaced by libata. If you are going without udev, you'll have to create the harddisk devices in /dev by hand as well, you need a static /dev like ngoonee said. Also, try adding "scsi" to the "HOOKS" section.
I personally wouldn't drop udev but rather the init ramdisk. This might speed up booting as well, but all modules that are needed for booting (scsi, hdd controller, filesystems) must be linked statically to the kernel.

Offline

#4 2009-10-03 22:32:31

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: [Solved] Custom Kernel Doesnt Find HDD

Thanks for the replies, I remember reading the post where I found all the tweaking tutorials and the author mentioning that he used static /dev devices but I didnt know that it was necessary if youre removing udev. I'm assuming that static /dev devices arent necessary if you remove udev but keep the stock arch kernel because I did so with my first successful setup where I removed the udev hook and any other unused hooks and everything worked fine.

I believe that I did remove ide-pci-generic at one point and it didnt seem to fix anything, probably because of the dynamic (?) devices and scsi not existing in hooks.

Ill try these out and post the outcome.

Last edited by brando56894 (2009-10-04 01:45:54)

Offline

#5 2009-10-04 20:58:51

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: [Solved] Custom Kernel Doesnt Find HDD

In mkinitcpio.conf I removed ide-pci-generic from the modules array and added the scsi hook as the third hook in the array (after base and autodetect) and that fixed my problem with not finding the HDDs, thanks!

The only problem I have now is that doing all this totally negated all the tweaks I did since my boot time is back up to 26 seconds since it waits 10 seconds for /dev/sda2 to become ready. How can I decrease this time?

Offline

#6 2009-10-06 03:24:47

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: [Solved] Custom Kernel Doesnt Find HDD

I finally managed to get it to work, I had to manually change a few 'm's to 'y's in .config to include for support for some stuff that xconfig wouldnt let me choose the check mark for some reason. The boot process seems a lot quicker but bootchart begs to differ since its showing about a 1-2 second increase..

Offline

Board footer

Powered by FluxBB