Page 1 of 1

[solved]xzm recovery?

Posted: 21 Mar 2012, 15:24
by banshee22
Hi All,

I'm facing an issue with an xzm module I've made for myself. When executing xzm2dir on it, I've this error:
Parallel unsquashfs: Using 4 processors
Lseek failed because Invalid argument
read_block: failed to read block @0xc7bc0855a4606ec5
read_uids_guids: failed to read id table block
FATAL ERROR aborting: failed to uid/gid table

Unfortunatly, I've no other copy from this module which took me lot of time....It's definitively lost?

Banshee

Re: xzm recovery?

Posted: 21 Mar 2012, 15:32
by Hamza
Bonjour

I cannot confirm anything but fanthom should do.

I don't think that is possible to recover a corrupted xzm module because it is compressed and meta data are stripped.

Anyway I don't know much things on it :oops:

Bonne Chance

Re: xzm recovery?

Posted: 21 Mar 2012, 15:55
by bigbass
banshee22
I'm facing an issue with an xzm module I've made for myself. When executing xzm2dir on it
Do you still have the folder that you used to make the module?
if the answer is yes you could manually slackware package it first using makepkg (and add the slack.desc)

then tgz2xzm it

Joe

this is extra but if you want to go another way to make the module
*if you add a version number to the folder
you could use my tool to dragNdrop the folder on the script and auto make the slack.desc and package :D

call this folder2tgz and make it executable

*you would need to edit my signature out of the package name and slack.desc
-2_PORT you could edit to -1_BAN maybe as an example only and -i486 to -x86_64

Code: Select all

#!/bin/bash 

# Joe Arose aka..big_bass
# dragNdrop a *tar.gz ,*tgz , or whatever it gets cut off anyway 
# make a blank slack-desc
# it opens in leafpad to add info 
# make a new file with time stamp 

# strip off the path 
basename "$@" >/root/nameofpackage

mkdir -p  "$@"/install


# filter the name by removing the version numbers 
# since this is a drag  N drop you may need to edit the field cut

# this cuts off everything after the first  "-"   cut -f 1 -d '-'` 
# this cuts off everything after the second "-"   cut -f 1,2 -d '-'` 

PKGNAME=`grep '-' /root/nameofpackage| cut -f 1 -d '-'` 

# clean up old files 
rm /root/nameofpackage

 
CHAR=`echo "$PKGNAME" | wc -c | sed s/^\ *//`
echo $CHAR


CHAR=`echo "$PKGNAME" | wc -c | sed s/^\ *//`
COUNTER="1"
cat << COMMENT > /root/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

COMMENT
while [ $COUNTER -lt $CHAR ]; do
    echo -n " " >> /root/slack-desc
    COUNTER=`expr $COUNTER + 1`
done
echo "|-----handy-ruler------------------------------------------------------|" >>/root/slack-desc
echo "$PKGNAME: $PKGNAME 
$PKGNAME:
$PKGNAME:
$PKGNAME:
$PKGNAME:
$PKGNAME:
$PKGNAME:
$PKGNAME:
$PKGNAME: Package created for Porteus by bigbass
$PKGNAME:
$PKGNAME:">>/root/slack-desc


leafpad /root/slack-desc

cp /root/slack-desc "$@"/install




#-----------build package part---------



#Joe Arose aka..big_bass 
#folder to slackware tgz 
#---------------------------------------



# check if file was selected
if [ "`basename "$1" `" = "" ] > /dev/null 2>/dev/null
then
 echo "This is a drag N drop only."
 echo "Please drag N drop a folder on this script ."
 sleep 10 #some time to read
 exit -1
fi

#what if no file is selected?
if [$1 = ]; then
                  echo "no files given"
                  sleep 5
              exit 0
 
               fi



cd   "$1"
makepkg -l y -c n /tmp/`basename "$1"`"-i486-2_PORT.tgz"
 Xdialog --title "Complete" \
        	--infobox "\nConversion to /tmp/`basename "$1"`"-i486-2_PORT.tgz" has finished.\n" 0 0 8000
 
mv  /tmp/`basename "$1"`"-i486-2_PORT.tgz" .




Re: xzm recovery?

Posted: 21 Mar 2012, 22:00
by fanthom
@banshee22

maybe only a part of xzm archive is corrupted - please try to mount it on a loop device:

Code: Select all

mloop path_to.xzm
and check if you get anything in /mnt/loop folder.
if it's empty then you wont be able to recover anything i'm afraid.

Re: xzm recovery?

Posted: 22 Mar 2012, 02:11
by brokenman
From console type unsquashfs --help

Look for the -check-data and -recover options. It is a long shot ... but better than a poke in the eye with a hot stick.