You are not logged in.
I've been trying for some days to create a simple script to backup the kernel before upgrading it so that it would insert a new grub entry like "Arch Linux 2.6.20.4-1".
This is what I've done so far:
1) cp -a /lib/modules/2.6.20-ARCH to /lib/modules/2.6.20.4-1
2) depmod 2.6.20.4-1
3) mkinitcpio -k 2.6.20.4-1 -g /boot/kernel26.img-2.6.20.4-1
everything seems to work fine, but if I reboot and edit grub to boot from the above image I always get a kernel panic with the following message:
:: Loading root filesystem modules...[b]-e[/b]
Attempting to create root device '/dev/sda1'
ERROR: Failed to parse block device name for '/dev/sda1'
unknown
[i][omissis][/i]
Kernel panic - not syncing: Attempted to kill init!Obviously /dev/sda1 is my root partition
Doing an mkinitcpio -g /boot/.... works correctly so I don't think this is a modules problem.
What am I missing or doing wrong?
Thanks in advance for your help.
Offline
uhmmm... i don't know why it panics...
is udev actualy running? seems like the device node's not there. Try putting "break=y" on the kernel-commandline in grub... You'll be dropped in a shell at the end of the mkinitcpio-init.
But... the easy way to do this - if you have a working situation - would be to
# cp /boot/kernel26{,.old}
# cp /boot/kernel26.img{,.old}Or am i missing something?
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
If I cp the old kernel image it will refer to /lib/modules/2.6.20-ARCH to load the modules and that directory will contain new kernel's modules as soon as I update.
That's why I need to first copy the modules directory and then to rebuild the image with the -k option.
... at least I hope this is the right solution
Offline
You can try, but i think the module-path is compiled into the kernel, so if you move your modules to another path and depmod, that would make no difference to the kernel itself and it can't find them.
If i remember correctly, module-path is the same as /lib/modules/$( uname -r )
and uname -r won't change when you copy the modules to some place else.
As i reread your first post, this is probable whats happening in early userspace. The modules are in 2.6.20.4, but the kernel looks in 2.6.20-ARCH, so it can't find any modules and is unable to create device-nodes, etc...
The image built fine because you specified 2.6.20.4 as the directory where the modules are to be found for generating the image
Last edited by klixon (2007-04-12 05:52:47)
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
If i remember correctly, module-path is the same as /lib/modules/$( uname -r )
and uname -r won't change when you copy the modules to some place else.
Uhm... if this is the case it would be difficult for me to achieve my objective. I mean I would not like to recompile the kernel to change that dir.
As i reread your first post, this is probable whats happening in early userspace. The modules are in 2.6.20.4, but the kernel looks in 2.6.20-ARCH, so it can't find any modules and is unable to create device-nodes, etc...
I didn't mention it in the first post, but I have a valid 2.6.20-ARCH directory too, so I can't understand yet why I get a kernel panic.
But if the module-path = /lib/modules/$( uname -r ) is true every other question is of secondary importance.
Offline
You can always try it out... it's easy. Just make sure you have an arch install cd handy so you can chroot into your installation to set things straight if i'm right, but i'm pretty sure i am...
just move your current module dir to another dir, depmod that dir and reboot. Then try to load a module if it manages to boot.
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
Unfortunately you are right about the hard coding in the kernel of the path /lib/modules/$(uname -r).
I think I will continue to use both the plain vanilla kernel and the beyond one so I have more possibilities to have a bootable system.
I must admit this was only for paranoia as I never got an unusable system after upgrading.
Thank you for your help!
Last edited by proc (2007-04-17 08:24:24)
Offline