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 07 Jul 2015, 05:13
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Avoid "Searching for Puppy files" during bootup
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Author Message
Wognath

Joined: 19 Apr 2009
Posts: 234

PostPosted: Fri 15 May 2015, 16:53    Post subject:  Avoid "Searching for Puppy files" during bootup  

[Edited 5/19 for clarity and corrections]
I found that a few seconds are saved off bootup time by eliminating "Searching for Puppy files..." This is practical for me since I'm always on the same computer and the files are always in the same place. The idea is that once Puppy has been run, all the info found in the Searching... section is recorded in PUPSTATE.
Procedure:
Back up initrd.gz Smile
Unpack initrd.gz to folder initrd-tree
Copy /etc/rc.d/PUPSTATE to initrd-tree/
Edit init script by replacing the entire FINDING PUPPY FILES section:
Code:
#######################FINDING PUPPY FILES###########################
. /PUPSTATE
[[ $pfix = "ram" ]] && PUPMODE=5
[[ $psave ]] && PUPSAVE=$PUPSAVE$psave
########################END FINDING PUPPY FILES############################
Be sure edited /initrd-tree/init is executable
Repack initrd

The second line allows the pfix=ram boot option to work

The third line is only needed if you have more than one save file and you want a separate grub entry for each. (The "Type a number to choose which personal file to use" menu won't be generated.) Thanks to CatDude and Crash for this. (link) In this case you also have to remove the save file name from PUPSAVE line in the PUPSTATE file and add psave=name of save file to the grub kernel line.
e..g. PUPSAVE='sda4,ext3,/slacko/slackosave1' becomes PUPSAVE='sda4,ext3,/slacko/' and psave=slackosave1 on grub kernel line.

This was done with suitable awe for the cleverness of the init script. I really didn't expect a simple change to work, but it does. Surprised

Last edited by Wognath on Tue 19 May 2015, 15:14; edited 5 times in total
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 10930

PostPosted: Fri 15 May 2015, 17:05    Post subject:  

PUPSAVE='sda4,ext3,/slacko/slackosave1'

why is this not specifying where the save is so avoiding searching or the need for an additional pfind parameter?

You could have reduced the search to top level only(-maxdepth 1) ...after all once you commit to a named folder its specified in the kernel line so there is no need to waste time searching sub folders.

All seems a bit odd really...again seems like the searching should not be happening anyway.

mike
Back to top
View user's profile Send private message 
8Geee


Joined: 12 May 2008
Posts: 400
Location: N.E. USA

PostPosted: Fri 15 May 2015, 22:01    Post subject:  

IMHO the skip searching for puppy files not worth it. /MHO
_________________
Linux user #498913
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 714
Location: Japan

PostPosted: Sat 16 May 2015, 01:04    Post subject:  

I admit that I've never paid much attention to my grub4dos configuration since speed seems to be OK even with a basic setting like
kernel /pup_slacko/vmlinuz pmedia=usbflash pfix=ram
initrd /pup_slacko/initrd.gz


What I don't understand: Why do I see Puppy "Searching for Puppy files" even though pfix=ram should have made it clear that I don't use a savefile? Or is Puppy searching for anything else?
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 10930

PostPosted: Sat 16 May 2015, 04:57    Post subject:  

If the subfolder search happens to be where there are say windows installs then that to me is a little lump of wasted time and disk thrashing.
Its a hang over from root only of partition installs... since a folder is specified why search? The installers handle it all now so would only really apply to a messed up manual install attempt...oops the user forgot to include the subfolder name we had better make up for his/her oversight with a long search.

The search is for the main sfs as well as a save...pfix=ram just skips the latter.
Actually not quite true...puppy 4 plus searches and picks up anything that might possibly be puppy then sifts through the info to try and work out where it is... great fun if you have multiple installs for example. So yes all is searched..pfix=ram just ignores some of the information.
Someone got drunk after discovering the 'find' command.
Its can be the source of some interesting quirks.
It was fun when it did not skip a full install and used it for a save..that was my favourite bug Very Happy

I prefer targeted searches for the needed files and continue as soon as found...but thats just me and my insane desire for speed and less boot parameters Very Happy

mike
Back to top
View user's profile Send private message 
jonnymcfly

Joined: 28 May 2015
Posts: 6

PostPosted: Thu 28 May 2015, 19:00    Post subject:  

I could see the need to do this, I use PupRescue on occasion. Once in a while i get a pretty bad drive and all this searching just hangs the boot up process and causes issues. Especially if I am trying to get a file from the drive before it locks up completely.

Thanks for the info !!!
Back to top
View user's profile Send private message 
ocpaul20

Joined: 31 Jan 2008
Posts: 237
Location: PRC

PostPosted: Fri 29 May 2015, 02:29    Post subject:  

So, after that small bit of discussion, is there a way to make it even quicker - if you know the name of the savefile you want to load and if it can be placed at the top level, etc? I mean without having to change initrd.gz?

Maybe just with kernel boot parameters or perhaps the grub(4dos) boot menu would not even be necessary if there was no Windows or other os on the disk.

_________________
==================
Running....DebianDog Jessie Frugal
Back to top
View user's profile Send private message 
Wognath

Joined: 19 Apr 2009
Posts: 234

PostPosted: Fri 29 May 2015, 12:53    Post subject:  

Jemimah wrote:
It's not this complicated.

Just use the following boot parameters (adjusted for your system of course):

pdev1=sda1
psubdir=puppy
http://www.murga-linux.com/puppy/viewtopic.php?t=60257
In my experience, these don't noticeably reduce "searching for..." time.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 10930

PostPosted: Sat 30 May 2015, 04:07    Post subject:  

No they wont..the search happens anyway..those parameters just filter the results....puppy 4+ is like that. I preferred the older targetted searches...much faster and I stuck to that.

mike
Back to top
View user's profile Send private message 
shadower_sc

Joined: 21 Apr 2010
Posts: 135
Location: Texas

PostPosted: Tue 16 Jun 2015, 15:27    Post subject: Skip the Searching for Puppy Files
Subject description: Skip the Searching for Puppy Files
 

mikeb wrote:
..the search happens anyway..


Is there a way to skip the search entirely? I would be interested in this for a remastered CD that wouldn't have an install or save file. I.E. everything runs from the CD.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 10930

PostPosted: Wed 17 Jun 2015, 04:36    Post subject:  

Any improvements involve editing the init in initrd.gz.

Hint...its not nice which it why it hardly changes. Smile

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

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

PostPosted: Wed 17 Jun 2015, 04:37    Post subject: pdev1 and tahrpup 6  

In tahrpup 6, specifying "pdev1" as a boot parameter seems to narrow the search, at least when not booting from a CD.
1) There is code in the 'init' script to limit the list of partitions to search to only those matching "PDEV1", if it is specified.
2) When testing SAVEMARK, I had to remove the "pdev1" boot parameter, so it would find the savefolder on the other partition.
3) My disk has 2 ext4 partitions. My 'always fsck ext4 partitions' code only fscks a single partition when "pdev1" is specified, but both when it is not.

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


