Recover after #quit?

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

This is about the dangers of playing at work: I thought playing
with my usual X11 interface would be too obvious, so I decided
to switch to tty. I unfortunately mis-remembered tty and edited
my config file so that graphics was set to TERM.
When I launched nethack, it didn't recognize the option, and
launched the standard gnome graphics... and, misled by the
unfamiliar interface, I chose File -> Quit. :(

So my question is: do I have a chance to recover my game?
(it was of course a very promising one)
I know this question has already been asked and answered, but
I can't figure how my precise case fits in, and I'm very afraid
of messing things up.
I don't remember being asked if I was sure I wanted to quit,
and my game does not appear in the log file.
On the other hand, I have a bunch of alock.* files
(* being from 0 to nine with also 50 51 52 and 66), which have
apparently been created when I accidently quit, and which I
think are files recover can use.
So, can I use recover, and if so, on which of this alock files?

Many thanks in advance for any answer!
Clemence
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

> On the other hand, I have a bunch of alock.* files
> (* being from 0 to nine with also 50 51 52 and 66), which have
> apparently been created when I accidently quit, and which I
> think are files recover can use.
> So, can I use recover, and if so, on which of this alock files?

OK, I have just found that (I think) I must run
../recover ./alock from my nethack directory as root.

I tried this (after having made a copy of the alock files),
and it answered:
../recover: cannot chdir to /usr/games/lib/nethackdir.
which is perfectly normal since my nethack dir is
/sw/lib/nethack
(btw I'm playing a *nix version on mac os x).

So I decided to create by hand the required directory,
to copy whatever recover creates there in my nethack directory.
Recover now fails with the following error:
Cannot open level 0 for ./alock.

I will search again the newsgroup for this error, but if
somebody knows it means certain failure to recover, I would
appreciate the information! :)

Clemence
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Jym wrote:
> On Wed, 27 Jul 2005, Clemence Magnien wrote:

> >
> > So my question is: do I have a chance to recover my game?
> > (it was of course a very promising one)
>
> Ask your sysadmin to look in the backups and see if your save file is
> there... Of course, *that* may be a little too obvious too.

I use a laptop so I am my own sysadmin, and do not do properly
my job as I don't do backups...

>
> Erm. If you're on a ext3 filesystem, there is almost no possibility of
> recovery.

Er, I don't know what an ext3 filesystem use. I have the regular
mac os X filesysterm, I don't know it's name (it's a seemingly unix
filesystem that makes distinction between upper and lower case but
won't allow two files with the same name, if one is upper case
and the other lower case).

Clemence
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Clemence Magnien wrote:
> > On the other hand, I have a bunch of alock.* files
> > (* being from 0 to nine with also 50 51 52 and 66), which have
> > apparently been created when I accidently quit, and which I
> > think are files recover can use.
> > So, can I use recover, and if so, on which of this alock files?
>
> OK, I have just found that (I think) I must run
> ./recover ./alock from my nethack directory as root.

>From a very recent thread of messages, it seems that I must
be logged in as games to run this command, but I don't know
how to log in as games.
I tried to run 'sudo passwd games', which prompted me for
my root password then for the games password twice as I expected,
but when I run 'su games', it prompts me for the password and
then answers: 'su: /dev/null: Permission denied'.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Dan Sommers wrote:

> HFS+ (the Mac OS file system) is "case insensitive" (meaning that "aaa"
> and "AAA" are the same file; try the shell command "file /USR/BIN/") and
> "case preserving" (meaning that if you create a file called "AbC," the
> file system will keep that name, as opposed to some case insensitive
> file systems that achieve case insensitivity by converting all filenames
> to one case or the other).

So I don't have an ext3 filesystem, that's a good news!
Thanks for the definitions. I knew about 'case insensitive', but I
had no idea how to call 'case preserving'.

Clemence.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Clemence Magnien wrote:
> Clemence Magnien wrote:
> > > On the other hand, I have a bunch of alock.* files
> > > (* being from 0 to nine with also 50 51 52 and 66), which have
> > > apparently been created when I accidently quit, and which I
> > > think are files recover can use.
> > > So, can I use recover, and if so, on which of this alock files?
> >
> > OK, I have just found that (I think) I must run
> > ./recover ./alock from my nethack directory as root.
>
> >From a very recent thread of messages, it seems that I must
> be logged in as games to run this command, but I don't know
> how to log in as games.

Well, after a few more research I found out how to log in
as games (turns out /dev/null was the games home directory),
but when I run './recover ./alock', it still fails with the
error:
Cannot open level 0 for ./alock.

I think this is the most I can do on my own, my apologies for
having written so many messages to explain so little progress.

Clemence
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On Wed, 27 Jul 2005, Clemence Magnien wrote:

> This is about the dangers of playing at work: I thought playing
> with my usual X11 interface would be too obvious, so I decided
> to switch to tty. I unfortunately mis-remembered tty and edited
> my config file so that graphics was set to TERM.
> When I launched nethack, it didn't recognize the option, and
> launched the standard gnome graphics... and, misled by the
> unfamiliar interface, I chose File -> Quit. :(
>
> So my question is: do I have a chance to recover my game?
> (it was of course a very promising one)

Ask your sysadmin to look in the backups and see if your save file is
there... Of course, *that* may be a little too obvious too.

Erm. If you're on a ext3 filesystem, there is almost no possibility of
recovery.

--
Hypocoristiquement,
Jym.

Adresse mail plus valide à partir de septembre 2005.
Utiliser l'adresse de redirection permanente :
Jean-Yves.Moyen `at` ens-lyon.org
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> writes:

> OK, I have just found that (I think) I must run
> ./recover ./alock from my nethack directory as root.
> I tried this (after having made a copy of the alock files),
> and it answered:
> ./recover: cannot chdir to /usr/games/lib/nethackdir.
> which is perfectly normal since my nethack dir is
> /sw/lib/nethack

Does Mac OS X have symlinks? If it does, you could try symlinking
/sw/lib/nethack as /usr/games/lib/nethackdir (first create /usr/games/lib
if you don't have it yet) for using recover.
If it doesn't, create that directory and copy everything from
/sw/lib/nethack there and try again. See where the save file gets
recovered and move it to the right directory if necessary.
Then you can delete the symlink / temporary directory structure.

Apparently there's still somewhere in recover a reference to the directory
that is used in the unix version by default..

--
Jukka Lahtinen
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On Wed, 27 Jul 2005, Clemence Magnien wrote:

>
>
> Dan Sommers wrote:
>
> > HFS+ (the Mac OS file system) is "case insensitive" (meaning that "aaa"
> > and "AAA" are the same file; try the shell command "file /USR/BIN/") and
> > "case preserving" (meaning that if you create a file called "AbC," the
> > file system will keep that name, as opposed to some case insensitive
> > file systems that achieve case insensitivity by converting all filenames
> > to one case or the other).
>
> So I don't have an ext3 filesystem, that's a good news!
> Thanks for the definitions. I knew about 'case insensitive', but I
> had no idea how to call 'case preserving'.

www.stellarinfo.com claims to have a recovery tool that work for HFS+
system. But it also claims it work for ext3 and I remember trying it
without success.

If HFS+ is journaled, you have few chances to get it back...
Maybe the saved game is still in the trash bin (I doubt about it since you
ran the Linux port and not directly the MacOSX port, but that's worth
trying).

Alternatively, just accept it and start a new game...

--
Hypocoristiquement,
Jym.

Adresse mail plus valide à partir de septembre 2005.
Utiliser l'adresse de redirection permanente :
Jean-Yves.Moyen `at` ens-lyon.org
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

> Erm. If you're on a ext3 filesystem, there is almost no possibility of
> recovery.
>

if the alock files are there we aren't talking about undeletion merely the
recover command.
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

"Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> wrote in
news:1122460222.995400.73400@f14g2000cwb.googlegroups.com:

> This is about the dangers of playing at work: I thought playing
> with my usual X11 interface would be too obvious, so I decided
> to switch to tty. I unfortunately mis-remembered tty and edited
> my config file so that graphics was set to TERM.
> When I launched nethack, it didn't recognize the option, and
> launched the standard gnome graphics... and, misled by the
> unfamiliar interface, I chose File -> Quit. :(
>
> So my question is: do I have a chance to recover my game?
> (it was of course a very promising one)
> I know this question has already been asked and answered, but
> I can't figure how my precise case fits in, and I'm very afraid
> of messing things up.
> I don't remember being asked if I was sure I wanted to quit,
> and my game does not appear in the log file.
> On the other hand, I have a bunch of alock.* files
> (* being from 0 to nine with also 50 51 52 and 66), which have
> apparently been created when I accidently quit, and which I
> think are files recover can use.
> So, can I use recover, and if so, on which of this alock files?
>
> Many thanks in advance for any answer!
> Clemence
>
Just type recover alock if the recover command is in the path and you are in
the directory with the alock files. I find it strange that there is only a 66
file and no 60,61,62,63,64, or 65 files though..
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Jukka Lahtinen wrote:
> chuck <chucko@nil.car> writes:
>
> > the directory with the alock files. I find it strange that there is only a 66
> > file and no 60,61,62,63,64, or 65 files though..
>

> I think 66 in this case is the bottom level of Sokoban and he hasn't
> visited other Sokoban levels.
>

Right, I was at the bottom level of Sokoban when I last saved (I
had run into a troll and was not sure how to deal with it).

Anyway, recover doesen't seem to work:
$ ./recover alock
../recover: cannot chdir to /usr/games/lib/nethackdir.
$ ./recover -d . alock
Cannot open level 0 for ./alock.

I think I'll follow Jym's advice and give up.

Thanks for the advice everyone!
Clemence

PS: by the way, I'm a 'she', not a 'he' :)
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Jukka Lahtinen wrote:
> "Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> writes:
>
> > Anyway, recover doesen't seem to work:
> > $ ./recover alock
> > ./recover: cannot chdir to /usr/games/lib/nethackdir.
> > $ ./recover -d . alock
> > Cannot open level 0 for ./alock.
>
> Another thread gave me an idea: is your playground directory something
> else instead of the default /usr/games/lib/nethackdir?
> If it is, you could try creating a directory /usr/games/lib (if it doesn't
> exist yet) and symlinking your real playground directory there as
> nethackdir.

Yes, my nethack directory is /sw/lib/nethack. That's why I tried to use

the -d option to alock.
I tried creating a symlink as you suggested, and it also answered
'Cannot open level 0 for alock'.

> > PS: by the way, I'm a 'she', not a 'he' :)
>
> Sorry, no offense intended. I didn't remember who was having the problem
> and because I believe there are more males than females here I used "he"
> as a default.
None taken! :)

> In Finnish the same pronoun ("hän") is used for both genders..
Yes, I've learned about this recently, I like that very much and
this makes finnish my dream language (although I've also heard
that there are about 10 declension cases, which must make it
very difficult to learn).

Clemence
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Jym wrote:
> On Thu, 28 Jul 2005, Clemence Magnien wrote:
>
> > > In Finnish the same pronoun ("hän") is used for both genders..
> > Yes, I've learned about this recently, I like that very much and
> > this makes finnish my dream language (although I've also heard
> > that there are about 10 declension cases, which must make it
> > very difficult to learn).
>
> You should give a try at japanese then. No pronouns, no conjugation, no
> declension, and no pronunciation problem. Well, of course you'll need to
> learn around 100 kanas and 2000 kanjis to read it...

Well, I might considering learning japanese then... but
only after I'm through with russian, which has all the horrific
characteristics evoked above, so it should take me about 10 years
I guess...

Clemence
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

chuck <chucko@nil.car> writes:

> the directory with the alock files. I find it strange that there is only a 66
> file and no 60,61,62,63,64, or 65 files though..

Maybe a trapdoor or level teleportation took him there, and he hasn't come
back to the earlier levels yet?
Hmm, 66.. that doesn't sound like a regular level of Dungeons of Doom or
Gehennom.. Ludios, perhaps? I don't remember how Sokoban and Quest levels
are numbered within the level files.
Wait, I just checked the files I have of the game going on, and I have
files alock.48 - alock.56 and alock.62 - alock.65. I have finished Sokoban
and explored the Mines, so 62-65 must be Sokoban and 48-56 the Mines.
I think 66 in this case is the bottom level of Sokoban and he hasn't
visited other Sokoban levels.

--
Jukka Lahtinen
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> writes:

> Anyway, recover doesen't seem to work:
> $ ./recover alock
> ./recover: cannot chdir to /usr/games/lib/nethackdir.
> $ ./recover -d . alock
> Cannot open level 0 for ./alock.

Another thread gave me an idea: is your playground directory something
else instead of the default /usr/games/lib/nethackdir?
If it is, you could try creating a directory /usr/games/lib (if it doesn't
exist yet) and symlinking your real playground directory there as
nethackdir.

> PS: by the way, I'm a 'she', not a 'he' :)

Sorry, no offense intended. I didn't remember who was having the problem
and because I believe there are more males than females here I used "he"
as a default.
In Finnish the same pronoun ("hän") is used for both genders..

--
Jukka Lahtinen
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

"Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> wrote in
news:1122533780.923636.33600@g49g2000cwa.googlegroups.com:

>
>
> Jukka Lahtinen wrote:
>> chuck <chucko@nil.car> writes:
>>
>> > the directory with the alock files. I find it strange that there is only
a 66
>> > file and no 60,61,62,63,64, or 65 files though..
>>
>
>> I think 66 in this case is the bottom level of Sokoban and he hasn't
>> visited other Sokoban levels.
>>
>
> Right, I was at the bottom level of Sokoban when I last saved (I
> had run into a troll and was not sure how to deal with it).
>
> Anyway, recover doesen't seem to work:
> $ ./recover alock
> ./recover: cannot chdir to /usr/games/lib/nethackdir.
> $ ./recover -d . alock
> Cannot open level 0 for ./alock.
>
> I think I'll follow Jym's advice and give up.
>
> Thanks for the advice everyone!
> Clemence
>
> PS: by the way, I'm a 'she', not a 'he' :)
>
if you want to give it one last try 1. make SURE that you are in nethackdir,
2. do a <exec-path-for recover)recover alock 3. chown the resulting save file
(which you should get) to games/games. you can then if those three work
continue the game. If you get ..alock.0 message the file isn't in that dir,
If you get a message about cannot find level for save you ARE s.o.l..
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

chuck wrote:
> "Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> wrote in
> news:1122533780.923636.33600@g49g2000cwa.googlegroups.com:
> >
> > Anyway, recover doesen't seem to work:
> > $ ./recover alock
> > ./recover: cannot chdir to /usr/games/lib/nethackdir.
> > $ ./recover -d . alock
> > Cannot open level 0 for ./alock.
> >
> >
> if you want to give it one last try 1. make SURE that you are in nethackdir,
> 2. do a <exec-path-for recover)recover alock 3. chown the resulting save file
> (which you should get) to games/games. you can then if those three work
> continue the game. If you get ..alock.0 message the file isn't in that dir,
> If you get a message about cannot find level for save you ARE s.o.l..

I've started a new game, so I don't know if it's still possible
to try something... However, I do have a copy of the alock.* files
so it might be possible.
I'm not sure I understand step 2 in your instructions though.
Is '<exec-path-for recover>recover alock' equivalent to ./alock if
I'm in recover's directory?
If so, that's what I did in the example above: all my nethack related
stuff is in the same directory, so recover and alock are in the same
dir.

Thanks,
Clemence
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

"Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> wrote in
news:1122533780.923636.33600@g49g2000cwa.googlegroups.com:

>
>
> Jukka Lahtinen wrote:
>> chuck <chucko@nil.car> writes:
>>
>> > the directory with the alock files. I find it strange that there is only
a 66
>> > file and no 60,61,62,63,64, or 65 files though..
>>
>
>> I think 66 in this case is the bottom level of Sokoban and he hasn't
>> visited other Sokoban levels.
>>
>
> Right, I was at the bottom level of Sokoban when I last saved (I
> had run into a troll and was not sure how to deal with it).
>
> Anyway, recover doesen't seem to work:
> $ ./recover alock
> ./recover: cannot chdir to /usr/games/lib/nethackdir.
> $ ./recover -d . alock
> Cannot open level 0 for ./alock.
>
> I think I'll follow Jym's advice and give up.
>
> Thanks for the advice everyone!
> Clemence
>
> PS: by the way, I'm a 'she', not a 'he' :)
>
>
also related to the "actual content" of your post, you should be su (i.e.
root) or AT LEAST games when doing a recover and certainly root when doing a
chown, as no other user MAY be able to do it.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Jukka Lahtinen wrote:
> "Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> writes:
>
> > Is '<exec-path-for recover>recover alock' equivalent to ./alock if
> > I'm in recover's directory?
>
> Simply './recover alock' then.

Oops, yes, that's what I meant. I've already tried, it didn't work.

Thanks,
Clemence
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> writes:

> Is '<exec-path-for recover>recover alock' equivalent to ./alock if
> I'm in recover's directory?

Simply './recover alock' then.

--
Jukka Lahtinen
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

> I'm not sure I understand step 2 in your instructions though.
> Is '<exec-path-for recover>recover alock' equivalent to ./alock if
> I'm in recover's directory?
> If so, that's what I did in the example above: all my nethack related
> stuff is in the same directory, so recover and alock are in the same
> dir.
>
> Thanks,
> Clemence
>
>

Only if the recover command is in the directory of the alock files and the
..lev files from nethack. Specifically If recover is NOT in $PATH and say is
in /usr/local/ybin, and with pwd being /usr/local/lib/nethackdir, you would
type:
/usr/local/ybin/recover alock, or if in any other directory but
/usr/local/ybin: /usr/local/ybin/recover -d /usr/local/lib/nethackdir alock.
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

Jukka Lahtinen <jslnews@despammed.com> wrote in
news:yrjzms6yp6u.fsf@despammed.com:

> "Clemence Magnien" <clemence.magnien@shs.polytechnique.fr> writes:
>
>> Is '<exec-path-for recover>recover alock' equivalent to ./alock if
>> I'm in recover's directory?
>
> Simply './recover alock' then.
>

only if recover is in /usr/local/nethackdir/lib and the alock files are there
as well along with it being pwd.