| Summary: | switch_root: can't execute '/sbin/init': No such file or directory | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Joshua Lamorie <jpl> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED INVALID | ||
| Severity: | blocker | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.16.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | microblaze-unknown-linux-gnu | Target: | microblaze-unknown-linux-gnu |
| Build: | i686 32-bit, Fedora Core 8 | ||
| Attachments: | linuxrc script from initramfs | ||
Found the problem. My buildroot was not copying ld.so.1 into the output/target/lib directory. |
Created attachment 1561 [details] linuxrc script from initramfs I'm running this on microblaze CPU on a Xilinx Virtex-4 FPGA. I have tested this on 1.16.0, 1.16.1 and 1.15.3, all with the same results. I followed several examples of the initramfs bootscript that should be used to call switch_root, and I think I have them okay, except that I'm always coming across the same error. 'No such file or directory'. My SD card with a root filesystem is mounted at /mnt. I have tried the following as the last argument to switch_root. * init * linuxrc * /linuxrc * /init * sbin/init * /sbin/init * /mnt/sbin/init Nothing works. I have attached by initramfs linuxrc script. Also, this appears if I use 'ash', or 'hush' as my default shell. Bootlog from my initramfs /linuxrc is as follows. --START-- Switch root script... Mounting /proc Looking at CPU setup CPU-Family: MicroBlaze FPGA-Arch: virtex4 CPU-Ver: 7.20.d CPU-MHz: 100.00 BogoMips: 49.56 HW: Shift: yes MSR: yes PCMP: yes DIV: yes MMU: 3 MUL: v2 FPU: v2 Exc: unal Icache: 32kB Dcache: 32kB write-through HW-Debug: yes PVR-USR1: 00 PVR-USR2: 00000000 Loading SD Card driver [ 5.310000] q5sd driver $Revision: 24 $ [ 5.310000] q5sd_of_probe: compatible: xlnx,sdcardctrlx-plb46-v1 [ 5.310000] OF BaseAddress: 25000000 [ 5.310000] OF IRQ: 8 [ 5.310000] of_register_platform_driver returned 0 [ 5.310000] SDCard data buffer remapped from 0x25000000 to 0xc8060000 [ 5.310000] SDCard registers remapped from 0x25008000 to 0xc8068000 [ 6.060000] q5sda: q5sda1 q5sda2 Modprobe finished with result 0 Checking root partition e2fsck 1.41.11 (14-Mar-2010) Superblock last write time (Thu Apr 22 22:15:18 2010, now = Thu Jan 1 00:00:06 1970) is in the future. Fix? yes /dev/q5sda2: clean, 739/243840 files, 15476/486990 blocks (check after next mount) Mounting ext2 from partition 2 ls /mnt bin config dev etc home init lib linuxrc lost+found proc root sbin sys tmp usr var Switching root linuxrc: lrwxrwxrwx 1 0 0 9 Apr 22 2010 /mnt//init -> sbin/init CWD before execv: / switch_root: can't execute '/init': No such file or directory [ 7.400000] Kernel panic - not syncing: Attempted to kill init! --END--