Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 24 Apr 2018, 19:18
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Another re-write of the "init" script - using OverlayFs?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 11 of 12 [168 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12 Next
Author Message
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Thu 15 Mar 2018, 05:27    Post subject:  

@01micko,

I just tested a patched "change_kernels" script and it worked fine.

I setup a directory containig the files from the release xenialpup 7.5 iso.
I then patched it's "change_kernels" script with your diff and added it as a ydrv.
I then installed these files to a usb stick using "install2usb".
After rebooting the usb stick into pupmode=13, I ran the patched "change_kernels" script, to upgrade to my 32bit PAE 4.9.86 kernel.
On reboot everything worked fine, using the new kernel.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Thu 15 Mar 2018, 22:51    Post subject:  

@01micko,
I have a slight concern with your patch to "change_kernels":
Could it cope with a device that contains multiple Puppies, each in their own PSUBDIR, but with files split between sdx1 and sdx2 a bit like "install2usb" except that "vmlinuz" and "initrd.gz" are in their own PSUBDIR on sdx1, (so sdx1 can cope with multiple Puppies)?

I'm assuming that this "install2usb' will become the "standard" installer for usb sticks.
And then some folk might use it's file layout as a template to setup a multiple Puppy usb HD.

PS: This instller should be seen as the upcomming "standard" installer for usb sticks, and have it's own forum topic.

gyo
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 8670
Location: qld

PostPosted: Fri 16 Mar 2018, 03:07    Post subject:  

gyro wrote:
@01micko,
I have a slight concern with your patch to "change_kernels":
Could it cope with a device that contains multiple Puppies, each in their own PSUBDIR, but with files split between sdx1 and sdx2 a bit like "install2usb" except that "vmlinuz" and "initrd.gz" are in their own PSUBDIR on sdx1, (so sdx1 can cope with multiple Puppies)?

Not multiple. It is only searching for 'vmlinuz'. However, as you previously mentioned, it would be ideal to place the boot files (vmlinuz, initrd.gz) in a PSUBDIR at the root of the vfat partition. That way, the 'change_kernels' script could search for $PSUBDIR/vmlinuz. Much neater if one does want to have multiple installs to a USB device.

gyro wrote:
I'm assuming that this "install2usb' will become the "standard" installer for usb sticks.
And then some folk might use it's file layout as a template to setup a multiple Puppy usb HD.

PS: This instller should be seen as the upcomming "standard" installer for usb sticks, and have it's own forum topic.

gyo

Well there is no reason why it shouldn't be the 'standard', but I think I would still like to include single partition installs for ext[2,3,4] when UEFI is not wanted/not an option. ALL files should go to the PSUBDIR in their respective partitions.

I'll tidy that up next and then create a thread for 'install2usb' (which may have a name change.. something like 'pupinstall2usb' Confused ? - open to suggestions)

_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Fri 16 Mar 2018, 21:46    Post subject:  

@01micko,

I have another suggestion concerning the "hidden" "vmlinuz" issue.
When running "install2usb" on the host Puppy, the location of "vmlinuz" is known. So how can we communicate this information to "change_kernels" in the runnng target Puppy?

In "install2usb", a "pvmlinuzpart" boot parameter is added for the target Puppy, whose value is the LABEL or UUID of the vfat partition.
The "init" script is modified so that it picks-up "pvmlinuzpart" and writes it to PUPSTATE as "PVMLINUZPART", (also add support for "pvmlinuzdir" for completeness). This is a fairly trivial patch to "init", so it could be applied to any "init" script.
In "change_kernels", if "PVMLINUZPART" is empty then use "PDEV1".

It looks complicated, but none of the modifications are difficult, and the result is very flexible, and it's all setup by the process that "knows".
"change_kernels" doesn't have to "guess".

I'll upload an "overlay_init-0.5b.tar" containg a patched "init" script.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Fri 16 Mar 2018, 21:53    Post subject:  

01micko wrote:
I'll tidy that up next and then create a thread for 'install2usb' (which may have a name change.. something like 'pupinstall2usb' Confused ? - open to suggestions)
How about 'pupinstall2usbstick'.
Unless it is also targeted to support multiple frugal installs to a usb HD, i.e. an option to skip partitioning.
Then 'pupinstall2usb'.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Sat 17 Mar 2018, 00:12    Post subject: Release of overlay_init-0.5b  

This is a testing version with a modified "init" script to support 2 new boot parameters, "pbootpart" and "pbootdir".
The "init" scipt doesn't actually use them, it just publishes them in the PUPSTATE file as "PBOOTPART" and "PBOOTDIR", although it does decode "PBOOTPART" from a label or uuid into a partition name.
They are meant to support situations where the "vmlinuz" and "initrd.gz" files are in a different partition from the "puppy...sfs", like a "install2usb" install.

The idea is that an installer like "install2usb" could add a "pbootpart" boot parameter that specifies the label or uuid of the vfat partition.
Then a script in the running target Puppy, like"change_kernels", can pickup the partition name corresponding to this value from "PBOOTPART" in the PUPSTATE file.

Please note the name change from my previous post.

Download from http://www.fishprogs.software/puppy/initrd/overlay_init-0.5b.tar.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Sun 08 Apr 2018, 13:51    Post subject: 01micko's install2usb - latest hack  

I have attached "overlay_installers-0.6.sfs".
This sfs is meant to be loaded as an extra sfs in a "normal" Puppy.
It contains my latest hack of "install2usb" which will install both "normal" and "overlay" Puppies.
It should appear in the "Setup" menu as "USB Installer - Flash Drives".
When run via this sfs, it will run on "normal" Puppies.

The sfs also contains "overlay-setup-frugal", which will run on "normal" Puppies via this sfs.

I have also attached "change_kernels".
This has been patched to support "PBOOTPART" and "PBOOTDIR', but will work without them.
It shoud run on both "normal" and "overlay" Puppies.

I have not included "change_kernels" in the sfs becasue being in an extra sfs, it would be "covered" by the installed "change_kernels".

Note on "pbootpart" and "pbootdir" boot parameters:
This "install2usb" always specifies them so they can be used if the "init" script in the target Puppy supports them.
If the "init" script in the target Puppy does not support them, they will simply be ignored.

gyro
change_kernels.gz
Description  gunzip to produce "change_kernels"
gz

 Download 
Filename  change_kernels.gz 
Filesize  4.38 KB 
Downloaded  16 Time(s) 
overlay_installers-0.6.sfs.gz
Description  gunzip to produce "overlay_installers-0.6.sfs"
gz

 Download 
Filename  overlay_installers-0.6.sfs.gz 
Filesize  10.02 KB 
Downloaded  17 Time(s) 
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Sun 08 Apr 2018, 15:35    Post subject: Release of overlay_init-0.6  

Release of overlay_init-0.6

This release is to fully support my latest hack of "install2usb".

Download from http://www.fishprogs.software/puppy/initrd/overlay_init-0.6.tar.

There are also deltas for:
artfulpup-17.11+16.iso http://www.fishprogs.software/puppy/initrd/artfulpup-17.11+16.iso___artfulpup-overlay0.6-17.11+16.iso.delta
LxPupSc-18.04T-k64.iso http://www.fishprogs.software/puppy/initrd/LxPupSc-18.04T-k64.iso___LxPupSc-overlay0.6-18.04T-k64.iso.delta
slacko64-6.9.9.9-uefi_r6048.iso http://www.fishprogs.software/puppy/initrd/slacko64-6.9.9.9-uefi_r6048.iso___slacko64-overlay0.6-6.9.9.9-uefi_r6048.iso.delta
xenialpup-7.5-uefi.iso http://www.fishprogs.software/puppy/initrd/xenialpup-7.5-uefi.iso___xenialpup-overlay0.6-7.5-uefi.iso.delta
Note: The delta's are mostly about 2MiB, but the xenialpup one is about 37MiB beacuse it contains an updated kernel (4.9.92) and zdrv, as well.

Changes for this version:
1. Includes my latest hacks of "install2usb" and "change_kernels" scripts.
2. "Overlay init setup" utility now includes a "Squash" button if you are running in pupmode=21, and "pfix=nocopy" is not set.
On the following shutdown, the savefolder will be split into an sfs file and a minimial archive file.
Subsequent boots will load the the sfs file at the top of the stack.
After the next boot, the the sfs file will be trimmed of any files added to the savefolder by the boot.
Subsequent shutdowns will revert to the normal "archive" process.
The idea is that this can be used when the archive file is becomming large, containing many files that don't change, e.g. after installing a few pets.
3. The "init" script now aborts if it can't find any kernel modules after loading the "MAIN" sfs list.

Using:
The preferred way is to generate an iso from one of the provided delta files.
Then use "install2usb" (see "overlay_installers-0.6.sfs" in post above), to install to a usb stick.
Or do a manual frugal install from the iso.

Using an iso is preferred because "/usr/local/pup_event" has been changing, and the "/usr/local/pup_event/frontend_funcs" in "overlay_init-0.6.tar" is a patched version from xenialpup 7.5,
whereas the iso files each contain a patched version of the "/usr/local/pup_event/frontend_funcs" from their parent iso.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Mon 09 Apr 2018, 11:50    Post subject:  

I've uploaded new versions of:
LxPupSc-18.04T-k64.iso http://www.fishprogs.software/puppy/initrd/LxPupSc-18.04T-k64.iso___LxPupSc-overlay0.6-18.04T-k64.iso.delta
slacko64-6.9.9.9-uefi_r6048.iso http://www.fishprogs.software/puppy/initrd/slacko64-6.9.9.9-uefi_r6048.iso___slacko64-overlay0.6-6.9.9.9-uefi_r6048.iso.delta

They now contain the appropriate "rc.update".

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Wed 11 Apr 2018, 22:17    Post subject: patch files for "install2usb" and "change_kernels"  

I should have done this sooner.
I have attached "install2usb.diff" and "change_kernels.diff".
These are the hacks I have done to produce the utilities as released above.
Except that in the "install2usb.diff" the version is changed to "0.4.2" wheras the released code still has version "0.4.1".

gyro
install2usb.diff.gz
Description  gunzip to produce install2usb.zip
gz

 Download 
Filename  install2usb.diff.gz 
Filesize  2.23 KB 
Downloaded  12 Time(s) 
change_kernels.diff.gz
Description  gunzip to produce change_kernels.diff
gz

 Download 
Filename  change_kernels.diff.gz 
Filesize  1.84 KB 
Downloaded  11 Time(s) 

Last edited by gyro on Sat 14 Apr 2018, 21:46; edited 1 time in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Sat 14 Apr 2018, 21:46    Post subject: Compatible Puppy utilities  

I've uploaded several pets for various Puppies.
These contain patched versions of /etc/rc.d/rc.shutdown, /etc/rc.d/rc.update, /usr/local/petget/installmodes.sh and /usr/local/pup_event/frontend_funcs.
They are patched to be compatible with both "overlay" and "normal" Puppies.
I have published these pets so that these can be tested in "normal" Puppies.
When installed in the corresponding "normal" Puppy they should make absolutely no difference.

Download:
for artfulpup-17.11+16.iso http://www.fishprogs.software/puppy/initrd/overlay_compat_artful-0.1.pet.
for LxPupSc-18.04T-k64 http://www.fishprogs.software/puppy/initrd/overlay_compat_lxpupsc-0.1.pet.
for slacko-700-RC3_k4.4.70-PAE_2018-04-05 http://www.fishprogs.software/puppy/initrd/overlay_compat_slacko-0.1.pet.
for slacko64-6.9.9.9-uefi_r6048 http://www.fishprogs.software/puppy/initrd/overlay_compat_slacko64-0.1.pet.
for Upup_Bionic_Beaver-18.04+5 http://www.fishprogs.software/puppy/initrd/overlay_compat_upupbb-0.1.pet.
for xenialpup-7.5-uefi http://www.fishprogs.software/puppy/initrd/overlay_compat_xenial-0.1.pet.

I've also uploaded my proposed patches against the current 'testing' branch as a set of diff files.
Download http://www.fishprogs.software/puppy/initrd/testing_diffs.tar.gz.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Sun 15 Apr 2018, 19:22    Post subject:  

I have attached "install2usb3.diff".
Changes from previous patch:
1. It only writes "pboot" boot parameters if there are 2 partitions.
2. Bump the version to "0.4.3"

gyro
install2usb3.diff.gz
Description  gunzip to produce install2usb3.diff
gz

 Download 
Filename  install2usb3.diff.gz 
Filesize  2.38 KB 
Downloaded  7 Time(s) 
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Mon 16 Apr 2018, 19:32    Post subject: FYI  

I've recently installed an "overlay" Puppy to a slow usb stick using "install2usb", and choosing "vfat" so I end up with just a single vfat partition on the usb stick.
I found the installed Puppy to be quite responsive when run with the "Archive" save mechanism.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Wed 18 Apr 2018, 05:18    Post subject:  

I have attached "overlay_installers-0.7.sfs".
This contains my latest hack of 01micko's "install2usb".
If the target "initrd.gz" does not contain "OVERLAY_SPECS" then it appends a "TZ=" boot parameter representing the current timezone of the host Puppy.
I've realised that the current "init" in the woof-ce 'testing', will set the timezone if "TZ" is set.
So the "TZ=" boot parameter will correctly set the time during the execution of the target "init" and so avoid any possibility of fsck reporting mount time errors.

I have also attached "install2usb4.diff", which is the current patch to 01micko's code to produce my hack.

gyro
overlay_installers-0.7.sfs.gz
Description  gunzip to produce overlay_installers-0.7.sfs
gz

 Download 
Filename  overlay_installers-0.7.sfs.gz 
Filesize  9.72 KB 
Downloaded  9 Time(s) 
install2usb4.diff.gz
Description  gunzip to produce install2usb4.diff
gz

 Download 
Filename  install2usb4.diff.gz 
Filesize  2.43 KB 
Downloaded  11 Time(s) 
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1490
Location: Brisbane, Australia

PostPosted: Thu 19 Apr 2018, 00:42    Post subject:  

I have attached a further hacked version of the "change_kernels" script.
The previous version sometimes tried to "umount" a busy partition that it had not mounted, this version does not.

I have also attached "change_kernels2.diff", this patch is supposed to change 01micko's released version to my current hacked version.

gyro
change_kernels.gz
Description  gunzip to produce "change_kernels"
gz

 Download 
Filename  change_kernels.gz 
Filesize  4.4 KB 
Downloaded  6 Time(s) 
change_kernels2.diff.gz
Description  gunzip to produce "change_kernels2.diff"
gz

 Download 
Filename  change_kernels2.diff.gz 
Filesize  1.87 KB 
Downloaded  8 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 11 of 12 [168 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0781s ][ Queries: 13 (0.0237s) ][ GZIP on ]