Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EVDWC-0006lY-AB for mharc-grub-devel@gnu.org; Thu, 27 Oct 2005 15:34:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVDW9-0006iK-Tw for grub-devel@gnu.org; Thu, 27 Oct 2005 15:34:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVDW7-0006f0-Pu for grub-devel@gnu.org; Thu, 27 Oct 2005 15:34:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVDW7-0006el-NM for grub-devel@gnu.org; Thu, 27 Oct 2005 15:34:27 -0400 Received: from [206.190.49.43] (helo=web53013.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1EVDW7-000859-Oy for grub-devel@gnu.org; Thu, 27 Oct 2005 15:34:27 -0400 Received: (qmail 39698 invoked by uid 60001); 27 Oct 2005 19:34:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tx6tEt8UEL8ngGe3EzMV8IkJCchR4q5kfFFQdWz2jDyUihGuwFcKFV3U5WoQ0pkp2NRhdFqaIT5CgvqyRFPZNRYd5T+e+n9A5CU7IwSdqEUFU89GwAFTNMYlC/QQQznpHx6SvLpLgvni1k5tD1LldLhmFAG8tRHdqj5wkBNJ72A= ; Message-ID: <20051027193426.39696.qmail@web53013.mail.yahoo.com> Received: from [217.132.184.151] by web53013.mail.yahoo.com via HTTP; Thu, 27 Oct 2005 12:34:26 PDT Date: Thu, 27 Oct 2005 12:34:26 -0700 (PDT) From: E Leibovich To: The development of GRUB 2 In-Reply-To: <43610FFA.3010407@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: Automatic backup with grub X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 19:34:30 -0000 Do you suggest me to run a script from linux that will make grub run windows after 10 times? I ment that the system will run windows (possibly XP) 10 times, and then run linux once. Altering grub from XP is not so simple, and exept relying on the XP to recover itself (IE switch to "boot from linux" itself) is not so wise - what if some defect will occur and my grub.exe will be deleted. I thought grub itself should do that. Can you run your script from grub? --- Vladimir Serbinenko wrote: > > > > >So what needs to be done is place an image back > once in a while. It > >should be possible to create a GRUB command for > that, I guess. :-) > > > > > Why a command? A better way, IMO, is using some > variables stored in file. > It could be presented as array SAVED_INTEGER of > integers and SAVED_FLAGS > of flags. > Then with command > initsaved > where must be created from OS (what about a > tool or shell script?) > then > > initsaved /grub2/savedvars > > if [[ SAVED_INTEGER[0] -ge 10]]; then > defwin = ""; > defrest="--default"; > else > defwin = "--default"; > defrest=""; > fi > > menu $defwin windows > { > ... # Load windows > ((SAVED_INTEGER[0]++)); > } > > menu $defrest restore windows > { > ... # Restore windows > SAVED_INTEGER[0]=0; > } > > menu reset counter > { > SAVED_INTEGER[0]=0; > } > > timeout=10; > > In this way first 10 times $defwin expands to > --default and "Load > windows" becomes default. Afterwards $defrest > expands to --default and > "restore windows" becomes default > > > > Vladimir 'phcoder' Serbinenko > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs