Recovery Help Needed

stilllife

Distinguished
Jul 25, 2005
11
0
18,510
Archived from groups: rec.games.roguelike.nethack (More info?)

Well, the wonderful power in my house decided to blink off and on while
I was in the middle of a game of Nethack, and now I can't seem to get
the game back. It was going VERY well, and I haven't managed to ascend
yet so I would really like to get this game back.

There is a slew of alock.XX files in my nethack data directory. When I
try to use:

/usr/share/games/nethack/recover -d . alock

I get:

Cannot create savefile .

I've recovered a game with recover before, so I don't know what's wrong
this time. I don't think the permissions are screwed up, and I even
tried running it as root with the same effect.

I'm running Gentoo Linux and Nethack 3.4.3. Any help would be
appreciated. Thanks!
 

stilllife

Distinguished
Jul 25, 2005
11
0
18,510
Archived from groups: rec.games.roguelike.nethack (More info?)

> Benjamin Schieder wrote:
> Simply running /usr/share/games/nethack/recover ./alock should be fine.

agony at stilllife in nethack $ /usr/share/games/nethack/recover
../alock
Cannot open level 0 for ./alock.
agony at stilllife in nethack $ /usr/share/games/nethack/recover
/var/games/nethack/alock
Cannot create savefile .

I took a look in the source code and the output "Cannot create savefile
.." seems to indicate that it's trying to create a save file with a
blank name (which obviously won't work). Anyone know why this might be
happening?
 

stilllife

Distinguished
Jul 25, 2005
11
0
18,510
Archived from groups: rec.games.roguelike.nethack (More info?)

> Jukka Lahtinen wrote:
> But what about permissions? Did you (the original poster) try to run it
> as a normal user?

I've tried it as a normal user and as root with the same results each
time.
 

stilllife

Distinguished
Jul 25, 2005
11
0
18,510
Archived from groups: rec.games.roguelike.nethack (More info?)

> chuck wrote:
> try logging on as games (use root to set a password). Type recover by itself
> to make sure you don't have another command of the same name; copy the
> alock files to another directory to keep a backup in case something goes
> wrong, then change to the nethack directory and type: recover alock. Make
> sure that df reports > 0 bytes free and that no files are in the save
> directory. This should create a file called 1000<playername> in save.

Following the instructions:

agony at stilllife in nethack $ su - games
Password:
games at stilllife in games $ cd /var/games/nethack/
games at stilllife in nethack $ df -h

Filesystem Size Used Avail Use% Mounted on
/dev/hda3 112G 88G 24G 79% /
none 62M 0 62M 0% /dev/shm
games at stilllife in nethack $ recover
-bash: recover: command not found
games at stilllife in nethack $ /usr/share/games/nethack/recover alock
Cannot open level 0 for alock.
games at stilllife in nethack $ /usr/share/games/nethack/recover
/var/games/nethack/alock
Cannot create savefile .
games at stilllife in nethack $ /usr/share/games/nethack/recover -d
/var/games/nethack /var/games/nethack/alock
Cannot create savefile .

Very odd behavior. I'm not sure why it keeps trying to create a file
with a blank name.

> If this doesn't work make sure there is one file for each level
> you've been to. level one is alock.1, the mines are alock.8# and so on. You
> should also have a alock.0 file.

I have alock.0 to alock.72
 
G

Guest

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

> There is a slew of alock.XX files in my nethack data directory. When I
> try to use:
>
> /usr/share/games/nethack/recover -d . alock
>
> I get:
>
> Cannot create savefile .

Simply running /usr/share/games/nethack/recover ./alock should be fine.

Greetings,
Benjamin

--
____ _ _ ____ _ _ _ _____ __ __
/ ___|| | / \ / ___|| | | ( ) ____| \/ |
\___ \| | / _ \ \___ \| |_| |/| _| | |\/| |
___) | |___ / ___ \ ___) | _ | | |___| | | |
|____/|_____/_/ \_\____/|_| |_| |_____|_| |_|
play online: telnet://slashem.crash-override.net
view scores: http://slashem.crash-override.net
watch deaths: irc://irc.freenode.net#slashem
 

stilllife

Distinguished
Jul 25, 2005
11
0
18,510
Archived from groups: rec.games.roguelike.nethack (More info?)

