0

I have problems starting my raspberry running raspian. I get a

[    55.174742484] systemd[1]: Failed to insert module 'ipv6'
[FAILED] Failed to start Load Kernel Modules.

Sooo little bit of background story what happened. My Raspberry corrupted my SD-Card again, finally had enough and decided to move rootfs to a flash USB drive. Basically followed this guide: https://www.pragmaticlinux.com/2020/08/move-the-raspberry-pi-root-file-system-to-a-usb-drive/. No magic here, i copyied my old boot partition on a new SD-Card (vfat) and the old roots fs to a ext4-formatted flash drive and adapted the entries in [boot] cmdline.txt and [rootfs] /etc/fstab to point to the PARTUUID of the flash drives partition.

I did one little extra step, and i think this is what causes the error, i removed wait [...]/raspi_init_resize.sh from my cmdline.txt. This is probably where some initialisation was done which i am skipping now and why it is not working properly. But i wanted my filesystem not to be resized by the pi...

When i booted i realised that it was slow and and received above error. After which the raspberry still boots fine into GUI but my mouse and keyboard stopped working, but where before gui was loaded. (This guy had a simular problem after update: Failed to start Load Kernel Modules and now Keyboard & mouse won't work).

Next i added init=/bin/sh to my cmdline.txt so it boots into command line mode. I called systemctl status systemd.load-kernel-modules.system as advised by the error and i get:

Failed to read /proc/cmdline. Ignoring: no such file or directory
Failed to get D-BUS connection: unknown error -1

So nothing in /proc, empty according to ls, seems weird to me. Probably due to me skipping the init script. Could this cause the error?

Some related questions:

a) boot is also way slower atm. Is it really just the wait for USB to be ready? b) what is the important part of raspi_init_resize.sh or how can i prevent file system resizing?

5
  • Okay my assumption was probably wrong that removing the script did cause the error, because if it is removed it should work without. But i thought i missunterstood the part that is removed, because it wasn't removed in my case. So i just thought i simply do not understand the script and process... – patman Nov 7 '20 at 12:34
  • Milliways is correct in saying that removing that script is a red herring (ie., not relevant). I apologise for the rudeness. Problems with kernel module loading can happen if updates to the root and boot fs end up out of sync -- the kernel in boot is overwritten but corresponding modules are not added to the root fs (modules are version specific), or an "old" modules directory is removed but the kernel not replaced. Edit in the output of lsmod, uname -r, and ls /lib/modules; this will prove that theory one way or the other. – goldilocks Nov 7 '20 at 15:55
  • No need for apologies, i just found it not helpful and could not understand his points regarding my post. Thank you anyway. I thought so, but i wonder how that could happen, i really just copyied the old data. I must have screwed up badly... uname reports a version that is not listed in lib/modues and lsmod requires something from proc which is strangely and as mentioned empty... i will investigate where i made the error, thank you. – patman Nov 7 '20 at 18:12
  • If it is that, it's not necessarily an obvious error as opposed to bad timing/coincidence; Raspbian does updates automatically by default. lsmod won't show anything even if it worked since there are no modules for the kernel to load. Raspbian is a bit different from normal linux distros in that the kernel is made for very specific hardware, so doesn't need modules to do basic things like mount the filesystem etc. -- the system will at least run, which a standard PC distro it would fail to boot. So probably you just need to run the kernel update over again, presuming you have internet. – goldilocks Nov 7 '20 at 18:28
  • Okay it turns out it was a massive PEBKAC... thank you for pointing to the right direction. I had 2 identically looking SD cards with similar content. They auto-mounted on my Linux machine to a directory with the name of their label i guess (which looked like a 32 digit UUID or something), but identical for both of those cards. This is were i just copyied the wrong boot partition from... if you want to write an answer i can accept. P.S: again thank you, because otherwise i might just not hae realised – patman Nov 7 '20 at 18:54
2

The Raspberry Pi 3B+ supports USB boot out of the box. If there is no reason to have the boot partition on the SD Card you can just flash a USB stick with a Raspberry Pi OS as you would do with an SD Card. Then plug in the USB stick and leave the SD Card slot empty on the RasPi. Power it on and it should boot. Having this running it should not be a big problem to clone your SD Card to a USB stick if you want this.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.