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 Sat 20 Oct 2018, 07:39
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
modify initrd init script to recognize psave [solved]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
Wognath

Joined: 19 Apr 2009
Posts: 405

PostPosted: Wed 13 May 2015, 20:46    Post subject:  modify initrd init script to recognize psave [solved]  

I have used unicornpup to make special-purpose frugal installs. I'd like to keep them in the same folder and choose by the grub parameter psave, but psave does not seem to be active in unicornpup. Using these directions, I unpacked the initrd and attempted to modify the init script. Partially overcoming my fear of the 2000-line script, after much muddling around, I made this addition, starting with line 947. At this point the script has hunted down all the pupsaves and listed them in the file PUPSAVE2SFS.
Code:
NUMPUPSAVES=`cat /tmp/PUPSAVE2SFSS | wc -l`
   if [ $NUMPUPSAVES -eq 1 ];then
    PUPSAVE="`cat /tmp/PUPSAVE2SFSS`"
   #*************begin edit
   elif [ "$psave" ]; then
   PUPSAVE="`grep $psave /tmp/PUPSAVE2SFSS`"
   #**************end edit
   else   
   (menu to choose from available pupsaves is constructed)
   
This results in $PUPSAVE="" during startup and the system starts with no save file. ($psave is received correctly from grub.) This seems like it should work since the same syntax works after bootup:
Code:
 #cd /initrd
  #psave=netflix
  #PUPSAVE="`grep $psave tmp/PUPSAVE2FSS`"
  #echo $PUPSAVE
  sda4,ext3,unicornsave-netflix

Can someone explain and set me straight? Thanks!

Last edited by Wognath on Thu 14 May 2015, 15:36; edited 1 time in total
Back to top
View user's profile Send private message 
CatDude


Joined: 03 Jan 2007
Posts: 1570
Location: UK

PostPosted: Thu 14 May 2015, 11:27    Post subject:  

Hello Wognath

Try this one,
i took it out of: unicorn-6.0.iso (ce42902bcbda117319db79e57dbfe176)
and edited it the same as i had done before for various other puppies.

I have not actually tested this particular file but my earlier hacks worked OK,
so please use at your own risk. Rolling Eyes

To see the edits i made,
open the file in geany and search for 'catdude' (without the quotes)

CatDude
.
hacked-unicorn-init.tar.gz
Description 
gz

 Download 
Filename  hacked-unicorn-init.tar.gz 
Filesize  27.7 KB 
Downloaded  104 Time(s) 

_________________

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

Joined: 19 Apr 2009
Posts: 405

PostPosted: Thu 14 May 2015, 15:34    Post subject:  

Thanks, Catdude. I was hoping you would see my question because Smokey01 mentioned your hack, but I couldn't find it. The file you sent works perfectly (after I finally noticed a typo in my menu.lst file Embarassed ).
I'll change the title to make this easier to find.
Thanks again.
Back to top
View user's profile Send private message 
CatDude


Joined: 03 Jan 2007
Posts: 1570
Location: UK

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

Hello Wognath

Wognath wrote:
Thanks, Catdude. I was hoping you would see my question because Smokey01 mentioned your hack, but I couldn't find it.

Glad i could help mate.
I assume that smokey01 was referring to this post
As i explained further down that thread, i only implemented what forum member Crash had done way back in 2009,
so all credit goes to him really.

Wognath wrote:
The file you sent works perfectly (after I finally noticed a typo in my menu.lst file Embarassed ).

That's good to hear. Cool

CatDude
.

_________________

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0733s ][ Queries: 12 (0.0328s) ][ GZIP on ]