Joined: 23 Nov 2006
Posts: 10930

PostPosted: Wed 17 Jun 2015, 05:00    Post subject:  

I am rusty as i dumped the init from puppy 4 plus several years ago so not 100% on what does affect the seacrh in terms of parameters... ^gyro is yer man on this one.
Removing the sub folder search is a saver (maxdepth=3)...after all if you KNOW where puppy is why look thorugh windows?

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

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

PostPosted: Sat 20 Jun 2015, 11:43    Post subject:  

MochiMoppel wrote:
What I don't understand: Why do I see Puppy "Searching for Puppy files" even though pfix=ram should have made it clear that I don't use a savefile? Or is Puppy searching for anything else?
Yes, it searches for other puppy files as well, including the puppy...sfs, any zdrv, any adrv, any ydrv. Once these are found, the relevant information is stored in "PUPSTATE".

Without modifying "initrd.gz", specifying "pdev1" and "psubdir" is a good as it gets.

@Wognath,
Any adrv or ydrv would have to be in place before your modified 'init' script is used. Although existing ones could be replaced, because they are in the same place with the same name.

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


Joined: 04 May 2005
Posts: 510
Location: SW Wisconsin

PostPosted: Sat 20 Jun 2015, 17:56    Post subject:  

On some of my machines, particularly the Bay Trail boxes with usb media card readers installed, the search discussed above takes FOREVER. Even if pdev1 etc are specified, it still interrogates the USB system. The culprit is how long it takes the system to return a USB ready flag. On systems I install on those boxes I have modified the init script in initrd.gz to implement ignore=usb passed as a kernel parameter. The following is a general guide to what I have done:
Code:
#line numbers based on init in Tahr 6.0

#added line 150 :
141129 add support for ignore=usb kernel parameter. Note: kernelparam ignore returned as lowercase (kernel 3.14.20 anyway).

#modified line 866 :
while [ !-e /tmp/flag-usb-ready -a "$ignore" != "usb" ];do #110710 wait for usb process to complete.  #141129 if usb not ignored 

#modified line 870 :
if [ -s /tmp/flag-usb-ready -o "$ignore" = "usb" ];then #110710 has stuff in it if usb drives exist. #141129 or if usb ignored

Got my first Bay Trail box about a year ago and so this has been in use for about that long on those and incidentally on my core 2 duo and Pentium M laptops. Speeds up the boot immensely on the Bay Trails and noticeably on the others. I've done it for Tahr and Slacko based pups primarily. If the kernel parameter isn't passed, USB boots are normal.

_________________
Pups currently in kennel Very Happy X-slacko 3.0n, X-tahr 1b2, LxpupTahr 15.05 non-PAE, and trusty Carolina/Carolite (now battleshooters 1.3-vanguard edition R2). All lean and steady pups.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.0855s ][ Queries: 11 (0.0037s) ][ GZIP on ]