* Automatic backup with grub
@ 2005-10-27 12:04 E Leibovich
2005-10-27 12:57 ` Tomas 'Ebik' Ebenlendr
2005-10-27 16:59 ` Marco Gerards
0 siblings, 2 replies; 9+ messages in thread
From: E Leibovich @ 2005-10-27 12:04 UTC (permalink / raw)
To: Grub-devel
[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]
Goal: Make the computer load a linux system every certain amount of times, this system would restoe from backup other system installed on a different partition.
Reason: When untechnical users (aka my little brother at my father's house) are using the windows system they tend to ruin it (installing many small programs w/o proper unistallation method causing the computer to be slower, installing viruses) this cause the technical user (aka me) to be asked for remedy by the manager (aka my father). The technical user don't have time to track and uninstall the endless junk on the system so he usually reinstalls the system. This takes quite a time, and requires the technical user to be physically near the system. Thus an idea for an automatically recovery system has sprung to the technical user's mind and is presented below.
Specs: A home system running windows on partition /dev/hda1 wishes to have the content of /dev/hda1 partition recovered once in a while, and upon request from a file stored on a different partition. The system should also be able to update the image file from the partition upon request. Ideally this request should be able to be done also from the windows system. Every way to achieve this goal is kosher.
My General Idea:
Set up a multiboot computer. Make sure the system will boot to a specially crafted linux system once in a while. This linux system will make backups with partimage, and might display a nice configuration untility if I'll be patient enough.
Idea: Change grub into booting into linux once every period of time. Make the linux system automatically restore the partition when loading with certain options.
Is it possible with grub? even a way to load windows X times and then linux (similarily to savedefault option) is good enough for now.
Is changing grub's source to add this feature a good idea?
Any other/better ideas are welcomed.
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
[-- Attachment #2: Type: text/html, Size: 2213 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
2005-10-27 12:04 Automatic backup with grub E Leibovich
@ 2005-10-27 12:57 ` Tomas 'Ebik' Ebenlendr
2005-10-27 16:03 ` E Leibovich
2005-10-27 16:59 ` Marco Gerards
1 sibling, 1 reply; 9+ messages in thread
From: Tomas 'Ebik' Ebenlendr @ 2005-10-27 12:57 UTC (permalink / raw)
To: The development of GRUB 2
You can use grub-set-default command (shipped with grub legacy), which
should be easily ported for windows (if your boot partition is readable by win).
(It is shell script.).
http://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dset_002ddefault
Then you can do all the logic in windows (You will then have more
control over this...).
I don't know if different EOL characters matter here, but you can probably
use some clever script that does not "\r\n" instead of "\n".
--
Tomas 'ebi' Ebenlendr
http://get.to/ebik
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
2005-10-27 12:57 ` Tomas 'Ebik' Ebenlendr
@ 2005-10-27 16:03 ` E Leibovich
2005-10-27 20:25 ` Timothy Baldwin
0 siblings, 1 reply; 9+ messages in thread
From: E Leibovich @ 2005-10-27 16:03 UTC (permalink / raw)
To: The development of GRUB 2
As I'm planning to use it as a recovery console I
prefer loading linux won't be dependable of loading
windows, but that it'll be loaded on its on each week
or each 10 boots. It seems to me that grub requires a
very small patch in order to make partitionX loaded 10
times and then to go back to default - am I correct?
--- Tomas 'Ebik' Ebenlendr <ebik@drak.ucw.cz> wrote:
>
> You can use grub-set-default command (shipped with
> grub legacy), which
> should be easily ported for windows (if your boot
> partition is readable by win).
> (It is shell script.).
>
>
http://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dset_002ddefault
>
> Then you can do all the logic in windows (You will
> then have more
> control over this...).
>
> I don't know if different EOL characters matter
> here, but you can probably
> use some clever script that does not "\r\n" instead
> of "\n".
>
>
>
> --
> Tomas 'ebi'
> Ebenlendr
> http://get.to/ebik
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
2005-10-27 12:04 Automatic backup with grub E Leibovich
2005-10-27 12:57 ` Tomas 'Ebik' Ebenlendr
@ 2005-10-27 16:59 ` Marco Gerards
2005-10-27 17:35 ` Vladimir Serbinenko
1 sibling, 1 reply; 9+ messages in thread
From: Marco Gerards @ 2005-10-27 16:59 UTC (permalink / raw)
To: The development of GRUB 2
E Leibovich <leiboviche@yahoo.com> writes:
> Specs: A home system running windows on partition /dev/hda1 wishes
> to have the content of /dev/hda1 partition recovered once in a
> while, and upon request from a file stored on a different
> partition. The system should also be able to update the image file
> from the partition upon request. Ideally this request should be able
> to be done also from the windows system. Every way to achieve this
> goal is kosher.
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. :-)
--
Marco
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
2005-10-27 16:59 ` Marco Gerards
@ 2005-10-27 17:35 ` Vladimir Serbinenko
2005-10-27 19:34 ` E Leibovich
2005-10-28 12:56 ` Timothy Baldwin
0 siblings, 2 replies; 9+ messages in thread
From: Vladimir Serbinenko @ 2005-10-27 17:35 UTC (permalink / raw)
To: The development of GRUB 2
>
>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 <file>
where <file> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
2005-10-27 17:35 ` Vladimir Serbinenko
@ 2005-10-27 19:34 ` E Leibovich
2005-10-28 12:56 ` Timothy Baldwin
1 sibling, 0 replies; 9+ messages in thread
From: E Leibovich @ 2005-10-27 19:34 UTC (permalink / raw)
To: The development of GRUB 2
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 <phcoder@gmail.com> 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 <file>
> where <file> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
2005-10-27 16:03 ` E Leibovich
@ 2005-10-27 20:25 ` Timothy Baldwin
0 siblings, 0 replies; 9+ messages in thread
From: Timothy Baldwin @ 2005-10-27 20:25 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
On Thursday 27 Oct 2005 17:03, E Leibovich wrote:
> As I'm planning to use it as a recovery console I
> prefer loading linux won't be dependable of loading
> windows, but that it'll be loaded on its on each week
> or each 10 boots. It seems to me that grub requires a
> very small patch in order to make partitionX loaded 10
> times and then to go back to default - am I correct?
No, you can use GRUB Legacy's savedefault command. See:
http://www.gnu.org/software/grub/manual/grub.html#Booting-once_002donly
That way requires 10 menu entries for booting Windows.
--
Member AFFS, WYLUG, SWP (UK), UAF, RESPECT, StWC
No to software patents! Victory to the iraqi resistance!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
2005-10-27 17:35 ` Vladimir Serbinenko
2005-10-27 19:34 ` E Leibovich
@ 2005-10-28 12:56 ` Timothy Baldwin
1 sibling, 0 replies; 9+ messages in thread
From: Timothy Baldwin @ 2005-10-28 12:56 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 651 bytes --]
On Thursday 27 Oct 2005 18:35, 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.
An even better way would be to store environment variables in a file. That way
you could for example store a cache of drive names, or any set of strings.
--
Member AFFS, WYLUG, SWP (UK), UAF, RESPECT, StWC
No to software patents! Victory to the iraqi resistance!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Automatic backup with grub
[not found] <200510272026.j9RKQ7RC026870@dell01.dinaserver.com>
@ 2005-11-02 9:41 ` adrian15
0 siblings, 0 replies; 9+ messages in thread
From: adrian15 @ 2005-11-02 9:41 UTC (permalink / raw)
To: grub-devel
> On Thursday 27 Oct 2005 17:03, E Leibovich wrote:
> > As I'm planning to use it as a recovery console I
> > prefer loading linux won't be dependable of loading
> > windows, but that it'll be loaded on its on each week
> > or each 10 boots. It seems to me that grub requires a
> > very small patch in order to make partitionX loaded 10
> > times and then to go back to default - am I correct?
>
> No, you can use GRUB Legacy's savedefault command. See:
> http://www.gnu.org/software/grub/manual/grub.html#Booting-once_002donly
> That way requires 10 menu entries for booting Windows.
Hi! What have you done at the end?
Have you tried my solution (http://lists.gnu.org/archive/html/bug-
grub/2005-10/msg00049.html ) or do you prefer the savedefault one (the one
above here) because you do not depend on windows xp?
adrian15
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-11-02 10:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-27 12:04 Automatic backup with grub E Leibovich
2005-10-27 12:57 ` Tomas 'Ebik' Ebenlendr
2005-10-27 16:03 ` E Leibovich
2005-10-27 20:25 ` Timothy Baldwin
2005-10-27 16:59 ` Marco Gerards
2005-10-27 17:35 ` Vladimir Serbinenko
2005-10-27 19:34 ` E Leibovich
2005-10-28 12:56 ` Timothy Baldwin
[not found] <200510272026.j9RKQ7RC026870@dell01.dinaserver.com>
2005-11-02 9:41 ` adrian15
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.