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 23 Oct 2018, 23:43
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Avoid "Searching for Puppy files" during bootup - revisited
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 5 [62 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4841
Location: Blue Springs, MO

PostPosted: Thu 09 Jul 2015, 00:04    Post subject:  

WOW, I can't believe how overly complex this has become ... when it could just be a single parameter SFS= with a ',' separated list of files to mount and use full paths vs. search if an item in the list starts with '/'

Here is some blah template code example ... mount_sfs omitted for brevity ... needs to be updated for overlayfs anyhow
Code:
file_missing(){
   echo "$1 not found, add the appropriate mount point to MNT="
}

autoload_sfs(){
   for MTPT in /mnt/*; do
      [ -f "$MTPT/$1" ] && mount_sfs "$MTPT/$1" && break
   done
   file_missing "$1"
}


load_sfs(){
   [ -f "$1" ] && mount_sfs "$1" || file_missing "$1"
}

mount_sfs(){
   echo "mounting $1" #etc... and so forth
}

handle_sfs_list(){
   while ([ "$1" ]) do
      case "$1" in
      /*)load_sfs "$1";;
      *)[ "$NOSEARCH" ] || autoload_sfs "$1";;
      esac
      shift
   done
}

SFS=a.sfs,/mnt/sda1/b.sfs,...
IFS=","
handle_sfs_list $SFS

_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
gyro

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

PostPosted: Mon 13 Jul 2015, 00:39    Post subject:  

technosaurus wrote:
WOW, I can't believe how overly complex this has become
Some of the complexity comes from trying to efficiently integrate it into the 'init' script.
technosaurus wrote:
when it could just be a single parameter SFS= with a ',' separated list of files to mount and use full paths vs. search if an item in the list starts with '/'
Are you suggesting that this code in the 'init' script
Code:
#100915 requested by technosaurus (formats get changed further down)...
[ $pupsfs ] && PUPSFS=$pupsfs #format partition:<path><filename> ex: sda2:/wary071/wary_071.sfs
[ $zdrv ] && ZDRV=$zdrv #ex: sda2:/wary071/zdrv_071.sfs
[ $adrv ] && ADRV=$adrv
[ $ydrv ] && YDRV=$ydrv
is obsolete?

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

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

PostPosted: Mon 13 Jul 2015, 03:34    Post subject: Updated to version 5  

This version greatly simplifies the code at the expense of a little processing inefficiency.
Instead of reading the file "PUPSTATE" directly from the savefile/savefolder, it looks for it in the frugal install directory. So it doesn't have to wait until the savefile/savefolder is available before making the final decision.

To use:
1) Put patched "initrd.gz" in the frugal install directory.
2) Reboot to show that everything is still the same.
3) Copy "/etc/rc.d/PUPSTATE" to the frugal install directory.
4) Add "nosearch=sda3" as boot parameter (using appropriate partition instead of "sda3").
5) Reboot.

The "nosearch" facility can be deactivated by either removing the "nosearch" boot parameter or deleting the "PUPSTATE" file in the frugal install directory.

To add an adrv or ydrv to the boot:
1) delete the copy of "PUPSTATE" in the frugal install directory.
2) Reboot.
3) Copy "/etc/rc.d/PUPSTATE" to the frugal install directory.
4) Reboot

See first post for download.

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

Joined: 26 Sep 2012
Posts: 448

PostPosted: Mon 13 Jul 2015, 04:13    Post subject:  

have downloaded version 3 of initxxxxx file and done all preparations. USB boots until

searching for sfs files

kernel panic unable to mount VFS root fs not mounted to (2.0)

Then a "debug" readout that I can't copy & paste and machine hangs with caps lock light flashing.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11177

PostPosted: Mon 13 Jul 2015, 05:08    Post subject:  

Quote:
Some of the complexity comes from trying to efficiently integrate it into the 'init' script.

well that is the heart of the matter... fiddling with the window boxes is fine but sometimes its worth peeking in the basement at the foundations.

Shinobar had the same problem...large scripts trying to cater for all the hoplessly messy puppyisms and variations.

My init in initrd is around 25k...thats a lot less crap to try and work around.

Its not a diff or 2 needed but a complete rewrite/re-evaluation.

I am sure gyro you could do a much better job yourself.
see whats needed...cut out things that are hopelessly obsolete and make a script to do the job...ps the cpio initrd adds to the complexity by the way. You could add nice features like better sfs handling.

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

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

PostPosted: Mon 13 Jul 2015, 07:57    Post subject:  

@boof
I've never tried it on USB, only HD.
I'll give it a try.
gyro
Back to top
View user's profile Send private message 
gyro

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

PostPosted: Mon 13 Jul 2015, 09:15    Post subject:  

@boof,
I tried both version 3 and version 5 on a fat32 sdcard.
I didn't get any kernel panic's, everything just worked as normal. When I specified a "nosearch" situation, this was simply ignored and "searching" happened as usual.
So, no crashes, but achieved nothing.

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

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

PostPosted: Mon 13 Jul 2015, 09:30    Post subject:  

mikeb wrote:
I am sure gyro you could do a much better job yourself.
Thanks for the vote of confidence.
The 'init' script is showing it's age, but to re-write it would be a large task which is unlikely to come to the top of my to-do list in the foreseeable future.
gyro
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11177

PostPosted: Mon 13 Jul 2015, 11:57    Post subject:  

Thats ok gyro... understandable. And you definitely have my vote Smile

Actually I cheated and used puppy 2.12 init as a base...cleaned it up at first and the added a few goodies...it was originally 45k....
Sometimes it is easier to have some sort of framework to start with.

One thing that must be easier now is having usb drivers built into the kernel...all the slow/fast drive detection was messy and after all..who in their right mind would use usb 1 for a puppy...well I did...it was painful. Very Happy
It does question the need for PUPMODE=13 but the idea of using ram for changes is valid but in a modified form... more like multisession really.

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

Joined: 26 Sep 2012
Posts: 448

PostPosted: Mon 13 Jul 2015, 16:39    Post subject:  

frugal install v5 on usb with 6.0.2:gives:


booting the kernel
kernel panic cannot mount VFS: unable to mount root fs on unknown-block(2.0)

I also tried changing

nosearch sdxx to
search sdyy
but it made no difference to the msg.

###############################

seems not to have detected sdb2? Will try last line of syslinux.cfg

append initrd=initrd.gz pmedia=usbflash pfix=ram

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

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

PostPosted: Tue 14 Jul 2015, 03:17    Post subject:  

@boof
What filesystem do you have on USB?
Is it a stick or usb drive?

Could you please go back to the standard "initrd.gz" and prove that it boots Ok.
Then replace "initrd.gz" with the patched "initrd.gz", but change nothing else. Does it still boot?

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

Joined: 26 Sep 2012
Posts: 448

PostPosted: Tue 14 Jul 2015, 11:15    Post subject:  

its a usb stick, 8GB.

oem initrd.gz does not work either===does not find sfs file on usb or cd. Puppy is installed fully on sda2. and boots ok..

Last edited by boof on Tue 14 Jul 2015, 20:34; edited 1 time in total
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: Tue 14 Jul 2015, 14:37    Post subject:  

Hello @Boof

I think @Gyro want info from this terminal command while your USB stick in plugged in.
Code:
# fdisk -l
. Post it if you can.
_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
Back to top
View user's profile Send private message 
boof

Joined: 26 Sep 2012
Posts: 448

PostPosted: Tue 14 Jul 2015, 20:33    Post subject:  

Unfortunately, I'm working blind. I have no understanding of what I'm doing, tho' I will do as instructed if I can.
pic2.png
Description 
png

 Download 
Filename  pic2.png 
Filesize  212.08 KB 
Downloaded  291 Time(s) 
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11177

PostPosted: Wed 15 Jul 2015, 04:44    Post subject:  

Sounds like this problem needs a fresh thread as its not really about gyros modifications or that's how i read it.

Sounds like there is more than one initrd.gz around which may affect it... or you have boot parameters to consider.... the partitioning itself should no longer be an obstacle.

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 5 [62 Posts]   Goto page: Previous 1, 2, 3, 4, 5 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.0576s ][ Queries: 12 (0.0110s) ][ GZIP on ]