Alright, I've made some progress. By messing around with recovery.c
I've managed to get "recover -d ./ alock" to produce a 1.5mb save file
with the name "T" (I forced the name so it wouldn't use a blank one).

I copy T to my save directory with the name 1000agony and load nethack,
and I get:

"Version mismatch for file "/var/games/nethack/save/1000agony"."

along with the starting nethack screen. Any ideas what I could do to
fix the save file?
 

stilllife

Distinguished
Jul 25, 2005
11
0
18,510
Archived from groups: rec.games.roguelike.nethack (More info?)

chuck wrote:
> you've got me. changing recover.c changes everything probably. keep a backup
> of the alock files, uninstall nethack. Then with CLEAN source recompile and
> reinstall, copy the alock files into the "lib" directory for nethack, and
> depending where recover is ( it SHOULD NOT be in "lib" unless you
> specifically copy it there) do a copy of the alock files AS ROOT then a
> recover AS GAMES. If that doesn't do it, the alock files are corrupted.
> Follow these directions EXACTLY with no alterations.

I followed those exactly, and the result is:

games at stilllife in nethack $ ./recover alock
Cannot create savefile .

It's still trying to write to the file with an empty name.
 

Chuck

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

"stilllife@gmail.com" <stilllife@gmail.com> wrote in
news:1122274832.986281.202270@g43g2000cwa.googlegroups.com:

> Well, the wonderful power in my house decided to blink off and on while
> I was in the middle of a game of Nethack, and now I can't seem to get
> the game back. It was going VERY well, and I haven't managed to ascend
> yet so I would really like to get this game back.
>
> There is a slew of alock.XX files in my nethack data directory. When I
> try to use:
>
> /usr/share/games/nethack/recover -d . alock
>
> I get:
>
> Cannot create savefile .
>
> I've recovered a game with recover before, so I don't know what's wrong
> this time. I don't think the permissions are screwed up, and I even
> tried running it as root with the same effect.
>
> I'm running Gentoo Linux and Nethack 3.4.3. Any help would be
> appreciated. Thanks!
>

try logging on as games (use root to set a password). Type recover by itself
to make sure you don't have another command of the same name; copy the
alock files to another directory to keep a backup in case something goes
wrong, then change to the nethack directory and type: recover alock. Make
sure that df reports > 0 bytes free and that no files are in the save
directory. This should create a file called 1000<playername> in save. Make
sure the file is not zero sized, then logout, login as your player, and try
nethack. If this doesn't work make sure there is one file for each level
you've been to. level one is alock.1, the mines are alock.8# and so on. You
should also have a alock.0 file. Note: do not use an extension for alock when
you do recover as it will then lock for alock.0.0 alock.0.1 and so on.
 
G

Guest

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

> agony at stilllife in nethack $ /usr/share/games/nethack/recover
> ./alock
> Cannot open level 0 for ./alock.
> agony at stilllife in nethack $ /usr/share/games/nethack/recover
> /var/games/nethack/alock
> Cannot create savefile .
>
> I took a look in the source code and the output "Cannot create savefile
> ." seems to indicate that it's trying to create a save file with a
> blank name (which obviously won't work). Anyone know why this might be
> happening?

I rarely use the recover program (thank $deity!) but I think that just the
syntax is wrong.
Try recover ./alock.0 or variations thereof.

Greetings,
Benjamin

--
____ _ _ ____ _ _ _ _____ __ __
/ ___|| | / \ / ___|| | | ( ) ____| \/ |
\___ \| | / _ \ \___ \| |_| |/| _| | |\/| |
___) | |___ / ___ \ ___) | _ | | |___| | | |
|____/|_____/_/ \_\____/|_| |_| |_____|_| |_|
play online: telnet://slashem.crash-override.net
view scores: http://slashem.crash-override.net
watch deaths: irc://irc.freenode.net#slashem
 
G

Guest

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

Benjamin Schieder <blindcoder@scavenger.homeip.net> writes:

> > agony at stilllife in nethack $ /usr/share/games/nethack/recover ./alock
> > Cannot open level 0 for ./alock.
> > agony at stilllife in nethack $ /usr/share/games/nethack/recover
> > /var/games/nethack/alock
> > Cannot create savefile .

