overlayfs: Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- linux
- Domain
- operating-systems
Research direction
Reproduce the panic using the supplied initramfs-tools files at /usr/share/initramfs-tools/hooks/ro_root and /usr/share/initramfs-tools/scripts/init-bottom/ro_root, then compare kernel-panic.txt with successful-boot.txt. Start with the overlayfs mount and the init-bottom script, and consider the issue done when the generated initramfs boots with a working read-only root filesystem without requiring the /dev/console write.
Written by the indexing model from the issue text.
Description
Setting up a root file system as read-only with the help of overlayfs, I can reliably reproduce a kernel panic. It looks very much like a kernel bug to me, although I am not perfectly sure about this.
It occurs when mounting an overlay in a shell script in an initramfs like this:
mount -t overlay -o "lowerdir=${ROOT_RO},upperdir=${UPPER},workdir=${WORK}" root.union "${rootmnt}"
and later exiting the script. If I write anything into /dev/console after the mount command and before exiting the script, it works fine.
To reproduce
- Write the current lite release
2019-09-26-raspbian-buster-lite.imgonto an SD card:sudo dd if=2019-09-26-raspbian-buster-lite.img of=/dev/mmcblk0 bs=1M - Boot from that SD card on a Raspberry 3B+, log in as pi, set date,
apt-get update,apt-get upgrade,apt-get dist-upgrade. - Place the two files from initramfs-tools.zip at
/usr/share/initramfs-tools/hooks/ro_rootand/usr/share/initramfs-tools/scripts/init-bottom/ro_root. - Create an initramfs:
sudo mkinitramfs -o /boot/initrd.img-4.19.75-v7+ 4.19.75-v7+. - Activate the initramfs by appending
initramfs initrd.img-4.19.75-v7+ followkernelto/boot/config.txt. - Reboot.
Expected behaviour
Properly booting Raspbian with a working read-only root file system
Actual behaviour
A kernel panic
Output of the console via UART (after disabling bluetooth in config.txt with dtoverlay=pi3-disable-bt): kernel-panic.txt
When activating the last line in /usr/share/initramfs-tools/scripts/init-bottom/ro_root
echo "" > "${rootmnt}"/dev/console
and regenerating the initramfs
sudo mkinitramfs -o /boot/initrd.img-4.19.75-v7+ 4.19.75-v7+
it works fine: successful-boot.txt
Note that the particular device node /dev/console is important. Things like e.g. /dev/ttyprintk do not work for me.
System
Output of raspinfo after successful boot: raspinfo.txt
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·