Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Puppy This forum is for the discussion of Puppy Linux.


  Search this Thread
Old 07-13-2016, 05:15 AM   #1
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
exec switch_root /pup_new /sbin/init hangs: Making the filesystem usable (or panic)

slacko-5.7-NO-pae.iso as VirtualBox "guest", on old XP netbook host

I booted pfix=rdsh to debug the hang
I get SAME hang when I manually do what `exec switch` script does.
(i.e. same original hang problem with no boot options; it SHOULD depmod next)

THEN, I tried LIKE what the switch script does BUT exec busybox instead.
That panic's: Pid: 1 comm: ... Not tainted ...
(after saying: pup_new: applet not found ... Attempted to kill init! exitcode=0x00000100 )
Whoops, see myBad screenshot: I just realized: if $0 is busybox, it won't be switch_root! Hmmm...

See 2 screenshots (the ONLY way I can capture VBox stuff! IF stuff scrolls off, NO way to capture[?]!!)
What should I try next? (yea, I need to research not-TAINTED & unionfs [exec busybox/sh] )
Attached Thumbnails
Click image for larger version

Name:	panic.png
Views:	50
Size:	13.3 KB
ID:	22429   Click image for larger version

Name:	hang.png
Views:	34
Size:	9.4 KB
ID:	22430   Click image for larger version

Name:	myBad.png
Views:	39
Size:	11.8 KB
ID:	22432  

Last edited by Jjanel; 07-15-2016 at 04:14 AM.
Old 07-13-2016, 11:59 AM   #2
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 160

Rep: Reputation: 35
Did you notice that you do not have /sys /proc and /dev under pup_new?

switch_root mentions that it will these system mount point to an appropriate location.

Maybe (likely) /sbin/init missing these mount points?
Old 07-13-2016, 12:15 PM   #3
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Original Poster
Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
This is the .iso (I 'Newbie' downloaded and blindly booted; I didn't 'do'/build anything)
I don't know/understand what to do.
Yes, under there is no sys; proc is empty; dev has 299 (vs. ls /dev|wc is 177)
Old 07-15-2016, 08:28 AM   #4
LQ 5k Club
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: High Sierra
Posts: 9,060
Blog Entries: 37

Rep: Reputation: Disabled
Noobs need to export their working appliances to file.ova and then use the file.ova on the new Virtualbox host.

Virtualbox then press Shift+G

Our time should be honored with respect.
Old 09-10-2016, 05:12 PM   #5
Karl Godt
Registered: Mar 2010
Location: Kiel , Germany
Distribution: once:SuSE6.2,Debian3.1, aurox9.2+3,Mandrake?,DSL? then:W7st,WVHB, #!8.10.02,PUPPY4.3.1 now:Macpup
Posts: 314

Rep: Reputation: 45

Can not say anything about that behaviour since I never used some kind of virtual box
myself, except once QEMU to boot a ARM-Puppy .
Qemu was slow as hell at that time, so I do not feel the need for Virtual Machines.

The switch_root script in the initrd.gz does something like that:

#if have dropped to a shell in initramfs, type 'exec switch' to keep going.

umount /proc/bus/usb
umount /sys
umount /proc

#now using cpio archive for initramfs 'initial ramdisk'...
exec switch_root /pup_new /sbin/init
The failure may occur if /sbin/init in the new rootfs layer of the squashfs file
( together with optionally adrv.sfs and devx.sfs ) is either missing or corrupted.
It should not be missing, but an incomplete download may have missing files inside the .sfs inside the .iso .
To check the md5sum once a while might be advisable .

Then there may be the possibility that the unionfs driver ( usually added aufs.ko ) has bug(s)
that may lead to corruption of the layered filesystem, but I am not aware of any bugs by aufs.

Then if layered with savefile and changed /sbin/init the new /sbin/init script would overlay the
/sbin/init of the main .sfs . If that has coding bugs that crash the script , you would get such message too.
And then /sbin/init may source files usually in /etc/rc.d . If such a sourced file is damaged or
exits instead returns it exits the parent script .
And busybox ash unfortunately crashes when a sourced script has flaws, or even is not found
since a comment inside the busybox source code says that such behaviour would be POSIX compliant ( IIRC ).
The bash shell would not crash in some cases where busybox ash crashes.
Old 09-10-2016, 05:48 PM   #6
Karl Godt
Registered: Mar 2010
Location: Kiel , Germany
Distribution: once:SuSE6.2,Debian3.1, aurox9.2+3,Mandrake?,DSL? then:W7st,WVHB, #!8.10.02,PUPPY4.3.1 now:Macpup
Posts: 314

Rep: Reputation: 45
The hang may be related either to the

As said above, a VM may be very slow,
so to wait 5-15 minutes until some code completes
might be advisable too.

/sbin/init in the main .sfs is a script that checks if PUPMODE=2 full install or not.
If not full install, execs busybox init applet.
If full install, tries to check for filesystem corruption
and if on ext2-4 f.s runs e2fsck if a marker file found and reboots.
In your case it likely would be PUPMODE=5 "live-cd" or frugal install pfix=ram boot.
So, now "busybox init" would be called after the busybox applet switch_root would have done its job
to switch into the new rootfs ( a layered f.s. combined by a unionfs ) an run /sbin/init,
by /sbin/init . This busybox now is the busybox in /bin of the puppy main .sfs ,
not the busybox inside the initrd.gz .
The init applet would run /etc/rc.d/rc.sysinit scripts by default first ,
and read /etc/inittab and execute the commands in the inittab file ( usually some kind of auto login root program ).
Busybox init applet may have some kind of bugs, or the code in /etc/rc.d/rc.sysinit hangs somewhere.
depmod to update /lib/modules/KVERSION/modules.dep - since the drivers inside the initrd.gz
are copied into /pup_new/lib/modules .. ( to reduce size ) - is called after remounting the rootfs read-write,
mounting /sys /proc /tmp .
Usually busybox mount should do these, but /bin/mount script may be used too.
Here could be difficulties too, since mounts could hang.

Another possibility is a still running sync command somewhere.
If a running sync is still active and never finishes because of kernel driver errors ( LogFS for example )
a call for a new instance of sync would be queued it seems, and since the first sync never finishes,
the code after the next sync would wait forever to be called.

And in Puppy Lupu times calls to /sbin/pup_event_backend_modprobe_protect could hang rc.sysinit
by waiting for returns of the main daemon. A remount of /tmp where the main pipe file was located could
cause such.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
exec of init (/sbin/init) failed!!! Permission dened kernel-panic - not syncing! charlztin88 Linux - Newbie 1 03-15-2011 03:17 PM
exec of init (sbin/init) failed LINUXQueAns Linux - Server 1 12-14-2010 06:00 AM
exec of init (/sbin/init) failed!!!: 13 Egon Andersen Linux - General 3 06-26-2008 05:20 AM
exec of init (/sbin/init) failed!!! kernel panic KiraII Linux - Kernel 1 07-13-2007 09:07 PM > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 05:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration