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 26 Jul 2014, 07:11
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Is there a way to set time out on boot menu?[solved]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Mon 13 Jun 2011, 10:30    Post subject:  Is there a way to set time out on boot menu?[solved]  

Not Grub. I mean the menu that pops up during the boot process when there is more than one save file available. At present, boot stops and waits for input. Is there a way to set a time-out so that boot continues if left for say 5 seconds?
_________________
Spup Frugal HD and USB
Root forever!

Last edited by DaveS on Mon 13 Jun 2011, 16:41; edited 1 time in total
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2666
Location: USA

PostPosted: Mon 13 Jun 2011, 13:28    Post subject: Re: Is there a way to set time out on boot menu?  

DaveS wrote:
Not Grub. I mean the menu that pops up during the boot process when there is more than one save file available. At present, boot stops and waits for input. Is there a way to set a time-out so that boot continues if left for say 5 seconds?


How would you set the default? "0" appears first, so as it sits, a timeout might mean "boot to ram"...

_________________
Add swapfile
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Mon 13 Jun 2011, 13:52    Post subject:  

The addition in the script could be made in such a way that a default save file is indicated.
_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3953
Location: Kiel,Germany

PostPosted: Mon 13 Jun 2011, 14:16    Post subject:  

Code:
case $NUMPUPSAVES in
  0)
   PUPSAVE=""
   ;;
  1)
   PUPMODE=8 #`expr $PUPMODE + 8`  #PUPMODE=12
   PUPSAVE="`cat /tmp/PUPSAVE2FSS`" #format: hda7,ext3,/pup220/${DISTRO_FILE_PREFIX}save.2fs
   ;;
  *)
   PUPSAVE=""
   CNTSAVE=1
   echo -e "\\033[1;36m" >/dev/console #36=aquablue
   echo "Type a number to choose which personal file to use:" > /dev/console
   echo "0  none" > /dev/console
echo -en "\\033[0;39m" >/dev/console
   read NUMSAVE

change "read NUMSAVE" to "read -t 10 NUMSAVE" or whatever seconds instead of 10 you 'd like to have ... ( code inside initrd.gz )
and add somthing like that afterwards :
Code:
NUMSAVE=`echo "$NUMSAVE" | grep -o '[0-9]' | tr -d '\n'`
[ -z "$NUMSAVE" ] && NUMSAVE=0
Back to top
View user's profile Send private message Visit poster's website 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Mon 13 Jun 2011, 14:58    Post subject:  

Karl then he need to use initrd editor to do that would he not?
_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2666
Location: USA

PostPosted: Mon 13 Jun 2011, 15:22    Post subject:  

nooby wrote:
Karl then he need to use initrd editor to do that would he not?


Actually, IIRC he just need to unpack it "gzip -d initrd.gz", edit it, and then "gzip initrd" (of course, making a backup copy of the original initrd.gz file before beginning...)

_________________
Add swapfile
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Mon 13 Jun 2011, 15:29    Post subject:  

RetroTechGuy wrote:
nooby wrote:
Karl then he need to use initrd editor to do that would he not?


Actually, IIRC he just need to unpack it "gzip -d initrd.gz", edit it, and then "gzip initrd" (of course, making a backup copy of the original initrd.gz file before beginning...)


Tried that... geany cannot read resulting unpacked file.

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Mon 13 Jun 2011, 15:47    Post subject:  

Karl Godt wrote:
Code:
case $NUMPUPSAVES in
  0)
   PUPSAVE=""
   ;;
  1)
   PUPMODE=8 #`expr $PUPMODE + 8`  #PUPMODE=12
   PUPSAVE="`cat /tmp/PUPSAVE2FSS`" #format: hda7,ext3,/pup220/${DISTRO_FILE_PREFIX}save.2fs
   ;;
  *)
   PUPSAVE=""
   CNTSAVE=1
   echo -e "\\033[1;36m" >/dev/console #36=aquablue
   echo "Type a number to choose which personal file to use:" > /dev/console
   echo "0  none" > /dev/console
echo -en "\\033[0;39m" >/dev/console
   read NUMSAVE

change "read NUMSAVE" to "read -t 10 NUMSAVE" or whatever seconds instead of 10 you 'd like to have ... ( code inside initrd.gz )
and add somthing like that afterwards :
Code:
NUMSAVE=`echo "$NUMSAVE" | grep -o '[0-9]' | tr -d '\n'`
[ -z "$NUMSAVE" ] && NUMSAVE=0


Tried this, but it made no difference Smile


edit instructions are here :http://www.murga-linux.com/puppy/viewtopic.php?p=168712#168712

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Mon 13 Jun 2011, 16:41    Post subject:  

Karl Godt wrote:

change "read NUMSAVE" to "read -t 10 NUMSAVE" or whatever seconds instead of 10 you 'd like to have ... ( code inside initrd.gz )
and add somthing like that afterwards :
Code:
NUMSAVE=`echo "$NUMSAVE" | grep -o '[0-9]' | tr -d '\n'`
[ -z "$NUMSAVE" ] && NUMSAVE=0


Thanks Karl.. this worked
Code:
read -t 5 NUMSAVE
[ -z "$NUMSAVE" ] && NUMSAVE=1


where 5 seconds is the timeout and '1' is the required default. Interrupting with another option from the keyboard works correctly also.

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Mon 13 Jun 2011, 16:43    Post subject:  

Cool that it worked. How did you accomplish that editing then Smile
_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Mon 13 Jun 2011, 16:48    Post subject:  

nooby wrote:
Cool that it worked. How did you accomplish that editing then Smile


The link showing how is at the bottom, three posts up from here. Here it is again
http://www.murga-linux.com/puppy/viewtopic.php?p=168712#168712
It was easier than it looks. So great to just turn on and walk away while it boots up if I just want to use my default save file............

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
rhadon


Joined: 27 Mar 2008
Posts: 1291
Location: Germany

PostPosted: Tue 14 Jun 2011, 00:12    Post subject:  

Hi,
great possibility. Very Happy

What about a simple textfile, maybe "bootdefault"? With t=xx and default=xx?
If this file exists, it uses this values, if it doesn't exist, it works as usual.

The advantage would be the easy changing of the values without editing initrd.gz (editing initrd.gz only one time for adding such code).

Rolf

_________________
Ich verwende "frugal", und das ist gut so. Wink
Raspberry Pi without Puppy? No, thanks.

Last edited by rhadon on Mon 20 Jun 2011, 12:19; edited 1 time in total
Back to top
View user's profile Send private message 
Burn_IT


Joined: 12 Aug 2006
Posts: 958
Location: Tamworth UK

PostPosted: Tue 14 Jun 2011, 07:55    Post subject:  

Or as a parameter...

Like the idea as I had been using a batch file before invoking Grub4dos under DOS to do it.

_________________
I can't remember the last time I forgot something!
Back to top
View user's profile Send private message 
rhadon


Joined: 27 Mar 2008
Posts: 1291
Location: Germany

PostPosted: Sat 25 Jun 2011, 07:16    Post subject:  

If anybody is interested in using a textfile for easy changing time and default, please read here.

It's the first time that I did something like that. Cool
No guaranty, no money back Wink

Rolf

_________________
Ich verwende "frugal", und das ist gut so. Wink
Raspberry Pi without Puppy? No, thanks.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 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.0807s ][ Queries: 11 (0.0043s) ][ GZIP on ]