You are not logged in.
First of all, I have two partitions running Arch, one being experimental for messing around. You might have guessed that I wanted to ask something about screwing up my experimental Arch, but sadly it's the other one that's not working.
I'm running both Archs with kernel26-2.6.20. So this is what happened, in the stable Arch, if I run mkinitcpio with verbose output, I see modules being added to filesystems hook, but nothing too other hooks. If I do the same thing in my experimental partition, I see modules added to ide/sata/filesystems. Both Archs have same mkinitcpio.conf.
How did this happen? I guess it happened roughly a month ago while I was upgrading the system, and it was upgrading kernel/mkinitcpio/<whatever is related> I cant remember exactly which package was being upgraded. I accidentally cancelled the upgrade. Then I just reinstalled whatever package I cancelled thinking all is still fine. After a reboot kernel complained that root could not be mounted. Then I realised there's something wrong with kernel26.img.
I then use my experimental Arch to generate kernel26.img and then both Archs worked fine again. However I still can't generate a proper kernel26.img in stable Arch. The incorrect file size for kernel26.img is ~650KB and the correct one is ~900KB.
If anyone knows what could possibly screw hardware detection up when doing mkinitcpio, please help me.
Thanks a lot.
Last edited by Si (2007-03-14 11:19:30)
Offline
Are you possibly running under a different kernel than you're building for? For that you'd want the -k parameter. However, the presets should handle this case well - that is, try running "mkinitcpio -p kernel26" to build the preset kernel26 images.
Offline
Thanks for the reply.
I'm very sure the two kernel versions are exactly the same, but I've tried again with mkinicpio -p kernel26 anyway, it still produces a ~650KB kernel26.img compared to ~900KB from the experimental Arch. But I think the problem is less relevant to kernel version as doesn't matter which kernel I choose to install, it'll always produce an incorrect kernel26.img.
I've been trying for a long time to find out what exactly the differences between the two Archs are that caused the problem. Like I mentioned, no modules are being added to ide and sata hook, I'd really like to find out what caused it and how to fix it. I've already tried reinstalling mkinitcpio and gen-init-cpio, I'm not sure if there's any other package I should try reinstall.
Thanks a lot
Offline
Ya know, I've seen this crop up with a bad module at one point... a module installed into /lib/modules/<kernel version> that is invalid for that kernel version... did you do something like that?
Offline
As an experiment, I did this
cd /lib
mv modules modules.bak && mkdir modules && pacman -S kernel26
Incorrect kernel26.img is still being produced....
I'm not sure if reinstallation is the only option left.
Offline
Ok, one thing to try:
Can you check exactly which modules the "stable" arch uses and add those directly in the MODULES="" setting in mkinitcpio.conf?
Also, what did you do that makes your "experimental" arch "experimental"?
Offline
Following is what modules I'm using on both stable and experimental Arch:
Module Size Used by
ext3 119688 1
jbd 55336 1 ext3
mbcache 7044 1 ext3
nvidia 6818292 22
agpgart 26200 1 nvidia
ipv6 252480 24
nls_cp437 5888 1
vfat 10624 1
fat 46108 1 vfat
fuse 39188 2
eth1394 16772 0
usbhid 34592 0
hid 25088 1 usbhid
ff_memless 5256 1 usbhid
snd_seq_oss 29184 0
snd_seq_midi_event 6528 1 snd_seq_oss
snd_seq 46672 4 snd_seq_oss,snd_seq_midi_event
ppdev 7556 0
usb_storage 78272 0
snd_pcm_oss 39072 0
snd_mixer_oss 14464 1 snd_pcm_oss
lp 9604 0
snd_ice1724 64564 1
snd_ice17xx_ak4xxx 3584 1 snd_ice1724
snd_ac97_codec 91940 1 snd_ice1724
ac97_bus 2432 1 snd_ac97_codec
snd_ak4114 8064 1 snd_ice1724
snd_pcm 68484 4 snd_pcm_oss,snd_ice1724,snd_ac97_codec,snd_ak4114
snd_timer 18820 2 snd_seq,snd_pcm
snd_page_alloc 7816 1 snd_pcm
snd_ak4xxx_adda 7040 2 snd_ice1724,snd_ice17xx_ak4xxx
snd_mpu401_uart 7040 1 snd_ice1724
snd_rawmidi 19104 1 snd_mpu401_uart
snd_seq_device 6796 3 snd_seq_oss,snd_seq,snd_rawmidi
snd 43492 15 snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_ice1724,snd_ac97_codec,snd_ak4114,snd_pcm,snd_timer,snd_ak4xxx_adda,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore 6496 1 snd
forcedeth 40200 0
k8temp 4608 0
rtc 10416 0
ohci1394 31920 0
ieee1394 84056 2 eth1394,ohci1394
ppp_generic 23444 0
slhc 6272 1 ppp_generic
pcspkr 2816 0
tsdev 6336 0
evdev 8192 3
ohci_hcd 18948 0
i2c_nforce2 5120 0
i2c_core 17792 2 nvidia,i2c_nforce2
parport_pc 35940 1
parport 31176 3 ppdev,lp,parport_pc
ehci_hcd 30092 0
cpufreq_ondemand 6924 1
powernow_k8 13204 1
freq_table 4240 2 cpufreq_ondemand,powernow_k8
usbcore 115464 5 usbhid,usb_storage,ohci_hcd,ehci_hcd
xfs 546376 2
ide_cd 35744 0
cdrom 34464 1 ide_cd
sd_mod 16768 6
amd74xx 13852 0 [permanent]
generic 4740 0 [permanent]
ide_core 108616 4 usb_storage,ide_cd,amd74xx,generic
sata_nv 14980 5
libata 94100 1 sata_nv
There's nothing in MODULES section in mkinitcpio.conf (both stable and experimental are the same).
My experimental Arch is just for installing whatever I want to try out first before installing on my stable Arch, but however it still uses the "current" repository. Things I try out like Beryl etc.
Here's what it looks like when generating kernel26.img on the stable Arch:
mkinitcpio -p kernel26 -v
==> Building image "default"
==> Running command: /sbin/mkinitcpio -v -k 2.6.20-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
:: Parsing hook [base]
adding dir /proc
adding dir /sys
adding dir /dev
adding node /dev/null
adding node /dev/zero
adding node /dev/console
adding dir /lib
adding file /lib/klibc-C2z_DMnqPyftZCYmjdWTcAM2woc.so
adding dir /bin
adding file /bin/cat
adding file /bin/chroot
adding file /bin/dd
adding file /bin/false
adding file /bin/fstype
adding file /bin/gunzip
adding file /bin/gzip
adding file /bin/halt
adding file /bin/insmod
adding file /bin/ipconfig
adding file /bin/kill
adding file /bin/kinit
adding file /bin/kinit.shared
adding file /bin/ln
adding file /bin/losetup
adding file /bin/mdassemble
adding file /bin/minips
adding file /bin/mkdir
adding file /bin/mkfifo
adding file /bin/mknod
adding file /bin/moddeps
adding file /bin/modprobe
adding file /bin/mount
adding file /bin/nfsmount
adding file /bin/nuke
adding file /bin/parseblock
adding file /bin/pivot_root
adding file /bin/poweroff
adding file /bin/readlink
adding file /bin/reboot
adding file /bin/replace
adding file /bin/resume
adding file /bin/run-init
adding file /bin/sh
adding file /bin/sleep
adding file /bin/true
adding file /bin/umount
adding file /bin/uname
adding file /bin/zcat
adding file /init
adding file /config
:: Parsing hook [udev]
adding dir /sbin
adding file /sbin/udevd
adding file /sbin/udevtrigger
adding file /sbin/udevsettle
adding dir /etc
adding dir /etc/udev
adding dir /etc/udev/rules.d
adding file /etc/udev/rules.d/udev.rules
adding file /etc/start_udev
adding dir /lib/udev
adding file /lib/udev/firmware.sh
adding file /lib/udev/cdrom_id
adding file /lib/udev/ata_id
adding file /lib/udev/dasd_id
adding file /lib/udev/usb_id
adding file /lib/udev/edd_id
adding file /lib/udev/scsi_id
adding file /lib/udev/vol_id
adding file /lib/udev/load-modules.sh
adding file /etc/udev/udev.conf
adding dir /hooks
adding file /hooks/udev
:: Parsing hook [autodetect]
:: Parsing hook [ide]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [filesystems]
adding dir /lib/modules
adding dir /lib/modules/2.6.20-ARCH
adding dir /lib/modules/2.6.20-ARCH/kernel
adding dir /lib/modules/2.6.20-ARCH/kernel/fs
adding file /lib/modules/2.6.20-ARCH/kernel/fs/mbcache.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/fs/jbd
adding file /lib/modules/2.6.20-ARCH/kernel/fs/jbd/jbd.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/fs/ext3
adding file /lib/modules/2.6.20-ARCH/kernel/fs/ext3/ext3.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/fs/xfs
adding file /lib/modules/2.6.20-ARCH/kernel/fs/xfs/xfs.ko
adding file /hooks/filesystems
:: Generating module dependencies
adding file /lib/modules/2.6.20-ARCH/modules.dep
adding file /lib/modules/2.6.20-ARCH/modules.alias
adding file /lib/modules/2.6.20-ARCH/modules.symbols
:: Generating image '/boot/kernel26.img'...SUCCESS
==> SUCCESS
And in the experimental Arch:
==> Building image "default"
==> Running command: /sbin/mkinitcpio -v -k 2.6.20-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
:: Parsing hook [base]
adding dir /proc
adding dir /sys
adding dir /dev
adding node /dev/null
adding node /dev/zero
adding node /dev/console
adding dir /lib
adding file /lib/klibc-C2z_DMnqPyftZCYmjdWTcAM2woc.so
adding dir /bin
adding file /bin/cat
adding file /bin/chroot
adding file /bin/dd
adding file /bin/false
adding file /bin/fstype
adding file /bin/gunzip
adding file /bin/gzip
adding file /bin/halt
adding file /bin/insmod
adding file /bin/ipconfig
adding file /bin/kill
adding file /bin/kinit
adding file /bin/kinit.shared
adding file /bin/ln
adding file /bin/losetup
adding file /bin/mdassemble
adding file /bin/minips
adding file /bin/mkdir
adding file /bin/mkfifo
adding file /bin/mknod
adding file /bin/moddeps
adding file /bin/modprobe
adding file /bin/mount
adding file /bin/nfsmount
adding file /bin/nuke
adding file /bin/parseblock
adding file /bin/pivot_root
adding file /bin/poweroff
adding file /bin/readlink
adding file /bin/reboot
adding file /bin/replace
adding file /bin/resume
adding file /bin/run-init
adding file /bin/sh
adding file /bin/sleep
adding file /bin/true
adding file /bin/umount
adding file /bin/uname
adding file /bin/zcat
adding file /init
adding file /config
:: Parsing hook [udev]
adding dir /sbin
adding file /sbin/udevd
adding file /sbin/udevtrigger
adding file /sbin/udevsettle
adding dir /etc
adding dir /etc/udev
adding dir /etc/udev/rules.d
adding file /etc/udev/rules.d/udev.rules
adding file /etc/start_udev
adding dir /lib/udev
adding file /lib/udev/firmware.sh
adding file /lib/udev/cdrom_id
adding file /lib/udev/ata_id
adding file /lib/udev/dasd_id
adding file /lib/udev/usb_id
adding file /lib/udev/edd_id
adding file /lib/udev/scsi_id
adding file /lib/udev/vol_id
adding file /lib/udev/load-modules.sh
adding file /etc/udev/udev.conf
adding dir /hooks
adding file /hooks/udev
:: Parsing hook [autodetect]
:: Parsing hook [ide]
adding dir /lib/modules
adding dir /lib/modules/2.6.20-ARCH
adding dir /lib/modules/2.6.20-ARCH/kernel
adding dir /lib/modules/2.6.20-ARCH/kernel/drivers
adding dir /lib/modules/2.6.20-ARCH/kernel/drivers/ide
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/ide/ide-core.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/drivers/cdrom
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/cdrom/cdrom.ko
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/ide/ide-cd.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/drivers/ide/pci
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/ide/pci/amd74xx.ko
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/ide/pci/generic.ko
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/ide/ide-disk.ko
:: Parsing hook [scsi]
:: Parsing hook [sata]
adding dir /lib/modules/2.6.20-ARCH/kernel/drivers/ata
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/ata/libata.ko
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/ata/sata_nv.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/drivers/scsi
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/scsi/sd_mod.ko
adding file /lib/modules/2.6.20-ARCH/kernel/drivers/scsi/sr_mod.ko
:: Parsing hook [filesystems]
adding dir /lib/modules/2.6.20-ARCH/kernel/fs
adding file /lib/modules/2.6.20-ARCH/kernel/fs/mbcache.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/fs/jbd
adding file /lib/modules/2.6.20-ARCH/kernel/fs/jbd/jbd.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/fs/ext3
adding file /lib/modules/2.6.20-ARCH/kernel/fs/ext3/ext3.ko
adding dir /lib/modules/2.6.20-ARCH/kernel/fs/xfs
adding file /lib/modules/2.6.20-ARCH/kernel/fs/xfs/xfs.ko
adding file /hooks/filesystems
:: Generating module dependencies
adding file /lib/modules/2.6.20-ARCH/modules.dep
adding file /lib/modules/2.6.20-ARCH/modules.alias
adding file /lib/modules/2.6.20-ARCH/modules.symbols
:: Generating image '/boot/kernel26.img'...SUCCESS
==> SUCCESS
Offline
Can you "ls -l /lib/modules/2.6.20-ARCH/kernel/drivers/ide" in the experimental one?
Also, could you try running "depmod -ae" and trying to build again?
Offline
ls -l /lib/modules/2.6.20-ARCH/kernel/drivers/ide
total 236
-rw-r--r-- 1 root root 40900 2007-03-10 22:24 ide-cd.ko
-rw-r--r-- 1 root root 110624 2007-03-10 22:24 ide-core.ko
-rw-r--r-- 1 root root 16288 2007-03-10 22:24 ide-disk.ko
-rw-r--r-- 1 root root 18772 2007-03-10 22:24 ide-floppy.ko
-rw-r--r-- 1 root root 2428 2007-03-10 22:24 ide-generic.ko
-rw-r--r-- 1 root root 38464 2007-03-10 22:24 ide-tape.ko
drwxr-xr-x 2 root root 22 2007-03-13 22:15 legacy
drwxr-xr-x 2 root root 4096 2007-03-13 22:15 pci
ls -l /mnt/archtest/lib/modules/2.6.20-ARCH/kernel/drivers/ide
total 236
-rw-r--r-- 1 root root 40900 2007-03-10 22:24 ide-cd.ko
-rw-r--r-- 1 root root 110624 2007-03-10 22:24 ide-core.ko
-rw-r--r-- 1 root root 16288 2007-03-10 22:24 ide-disk.ko
-rw-r--r-- 1 root root 18772 2007-03-10 22:24 ide-floppy.ko
-rw-r--r-- 1 root root 2428 2007-03-10 22:24 ide-generic.ko
-rw-r--r-- 1 root root 38464 2007-03-10 22:24 ide-tape.ko
drwxr-xr-x 2 root root 22 2007-03-13 22:15 legacy
drwxr-xr-x 2 root root 4096 2007-03-13 22:15 pci
Tried depmod -ae, still the same, nothing under ide and sata hook.
I'm currently looking at mkinitcpio scripts, so far I've found out in /lib/initcpio/install/autodetect, the content generated in /tmp/initcpio_modules.XXXXXX from autodetect is shorter in stable Arch than the experimental Arch. I'm still investigating why.
Offline
Ok I've found out a bit more now, in /lib/initcpio/functions auto_modules()
On this line
modprobe --set-version ${KERNELVERSION} --show-depends -a \
$aliases
This line produces nothing on the stable Arch, but produces a list of files in the experimental Arch. Hope this can help you determine where the problem lies.
Update:
I've discovered this, when manually running
modprobe --set-version 2.6.20-ARCH --show-depends -a pci:v00001022d00001103sv00000000sd00000000bc06sc00i00
where that pci id is picked from the first line in $aliases, on the experimental Arch it produces
insmod /lib/modules/2.6.20-ARCH/kernel/drivers/hwmon/k8temp.ko
However on the stable Arch this is produced
Usage: modprobe [-v] [-V] [-C config-file] [-i] [-q] [-b] <modname> [parameters...]
Now the question is why is this happening?
Last edited by Si (2007-03-14 08:24:30)
Offline
Reinstall module-init-tools. I believe I know what happened to your system, but first see if that gets you a working image.
Offline
Yeah I already reinstalled module-init-tools and still doesn't solve the problem.
Offline
What does
which modprobe
show you?
Offline
Hey why didn't I think of that!?
Problem solved!!
Thank you all very very very much!
But I'm not sure why modprobe are in two places, /bin and /sbin ....
Anyway I'm happy enough the problem is solved now.
Last edited by Si (2007-03-14 11:20:00)
Offline
Steady on... You may still have other problems.
modprobe is in two places because you decompressed kernel26.img into your running system at some point during your investigation. Is that correct? If so, you may have replaced other binaries as well. Use this entry:
gzip -dc < /boot/kernel26.img | cpio -t
to list all the files in the image, and check them against the correct versions.
Offline
Thanks a lot!
And yes I remember now that's exactly what happened.
Now I just need to make sure no other files are affected.
Offline
Ah good call... yeah cpio images are a bit daft. Unpacking them can and will extract right over your / directory.
That's kinda why I renamed the cpio.gz files to "img", to prevent people from trying to inspect them and doing something like this 8)
Offline
Ah good call... yeah cpio images are a bit daft. Unpacking them can and will extract right over your / directory.
That's kinda why I renamed the cpio.gz files to "img", to prevent people from trying to inspect them and doing something like this 8)
i renamed it back to .gz 8)
and use mount -o loop to investigate ;)
it is somewhat difficult for me to express my thoughts in english language... so sorry me for my english
Offline