<-- Back to WDL Cheatsheet menu: viewtopic.php?p=36426#p36426
---------------------------------------------------------------------------------------------------
Ah, Puppy is an interesting one... Most distros /sbin/init just start up the distro... Not with Puppy... Anyway, I'm in WeeDogged Fossapup64 as I post this so will explain the mysteries somewhat. Of course to really use it with WDL initrd overlayfs facilities you will later need to fix a few bits and pieces because Puppy was designed to expect its aufs initrd pupmodes and so on, which WDL itself doesn't need or want. However, it actually boots okay and works quite well without any alterations. If you know Puppy operation well, you can no doubt easily make any alterations required for better WDL practical use, or someone like rockedge can no doubt help, but actually it is working fine (except for the shutdown issue I mention at the end of this post).
Sorry this is rough, but here is how to WeeDog FossaPup64... Very slightly more is involved than just the modules (still just takes 5 minutes to make the adjustments required):
In Puppy /sbin/init is in fact a script that checks Pupmode. We don't want that of course, and simply want to bypass that script.
Fortunately that is very easy to do with WeeDogLinux - we just need to tell it not to use Puppy's /sbin/init but instead use /bin/busybox init. Then that part of the problem will be solved. Modules I'll come to in a minute...
Changing WDL init to point to /bin/busybox init:
------------------------------------------------
This is a good test of a special WDL feature - its external w_init file. When you downloaded the WDL skeleton init you should also have received a w_init_400rc1 file (name might not be exactly that). Simply rename it to w_init
If you don't have that external w_init file you can copy it out of the uncompressed initrd.gz - its the same (or even edit the one in there before recompressing it if you wish, but an external w_init will take precedence):
Then using geany modify the very last code line of w_init from:
Code: Select all
exec switch_root merged /sbin/init
to
Code: Select all
exec switch_root merged /bin/busybox init
That's that part DONE then once modules copied from the zdrv.sfs(lib/modules) into initrd/usr/lib/modules it will boot fine.
-------------------
Now about Modules required by initrd:
-------------------------------------
Actually since Puppy uses a huge kernel there is only one really needed, which is 'overlay' since Puppy by default uses aufs not overlayfs. However, just to get you going I suggest copying all of the modules into the initrd per fredx181's howto. Where are the modules to copy from? They are in the zdrv.sfs in dir /lib/modules, so open that up to copy them into the initrd_decompressed /usr/lib/modules (per Fred's howto viewtopic.php?p=36144#p36144).
Puppy should then boot with the resulting re-compressed initrd.gz and kernel vmlinuz and the sfs files renumbered as you did (or alternatively as I did per my attached screenshot).
But DISCLAIMER: Once booted by WDL initrd you are using WDL overlay facilities so all that Pupmode stuff isn't used and some Puppy inbuilt scripts will get upset. In particular, if you try to shutdown, Puppy will get only as far as a console root prompt. That's because it ends up calling /etc/rc.d/rc.shutdown and that would need modified for WDL shutting it down more conveniently - also save facilities will be those of WDL, not Puppy (i.e. WDL upper_changes and so on).
HOW TO SHUTDOWN FOR NOW:
------------------------
Luckily that is easy. At the # prompt, simply enter command:
or if you want instead to reboot:
Hope that helps. Let me know if still doesn't boot (in case I missed something above). Good Luck, its a fun exercise.
On my old laptop I was using grub4dos menu.lst stanza (use own uuid of course):
Code: Select all
title WDL_FossaPup64
find --set-root uuid () b812c597-8099-4bee-9bb3-8b9c10f1e902
kernel /FP/vmlinuz w_bootfrom=UUID=b812c597-8099-4bee-9bb3-8b9c10f1e902=/FP
initrd /FP/initrd.gz
I'm not sure if I have the sfs load order correct per Puppy, but worked anyway - you can always change it (and have 100 layers available in WeeDog at boot time...).
EDIT: Like I say, the only module actually needed in the initrd.gz when booted by Puppy huge kernel is kernel/fs/overlayfs/overlay.ko
For a small initrd.gz you could therefore just leave the overall initrd/usr/lib/modules/ structure in place but remove all the modules other than that kernel/fs/overlayfs/overlay.ko one, which is needed... If you do that, the resultant initrd.gz is only 1.3MB in size. There are other possible tricks but I'll leave it at that just now.