Code: Select all
title Puppy 533t
root (hd0,2)
kernel /pup533t/vmlinuz
initrd /pup533t/initrd.lzo
Code: Select all
zcat ../initrd.gz | cpio -id
I then edited the init file to remove everything and just leave
Code: Select all
#!/bin/bash
exec /sbin/init
Code: Select all
find | cpio -o -H newc | lzop -c1 >../initrd.lzo
Code: Select all
ln -s /root-ram /root
Now when I boot it boots to the normal ram only mode, however I can run the command
Code: Select all
rm /root;ln /mnt/sda3/root-hdd /root;restartwm
When using the HDD based root directory any changes made persist across reboots. If I'm about to run something that I don't want changes to root being made persistent then I can switch back to the ram based root using
Code: Select all
rm /root;ln /root-ram /root;restartwm
An extension of this idea might be to symbolic link other things that you might want to persist across reboots. For instance you might remaster a version that perhaps had /etc/hosts symbolic linked into a file stored under root
You can't (easily) load sfs's under such a pup, there's nothing however to stop you extracting sfs programs to be stored under the HDD root directory, for instance I have Libre Office and Firefox both stored under that HDD root. So boot to a initial spartan pup (ram based), switch root to the HDD based one and after the second or two for that switch root to run you then have Libre, Firefox and all docs etc available (HDD based root).
In my case I'm not using zram, so the main puppy (large initrd) is stored uncompressed in ram (faster to run). Around 9 months ago however Barry was playing around with something similar but using zram http://bkhome.org/news/?viewDetailed=00074
My pup includes a PXE server installation so that other household PC's (Windows) can boot puppy via their network card. You do however have to set those PC's BIOS to enable that option, typically by disabling secure boot. Leaving secure boot turned off means that should their system crash due to hard disk failure/content error, they have the option to press F12 as the PC is first booting up and then select the net boot option to boot puppy using my PXE server (which of course has to be activated and the firewall disabled). The way I've set my remaster up is that a PC that boots via PXE can remaster its own initrd.lzo (and vmlinuz) files, so that in turn that PC can become a PXE server for other PC's to boot from - all running in ram with no hdd's being touched. And where each of those PC's have their own HDD based copy of /root they can each do their own thing (choice of programs, data storage etc).