| Author |
Message |
DaveS

Joined: 09 Oct 2008 Posts: 3669 Location: UK
|
Posted: 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
|
|
 |
RetroTechGuy

Joined: 15 Dec 2009 Posts: 2298 Location: USA
|
Posted: 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"...
_________________ Wellminded Search
Add swapfile
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 11782 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
|
Posted: 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
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2675 Location: Kiel,Germany
|
Posted: 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
|
|
 |
nooby
Joined: 29 Jun 2008 Posts: 9385 Location: SwedenEurope
|
Posted: Mon 13 Jun 2011, 14:58 Post subject:
|
|
Karl then he need to use initrd editor to do that would he not?
_________________
I'm a noob so I use Google Search of Puppy Forum
|
|
Back to top
|
|
 |
RetroTechGuy

Joined: 15 Dec 2009 Posts: 2298 Location: USA
|
Posted: 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...)
_________________ Wellminded Search
Add swapfile
|
|
Back to top
|
|
 |
DaveS

Joined: 09 Oct 2008 Posts: 3669 Location: UK
|
Posted: 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
|
|
 |
DaveS

Joined: 09 Oct 2008 Posts: 3669 Location: UK
|
Posted: 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
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
|
|
 |
DaveS

Joined: 09 Oct 2008 Posts: 3669 Location: UK
|
Posted: 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
|
|
 |
nooby
Joined: 29 Jun 2008 Posts: 9385 Location: SwedenEurope
|
Posted: Mon 13 Jun 2011, 16:43 Post subject:
|
|
Cool that it worked. How did you accomplish that editing then
_________________
I'm a noob so I use Google Search of Puppy Forum
|
|
Back to top
|
|
 |
DaveS

Joined: 09 Oct 2008 Posts: 3669 Location: UK
|
Posted: Mon 13 Jun 2011, 16:48 Post subject:
|
|
| nooby wrote: | Cool that it worked. How did you accomplish that editing then  |
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
|
|
 |
rhadon

Joined: 27 Mar 2008 Posts: 1228 Location: Germany
|
Posted: Tue 14 Jun 2011, 00:12 Post subject:
|
|
Hi,
great possibility.
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.
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
|
|
 |
Burn_IT
Joined: 12 Aug 2006 Posts: 646 Location: Tamworth UK
|
Posted: 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
|
|
 |
rhadon

Joined: 27 Mar 2008 Posts: 1228 Location: Germany
|
Posted: 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.
No guaranty, no money back
Rolf
_________________ Ich verwende "frugal", und das ist gut so.
Raspberry Pi without Puppy? No, thanks.
|
|
Back to top
|
|
 |
|