Browse files

Fixed init script in order to avoid fs corruption on non-journaled

mounted fs. Now init scripts are owned by busybox one, that follows
/etc/inittab rules. So when  halt,reboot,poweroff are launched the system try
to unmount (or mount as read-only) every device mounted.

TODO: hide error\warning messages on shutdown

- updated busybox to 1.15.2 (vanilla sources)
- added busybox config
- modified init of inittab to run busybox's init
- added inittab file
- added /sbin/init symlink to busybox
- removing "-f" from reboot\poweroff commands
  • Loading branch information...
1 parent d0fc452 commit f20073146a86917ef40d22dbc2b7e501f430adb5 kionez committed Nov 18, 2009
Oops, something went wrong.
@@ -76,6 +76,8 @@ rm -f $MKXPUD_TARGET/usr/share/firefox/components/;
@@ -43,7 +43,8 @@ mount --move /rw /newroot/cow
if [ ! "$(cat /newroot/proc/cmdline | grep debug )" ]; then
# change root!
- chroot /newroot /init
+ #chroot /newroot /init
+ exec switch_root /newroot /sbin/init
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
+::sysinit:echo "Starting xPUD"
+::shutdown:echo "Shutdown xPUD"
+::shutdown:/bin/umount -a -r
@@ -419,7 +419,8 @@ function plate_reboot() {
else {
- system('reboot -f');
+ //system('reboot -f');
+ system('reboot');
@@ -436,7 +437,8 @@ function plate_poweroff() {
else {
- system('poweroff -f');
+ //system('poweroff -f');
+ system('poweroff');

1 comment on commit f200731

kionez commented on f200731 Nov 18, 2009

I don't know why, but with "default" busybox I noticed many issue with inittab, I'm not able to use it, I try to get it working for about 3 hours.. then I added an updated release, build with penk's config (the one that he sends me in e-mail).

Now everything works, inittab are used by busybox's init, and when a poweroff\halt\reboot is required, it tries to unmount everything before shutting down...

joshas in initrramfs init script change the switch_root to chroot, i switched back in order to avoid busybox errors on running his init.

Tomorrow I'll do something cosmetic to hide messages when it tries to unmount loop filesystems. :)

Please sign in to comment.