> > I took a look in the source code and the output "Cannot create savefile
> > ." seems to indicate that it's trying to create a save file with a
> > blank name (which obviously won't work). Anyone know why this might be

> I rarely use the recover program (thank $deity!) but I think that just the
> syntax is wrong.
> Try recover ./alock.0 or variations thereof.

I don't remember the latest time I needed it either, but the manpage
indicates it should be without the .0 suffix.

But what about permissions? Did you (the original poster) try to run it
as a normal user? At least on my linux system recover doesn't have the
suid or sgid bit set, so I suppose it only works when run as root.
(Which makes sense: otherwise anybody could use it whether or not there is
a legitimate reason to run it..)

--
Jukka Lahtinen
 
G

Guest

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

Jukka Lahtinen <jslnews@despammed.com> wrote:
> Benjamin Schieder <blindcoder@scavenger.homeip.net> writes:
>
>> > agony at stilllife in nethack $ /usr/share/games/nethack/recover ./alock
>> > Cannot open level 0 for ./alock.
>> > agony at stilllife in nethack $ /usr/share/games/nethack/recover
>> > /var/games/nethack/alock
>> > Cannot create savefile .
>
>> > I took a look in the source code and the output "Cannot create savefile
>> > ." seems to indicate that it's trying to create a save file with a
>> > blank name (which obviously won't work). Anyone know why this might be
>
>> I rarely use the recover program (thank $deity!) but I think that just the
>> syntax is wrong.
>> Try recover ./alock.0 or variations thereof.
>
> I don't remember the latest time I needed it either, but the manpage
> indicates it should be without the .0 suffix.

I'm not quite sure (and not inclined to check at the moment), but isn't
the lockfile different from the temp level files created by nethack?

I mean, I seem to recall recover needs the temp level file base name,
which on a *nix is usually player name prefixed with UID?

--
Pasi Kallinen
paxed@alt.org
 

Chuck

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

"stilllife@gmail.com" <stilllife@gmail.com> wrote in
news:1122323603.693231.201680@g49g2000cwa.googlegroups.com:

>> chuck wrote:
>> try logging on as games (use root to set a password). Type recover by
itself
>> to make sure you don't have another command of the same name; copy the
>> alock files to another directory to keep a backup in case something goes
>> wrong, then change to the nethack directory and type: recover alock. Make
>> sure that df reports > 0 bytes free and that no files are in the save
>> directory. This should create a file called 1000<playername> in save.
>
> Following the instructions:
>
> agony at stilllife in nethack $ su - games
> Password:
> games at stilllife in games $ cd /var/games/nethack/
> games at stilllife in nethack $ df -h
>
> Filesystem Size Used Avail Use% Mounted on
> /dev/hda3 112G 88G 24G 79% /
> none 62M 0 62M 0% /dev/shm
> games at stilllife in nethack $ recover
> -bash: recover: command not found
no, try ./recover alock - the command is in that directory therefore you
specify it's path, but not alock's.

> games at stilllife in nethack $ /usr/share/games/nethack/recover alock
> Cannot open level 0 for alock.
there is no alock.0 in that dir.
> games at stilllife in nethack $ /usr/share/games/nethack/recover
> /var/games/nethack/alock
> Cannot create savefile .
> games at stilllife in nethack $ /usr/share/games/nethack/recover -d
> /var/games/nethack /var/games/nethack/alock
> Cannot create savefile .
games probably doesn't have write access to var or one of the subdirs.
>
> Very odd behavior. I'm not sure why it keeps trying to create a file
> with a blank name.

>> If this doesn't work make sure there is one file for each level
>> you've been to. level one is alock.1, the mines are alock.8# and so on.
You
>> should also have a alock.0 file.
>
> I have alock.0 to alock.72
>
in the /usr/share/games/nethack directory? this directory should also have
several files with .lev for the extension and a save subdirectory.
 

Chuck

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

"stilllife@gmail.com" <stilllife@gmail.com> wrote in
news:1122334423.808025.302010@z14g2000cwz.googlegroups.com:

> Alright, I've made some progress. By messing around with recovery.c
> I've managed to get "recover -d ./ alock" to produce a 1.5mb save file
> with the name "T" (I forced the name so it wouldn't use a blank one).
>
> I copy T to my save directory with the name 1000agony and load nethack,
> and I get:
>
> "Version mismatch for file "/var/games/nethack/save/1000agony"."

probably due to changing source code.

> along with the starting nethack screen. Any ideas what I could do to
> fix the save file?
>
you've got me. changing recover.c changes everything probably. keep a backup
of the alock files, uninstall nethack. Then with CLEAN source recompile and
reinstall, copy the alock files into the "lib" directory for nethack, and
depending where recover is ( it SHOULD NOT be in "lib" unless you
specifically copy it there) do a copy of the alock files AS ROOT then a
recover AS GAMES. If that doesn't do it, the alock files are corrupted.
Follow these directions EXACTLY with no alterations.
 

Chuck

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

"stilllife@gmail.com" <stilllife@gmail.com> wrote in
news:1122341265.533404.266200@g47g2000cwa.googlegroups.com:

> chuck wrote:
>> you've got me. changing recover.c changes everything probably. keep a
backup
>> of the alock files, uninstall nethack. Then with CLEAN source recompile
and
>> reinstall, copy the alock files into the "lib" directory for nethack, and
>> depending where recover is ( it SHOULD NOT be in "lib" unless you
>> specifically copy it there) do a copy of the alock files AS ROOT then a
>> recover AS GAMES. If that doesn't do it, the alock files are corrupted.
>> Follow these directions EXACTLY with no alterations.
>
> I followed those exactly, and the result is:
>
> games at stilllife in nethack $ ./recover alock
> Cannot create savefile .
>
> It's still trying to write to the file with an empty name.
>
>

and you did the recover logged in as games? Something is wrong with your
source, compile or the way the save was originally done. The only possibility
is if any of the files are of zero length, or possibly deleting the last
created file (showing if it's corrupt). Sorry, but sometimes things just
don't work unless you know EVERY single fact about something...