Re-built kernel, works fine but complains modprobe: FATAL: Could not load /lib/modules/3.2.0-ga73ab76-dirty/modules.dep: No such file or directory

Hi Guys,

I rebuilt the 3.2 kernel provided in the TI SDK. This boots fine on
my BeagleBone but shows the message

modprobe: FATAL: Could not load
/lib/modules/3.2.0-ga73ab76-dirty/modules.dep: No such file or
directory

as it's booting up. In my kernel build I did build the modules and
run modules_install and did copy all the module files to the SD card.
The file /lib/modules/3.2.0-ga73ab76-dirty/modules.dep definitely
exists on the SD card as shown here:

-rw-r--r-- 1 root root 231 Nov 30 11:30
/lib/modules/3.2.0-ga73ab76-dirty/modules.dep

can anyone suggest why I am getting the warning message?

TY,
Fred

sudo depmod -a

(and if your using an initrd..)

sudo update-initramfs -c -k $(uname -r)
sudo cp -v /boot/initrd.img-$(uname -r) (to where ever you call/store it..)

Regards,

Hi Robert,

I tried your suggestion and the original warning message was not
present. However after copying over the new initrd.img my system can
no longer boot, I see the messages:

omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:17 UTC (946684817)
[ 3.243408] Freeing init memory: 248K
[ 3.281768] Failed to execute /init
[ 3.302703] Kernel panic - not syncing: No init found. Try passing
init= option to kernel. See Linux Documentation/init.t
                          xt for guidance.
[ 3.316223] Backtrace:
[ 3.318847] [<c0017978>] (dump_backtrace+0x0/0x110) from
[<c045b958>] (dump_stack+0x18/0x1c)
[ 3.327758] r6:c0041390 r5:c061fb4c r4:c0689488 r3:c06426c8
[ 3.333740] [<c045b940>] (dump_stack+0x0/0x1c) from [<c045b9c8>]
(panic+0x6c/0x1a0)
[ 3.341827] [<c045b95c>] (panic+0x0/0x1a0) from [<c0008700>]
(init_post+0xa8/0xd8)
[ 3.349792] r3:cf81bc00 r2:00000036 r1:00000080 r0:c053cf68
[ 3.355773] r7:00000013
[ 3.358459] [<c0008658>] (init_post+0x0/0xd8) from [<c05e2910>]
(kernel_init+0x128/0x130)
[ 3.367065] r4:c061fb4c r3:c0688480
[ 3.370880] [<c05e27e8>] (kernel_init+0x0/0x130) from [<c0041390>]
(do_exit+0x0/0x67c)

/sbin/init is definitely present on the card, I'm using ext4 and my
kernel was compiled with ext4 support built in. Must be a problem
with the newly rebuilt kernel or initrd, as when I restore the
original versions the system boots fine.

Can anyone suggest why I'm getting the kernel panic?

I am using the kernel from ti-sdk-am335x-evm-05.05.01.00 with a Debian
squeeze image from http://elinux.org/BeagleBoneDebian.

TY,
Fred

Hi Robert,

I tried your suggestion and the original warning message was not
present. However after copying over the new initrd.img my system can
no longer boot, I see the messages:

omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:17 UTC (946684817)
[ 3.243408] Freeing init memory: 248K
[ 3.281768] Failed to execute /init
[ 3.302703] Kernel panic - not syncing: No init found. Try passing
init= option to kernel. See Linux Documentation/init.t
                          xt for guidance.
[ 3.316223] Backtrace:
[ 3.318847] [<c0017978>] (dump_backtrace+0x0/0x110) from
[<c045b958>] (dump_stack+0x18/0x1c)
[ 3.327758] r6:c0041390 r5:c061fb4c r4:c0689488 r3:c06426c8
[ 3.333740] [<c045b940>] (dump_stack+0x0/0x1c) from [<c045b9c8>]
(panic+0x6c/0x1a0)
[ 3.341827] [<c045b95c>] (panic+0x0/0x1a0) from [<c0008700>]
(init_post+0xa8/0xd8)
[ 3.349792] r3:cf81bc00 r2:00000036 r1:00000080 r0:c053cf68
[ 3.355773] r7:00000013
[ 3.358459] [<c0008658>] (init_post+0x0/0xd8) from [<c05e2910>]
(kernel_init+0x128/0x130)
[ 3.367065] r4:c061fb4c r3:c0688480
[ 3.370880] [<c05e27e8>] (kernel_init+0x0/0x130) from [<c0041390>]
(do_exit+0x0/0x67c)

/sbin/init is definitely present on the card, I'm using ext4 and my
kernel was compiled with ext4 support built in. Must be a problem
with the newly rebuilt kernel or initrd, as when I restore the
original versions the system boots fine.

Can anyone suggest why I'm getting the kernel panic?

I am using the kernel from ti-sdk-am335x-evm-05.05.01.00 with a Debian

Sorry, I've never touched "ti-sdk-am335x-evm-05.05.01.00".

squeeze image from http://elinux.org/BeagleBoneDebian.

