[fedora-arm] Kernel failing to boot at guruplug
Andy Green
andy at warmcat.com
Thu Jul 22 16:36:48 UTC 2010
On 07/22/10 17:09, Somebody in the thread at some point said:
> freeing kernel memory. Maybe init fails? The bash I get from
> init=/bin/bash only spits a error at when trying to init/telinit
> by hand.
>
> Any ideas? Anybody flashed a custom kernel and got init working?
>
>
> On my F12 setup the default init does work fine, just makes the boot
> four times slower than my custom init and scripts.
>
>
> if possible, can you post your custom script?
I have a custom init executable (actually to save boot time my main GUI
executable serves as init) which later spawns the scripts, unfortunately
that doesn't have a Free license.
> Why don't you hack some
>
> echo "hello" > /dev/ttyxyz0
> It reaches not even line #2, line #1 is #!/bin/bash
Just in case I should explain ttyxyz0 was just a placeholder for
whatever your serial console device is. In my case, ttymxc0 for imx31 SoC.
If that was obvious then I guess init is choking somewhere, possibly it
lacks some pieces in /dev?
Anyway you can just hack up a script as your init, something along these
lines:
#!/bin/bash
#
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
mount -n -t proc /proc /proc
mount -n -t sysfs /sys /sys
mount -n -t devpts devpts /dev/pts
rsyslogd &
echo "fsck on ro rootfs"
time fsck -y /dev/mmcblk0p1
if [ $? -gt 2 ] ; then
echo "Attempting reboot on fsck error"
reboot
fi
echo "remounting rootfs rw"
mount -n -o remount,rw /
echo "mounting other filesystems"
mount -a
echo "mount done"
ifconfig lo 127.0.0.1 &
hostname xyz
# kill temp database
rm -f /var/lib/rpm/__*
/bin/bash
echo "rc.sysinit done"
while [ 1 ] ; do sleep 5s ; done
(It's a good idea to start the rootfs from the kernel with "ro" so you
can fsck it before anything from the current boot session has its hooks
into it).
There's a huge value in Fedora basis for arm rootfs without running
stock init. Even without /sbin/init as pid 1, all of the
/etc/init.d/blah start / stop / restart stuff works fine. You just need
to start them in your startup script explicitly (and with ... & usually
since you don't want to delay boot flow while sshd starts for example).
I guess you already experienced how fast it is coming to /bin/bash
prompt if that is init, there's no reason it should be much slower than
that.
-Andy
More information about the arm
mailing list