Is there a way to set time out on boot menu?[solved]
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?
Last edited by DaveS on Mon 13 Jun 2011, 20:41, edited 1 time in total.
Spup Frugal HD and USB
Root forever!
Root forever!
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
Re: Is there a way to set time out on boot menu?
How would you set the default? "0" appears first, so as it sits, a timeout might mean "boot to ram"...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?
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
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).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Code: Select all
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
and add somthing like that afterwards :
Code: Select all
NUMSAVE=`echo "$NUMSAVE" | grep -o '[0-9]' | tr -d '\n'`
[ -z "$NUMSAVE" ] && NUMSAVE=0
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
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...)nooby wrote:Karl then he need to use initrd editor to do that would he not?
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
Tried that... geany cannot read resulting unpacked file.RetroTechGuy wrote: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...)nooby wrote:Karl then he need to use initrd editor to do that would he not?
Spup Frugal HD and USB
Root forever!
Root forever!
Tried this, but it made no differenceKarl 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 )Code: Select all
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
and add somthing like that afterwards :Code: Select all
NUMSAVE=`echo "$NUMSAVE" | grep -o '[0-9]' | tr -d '\n'` [ -z "$NUMSAVE" ] && NUMSAVE=0
edit instructions are here :http://www.murga-linux.com/puppy/viewto ... 712#168712
Spup Frugal HD and USB
Root forever!
Root forever!
Thanks Karl.. this workedKarl 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: Select all
NUMSAVE=`echo "$NUMSAVE" | grep -o '[0-9]' | tr -d '\n'` [ -z "$NUMSAVE" ] && NUMSAVE=0
Code: Select all
read -t 5 NUMSAVE
[ -z "$NUMSAVE" ] && NUMSAVE=1
Spup Frugal HD and USB
Root forever!
Root forever!
The link showing how is at the bottom, three posts up from here. Here it is againnooby wrote:Cool that it worked. How did you accomplish that editing then
http://www.murga-linux.com/puppy/viewto ... 712#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!
Root forever!
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
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
Last edited by rhadon on Mon 20 Jun 2011, 16:19, edited 1 time in total.
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.
Raspberry Pi without Puppy? No, thanks.
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
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. :wink:
Raspberry Pi without Puppy? No, thanks.
Raspberry Pi without Puppy? No, thanks.
@Burn_IT
There should be a boot parameter 'pupsave' but I do not know if and in which puppy this works!
I introduced the boot parameter pupsave myself in the initrd.gz for tahr puppy.
I attach relevant part of the modified init.
The lines I had to add, have #chilidog.
There should be a boot parameter 'pupsave' but I do not know if and in which puppy this works!
I introduced the boot parameter pupsave myself in the initrd.gz for tahr puppy.
I attach relevant part of the modified init.
The lines I had to add, have #chilidog.
Code: Select all
#if pupsave file not already found, choose it here...
if [ ! "$PUPSAVE" ];then
if [ "$PRAMONLY" != "yes" ];then
if [ "$IGNORE" = "optical" ];then #narrow it down...
#not booting off optical drive.
grep "${PSUBDIR}/" /tmp/PUPSAVES > /tmp/PUPSAVES2 #note: need this as above probing may have got some invalid hits.
if [ "$SAVEPART" ];then #set by file SAVEMARK, see above.
grep "${SAVEPART} " /tmp/PUPSAVES2 > /tmp/PUPSAVES
else #it must be in the boot partition...
grep "${PDEV1} " /tmp/PUPSAVES2 > /tmp/PUPSAVES
fi
fi
if [ -s /tmp/PUPSAVES ];then #100922
touch /tmp/PUPSAVE2SFSS #so does not spit any erroros if not there
cat /tmp/PUPSAVES |
while read ONELINE
do
ONEDEV="`echo -n "$ONELINE" | cut -f 1 -d ' '`"
ONEFS="`echo -n "$ONELINE" | cut -f 2 -d ' '`"
ONEPUPSAVES="`echo -n "$ONELINE" | cut -f 3-99 -d ' '`"
for ONEPUPSAVE in $ONEPUPSAVES
do
echo "${ONEDEV},${ONEFS},${ONEPUPSAVE}" >> /tmp/PUPSAVE2SFSS
done
done
NUMPUPSAVES=`cat /tmp/PUPSAVE2SFSS | wc -l`
if [ $NUMPUPSAVES -eq 1 ];then
PUPSAVE="`cat /tmp/PUPSAVE2SFSS`"
else
[ $pupsave ] && PUPSAVETST=$pupsave #chilidog introducing the pupsave bootparameter for tahr puppy
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
for ONECHOICE in `cat /tmp/PUPSAVE2SFSS | tr '\n' ' '`
do
ONEFILE="`echo -n "$ONECHOICE" | cut -f 3 -d ','`"
ONEPART="`echo -n "$ONECHOICE" | cut -f 1 -d ','`"
echo -e "${CNTSAVE} ${ONEPART}\\033[10G${ONEFILE}" > /dev/console #10 means move to that column.
if [ "$ONEFILE" = "$PUPSAVETST" ];then #chilidog
NUMSAVE="${CNTSAVE}" #chilidog
echo "This pupsave matches the pupsave bootparameter. It will shoot!" > /dev/console #chilidog
fi #chilidog
CNTSAVE=`expr $CNTSAVE + 1`
done
echo -en "\\033[0;39m" >/dev/console
if [ ! "${NUMSAVE}" ];then #chilidog
read NUMSAVE
fi #chilidog
[ $NUMSAVE -ne 0 ] && PUPSAVE="`cat /tmp/PUPSAVE2SFSS | tr '\n' ' ' | cut -f $NUMSAVE -d ' '`"
fi
fi
fi
[ "$PUPSAVE" ] && PUPMODE=`expr $PUPMODE + 8`
fi