So, relook over your steps, at what point did it actually fail? I'm
assuming you generated the initrd.img before when it was working, or
you did you...???

Regards,

I repeated my build process, still getting the init not found error
after the kernel boots.

My steps where:

cd ti-sdk-am335x-evm-05.05.01.00/board-support/board-port-labs/sitara-board-port-linux
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mrproper
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- am335x_evm_defconfig
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- uImage
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- modules
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- modules_install
sudo cp -a /lib/modules/3.2.0-ga73ab76-dirty/
/media/8840f624-1e09-4027-b89c-f92b612381bc/lib/modules
sudo depmod -a
sudo update-initramfs -c -k 3.2.0-ga73ab76-dirty
sudo cp /boot/initrd.img-3.2.0-ga73ab76-dirty /media/boot/initrd.img

then umounted the SD card and booted the BeagleBone with it. Still
getting "Kernel panic - not syncing: No init found. Try passing init=
option to kernel. See Linux Documentation/init.txt for guidance."

Thanks a great deal for any help,
Fred.

So, back to my previous question..

It worked before, but when did it break?

Was it booting the zImage/uImage before you updated the initrd.img?
If so then there's a bug or config missing to support that feature.

BTW, the initrd.img is not required, it just cleans somethings up on boot..

Regards,

Hi Robert,

The kernel I built using the above steps (but omitting the new initrd
creation) was working last week and was giving me warnings on missing
files from /lib/modules. It did boot however. Next I tried applying
your suggestions on running the depmod -A and updating the initrd. In
making the new initrd I went back and did a clean build of the Linux
kernel using exactly the same config. as I did previously. After the
build I then copied the new kernel and new initrd files over to the SD
card, and that's where I got into the state of the kernel not being
able to find init.

The non deterministic part of the process is I then reverted to the
original initrd that was on the SD card, expecting that to boot and
display the modules warnings but now that also can't find init on
boot. This is strange as that should have booted with the warning
messages as it did on my previous test.

Perhaps you can suggest a good kernel git tree to check out so I can
ensure my make procedure is valid? I'd like a kernel that supports
the BeagleBone hardware, but is not going to be obsolete soon.

Thank you,
Fred

Grab the angstrom v3.2 kernel uImage from here:
http://downloads.angstrom-distribution.org/demo/beaglebone/

Regards,

I repeated my build process, still getting the init not found error
after the kernel boots.

My steps where:

cd ti-sdk-am335x-evm-05.05.01.00/board-support/board-port-labs/sitara-board-port-linux
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mrproper
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- am335x_evm_defconfig
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- uImage
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- modules
make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- modules_install
sudo cp -a /lib/modules/3.2.0-ga73ab76-dirty/
/media/8840f624-1e09-4027-b89c-f92b612381bc/lib/modules
sudo depmod -a
sudo update-initramfs -c -k 3.2.0-ga73ab76-dirty
sudo cp /boot/initrd.img-3.2.0-ga73ab76-dirty /media/boot/initrd.img

then umounted the SD card and booted the BeagleBone with it. Still
getting "Kernel panic - not syncing: No init found. Try passing init=
option to kernel. See Linux Documentation/init.txt for guidance."

So, back to my previous question..

It worked before, but when did it break?

Was it booting the zImage/uImage before you updated the initrd.img?
If so then there's a bug or config missing to support that feature.

BTW, the initrd.img is not required, it just cleans somethings up on boot..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--

Hi Robert,

The kernel I built using the above steps (but omitting the new initrd
creation) was working last week and was giving me warnings on missing
files from /lib/modules. It did boot however. Next I tried applying
your suggestions on running the depmod -A and updating the initrd. In
making the new initrd I went back and did a clean build of the Linux
kernel using exactly the same config. as I did previously. After the
build I then copied the new kernel and new initrd files over to the SD
card, and that's where I got into the state of the kernel not being
able to find init.

The non deterministic part of the process is I then reverted to the
original initrd that was on the SD card, expecting that to boot and
display the modules warnings but now that also can't find init on
boot. This is strange as that should have booted with the warning
messages as it did on my previous test.

Perhaps you can suggest a good kernel git tree to check out so I can
ensure my make procedure is valid? I'd like a kernel that supports
the BeagleBone hardware, but is not going to be obsolete soon.

Grab the angstrom v3.2 kernel uImage from here:
http://downloads.angstrom-distribution.org/demo/beaglebone/

Hi Robert,

Those links are for binary images, correct? What I'd like to do is
verify my ability to rebuild the kernel from source, as there are
eventually some modifications I'd like to do. Can you suggest a
source repos. that will not be obsolete anytime soon that supports the
BeagleBone?

TY,
Fred

Hi Robert,

Those links are for binary images, correct? What I'd like to do is
verify my ability to rebuild the kernel from source, as there are
eventually some modifications I'd like to do. Can you suggest a
source repos. that will not be obsolete anytime soon that supports the
BeagleBone?

https://github.com/beagleboard/kernel/tree/beaglebone-3.2

Regards,