Restoring IRIX cpio on Linux

New to SGIs? Need help getting things going? This is the forum for you!
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
cesss
Posts: 51
Joined: Mon Apr 27, 2009 8:02 am

Restoring IRIX cpio on Linux

Unread postby cesss » Thu Dec 09, 2010 8:19 am

Hi,

I'm trying to restore (in Linux) a full system backup I did on an IRIX machine (an O2) years ago. The backup was done with the GUI backup tool, choosing cpio, and it's a full system backup.

I tried with cpio -idv < mybackup.cpio on Linux, but it stops restoring after some files. Then, after some minutes, a "premature end of file error" is reported (but a number of files are restored before stopping).

I also did a cpio -itv < mybackup.cpio, and it successfully lists an small fraction of the file names in the backup, but then it displays garbage chars, and, after some minutes, ends with "unknown error".

Is there some cpio flag combination which will do the trick?

Or is there any alternative Linux tool which would restore IRIX cpio files?

Thanks!!

User avatar
kshuff
Posts: 2445
Joined: Sat Jan 08, 2005 8:13 pm
Location: Jonas, PA USA
Contact:

Re: Restoring IRIX cpio on Linux

Unread postby kshuff » Thu Dec 09, 2010 10:13 am

Maybe your original backup is corrupt
-ks

:Onyx: :Onyx: :Crimson: :O2000: :Onyx2: :Fuel: :Octane: :Octane2: :PI: :Indigo: :Indigo: :O2: :O2: :Indigo2: :Indigo2: :Indigo2IMP: :Indy: :320: :540: :O3x0: :1600SW: :1600SW: :hpserv:

See them all >here<

User avatar
PymbleSoftware
Posts: 1887
Joined: Tue Jul 15, 2008 5:48 pm
Location: P.O. Box 121, Pymble, Sydney, NSW 2073, Australia.
Contact:

Re: Restoring IRIX cpio on Linux

Unread postby PymbleSoftware » Thu Dec 09, 2010 1:40 pm

cesss wrote:Is there some cpio flag combination which will do the trick?


Blind stab in the dark here but..

Does --swap-bytes help ...?

Linux is little endian and IRIX big endian.
I haven't used cpio for a looong time.
You can't test it on another SGI box..?

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

@PymbleSoftware
Current Apps -> https://itunes.apple.com/au/artist/pymb ... d553990081
Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
Visit http://www.pymblesoftware.com
Search for "Pymble", "InstaElf", "CryWhy" or "Cricket Score Sheet" in the iPad App store or search for "Pymble" or "CryWhy" in the iPhone App store.

User avatar
porter
Posts: 2917
Joined: Wed Nov 01, 2006 10:37 pm
Location: NZ

Re: Restoring IRIX cpio on Linux

Unread postby porter » Thu Dec 09, 2010 4:37 pm

PymbleSoftware wrote:Linux is little endian and IRIX big endian.


Linux is neutral, my powerpc linux is most definitately big-endian. :)
Land of the Long White Cloud and no Software Patents.

User avatar
PymbleSoftware
Posts: 1887
Joined: Tue Jul 15, 2008 5:48 pm
Location: P.O. Box 121, Pymble, Sydney, NSW 2073, Australia.
Contact:

Re: Restoring IRIX cpio on Linux

Unread postby PymbleSoftware » Thu Dec 09, 2010 4:45 pm

porter wrote:
PymbleSoftware wrote:Linux is little endian and IRIX big endian.


Linux is neutral, my powerpc linux is most definitately big-endian. :)


:roll: OK, x86-Linux is little endian... which is 99.995% of Linux out there.. Better now?
I thought I was being a little more helpful than maybe your archive is corrupt.

I should wipe Linux-powerpc off my 9114-275 and install AIX on it.

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

@PymbleSoftware
Current Apps -> https://itunes.apple.com/au/artist/pymb ... d553990081
Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
Visit http://www.pymblesoftware.com
Search for "Pymble", "InstaElf", "CryWhy" or "Cricket Score Sheet" in the iPad App store or search for "Pymble" or "CryWhy" in the iPhone App store.

User avatar
kshuff
Posts: 2445
Joined: Sat Jan 08, 2005 8:13 pm
Location: Jonas, PA USA
Contact:

Re: Restoring IRIX cpio on Linux

Unread postby kshuff » Thu Dec 09, 2010 5:05 pm

PymbleSoftware wrote:I thought I was being a little more helpful than maybe your archive is corrupt.



With a stab in the dark? I offered an opinion which may very well be valid but not being an "expert", I guess I could be wrong.
-ks

:Onyx: :Onyx: :Crimson: :O2000: :Onyx2: :Fuel: :Octane: :Octane2: :PI: :Indigo: :Indigo: :O2: :O2: :Indigo2: :Indigo2: :Indigo2IMP: :Indy: :320: :540: :O3x0: :1600SW: :1600SW: :hpserv:

See them all >here<

User avatar
PymbleSoftware
Posts: 1887
Joined: Tue Jul 15, 2008 5:48 pm
Location: P.O. Box 121, Pymble, Sydney, NSW 2073, Australia.
Contact:

Re: Restoring IRIX cpio on Linux

Unread postby PymbleSoftware » Thu Dec 09, 2010 6:40 pm

kshuff wrote:
PymbleSoftware wrote:I thought I was being a little more helpful than maybe your archive is corrupt.



With a stab in the dark? I offered an opinion which may very well be valid but not being an "expert", I guess I could be wrong.


:roll:


Without physically being there or any evidence at all anything is merely a guess. even a stab in the dark based on a hypothesis right or wrong.. Any archive could be corrupt at any time, thats a given. Should I be rising to this...


R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

@PymbleSoftware
Current Apps -> https://itunes.apple.com/au/artist/pymb ... d553990081
Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
Visit http://www.pymblesoftware.com
Search for "Pymble", "InstaElf", "CryWhy" or "Cricket Score Sheet" in the iPad App store or search for "Pymble" or "CryWhy" in the iPhone App store.

User avatar
josehill
Moderator
Moderator
Posts: 3031
Joined: Mon Jun 06, 2005 9:53 pm
Location: New England, USA
Contact:

Re: Restoring IRIX cpio on Linux

Unread postby josehill » Thu Dec 09, 2010 7:59 pm

Ahem. Back to the topic at hand, the original poster might see if the version of cpio that he is using supports file skipping. For example, the IRIX version of cpio has a command line switch, -k, which forces cpio to read past bad file headers and tape errors. I think the GNU version of cpio does that (without a command line switch) by default, but I might be wrong.

Am I correct that you made the backup on a tape? Before you put too much wear and tear on a tape that may be in the process of failing, consider using the dd command to dump the tape contents to disk. You might also want to try restoring from the dd image.

Other things to consider: trying to restore using the same tape drive that was used to create the backup (again, assuming tape was used); trying to restore using an IRIX version of cpio, or at least a SysV version of cpio.

cesss
Posts: 51
Joined: Mon Apr 27, 2009 8:02 am

Re: Restoring IRIX cpio on Linux

Unread postby cesss » Fri Dec 10, 2010 8:18 am

Well, tried to get to the O2 machine, but... bad news, it no longer boots... amber light, the hard disk seems to not even try to spin, and, the only way of powering off is to unplug the machine -the power button doesn't help even if I press it for a long time- (and... if I plug the power cord again, it switches on without pressing the power button!!). No idea about what's happening, because this O2 used to work, and nobody opened it nor moved it, nor nothing.

Anyway, my main worry in this moment is being able to restore that backup. Regarding your questions, no, the backup wasn't done on tape, but on a disk file (IIRC it was done in another machine via LAN, but I don't remember it now). Anyway, it was done with the GUI backup tool.

I tried the --swap-bytes option with no success.

If it's of any help, the file weights 8GB.

I also tried with "bsdcpio" (from an Ubuntu distribution) and results are the same.

I've an Indigo2 with IRIX6.2, but there's no way to upload an 8GB file to it, since it has just just 6GB of filesystem space, and most of it full (just 2GB free).

User avatar
metallizer
Posts: 57
Joined: Sun Feb 01, 2009 2:51 pm

Re: Restoring IRIX cpio on Linux

Unread postby metallizer » Fri Dec 10, 2010 9:00 am

I´m running into the exec same problem with some full system backups I did over my network using the default irix backup program on 6.5.22.

I haven´t put much thought into it but so far I´ve tried with a powerbook running tiger and a x86 box running vista with GNU cpio. Both with the same results as cesss.

7zip also has support for cpio but won´t touch those irix backups.
:Indigo2: Extreme R4400 200MHz (1MB L2) 160MB

User avatar
josehill
Moderator
Moderator
Posts: 3031
Joined: Mon Jun 06, 2005 9:53 pm
Location: New England, USA
Contact:

Re: Restoring IRIX cpio on Linux

Unread postby josehill » Fri Dec 10, 2010 12:00 pm

cesss wrote:Well, tried to get to the O2 machine, but... bad news, it no longer boots... amber light, the hard disk seems to not even try to spin, and, the only way of powering off is to unplug the machine -the power button doesn't help even if I press it for a long time- (and... if I plug the power cord again, it switches on without pressing the power button!!). No idea about what's happening, because this O2 used to work, and nobody opened it nor moved it, nor nothing.

There is a thread (maybe a couple of them) that talk about O2s that have that problem. Usually pretty easily worked around. Might be worth a search. I have to go offline for a few days, so I won't be much more help, but you also may want to unplug the unit, unlatch and then reseat the main modules on the back of the machine, and try again.

cesss
Posts: 51
Joined: Mon Apr 27, 2009 8:02 am

Re: Restoring IRIX cpio on Linux

Unread postby cesss » Sat Dec 11, 2010 7:03 am

One (hopefully) quick question: Is there some way (without installing samba) of running cpio in my IRIX 6.2 Indigo2 so that it takes the file on my linux box as input and it also dumps the output in the linux box? The only connection between the two machines is a painfully simple LAN.

SAQ
Posts: 5758
Joined: Wed Jul 19, 2006 8:37 am
Location: Renton, WA

Re: Restoring IRIX cpio on Linux

Unread postby SAQ » Sat Dec 11, 2010 8:06 am

cesss wrote:One (hopefully) quick question: Is there some way (without installing samba) of running cpio in my IRIX 6.2 Indigo2 so that it takes the file on my linux box as input and it also dumps the output in the linux box? The only connection between the two machines is a painfully simple LAN.


NFS.
Damn the torpedoes, full speed ahead!

There are those who say I'm a bit of a curmudgeon. To them I reply: "GET OFF MY LAWN!"

:Indigo: :Octane: :Indigo2: :Indigo2IMP: :Indy: :PI: :O3x0: :ChallengeL: :O2000R: (single-CM)

cesss
Posts: 51
Joined: Mon Apr 27, 2009 8:02 am

Re: Restoring IRIX cpio on Linux

Unread postby cesss » Sat Dec 11, 2010 3:51 pm

Being a total newbie with NFS, the best I got is running the IRIX 6.2 nfs client in NFSv2 mode (I don't know why the NFSv3 mode fails, but I was unable to get it working). And, moreover, I get "permission denied" errors if I try to write in the shared directory even if it's mounted in read/write. Anyway, I guess NFSv2 is useless, given that the backup file is about 8GB in size.

I followed these instructions (the linux box runs ubuntu 10.10):
https://help.ubuntu.com/community/SettingUpNFSHowTo

Back to the IRIX cpio compatibility issue, I found this bit in the IRIX manpage:
-K Required for files larger than 2 Gigabytes. Cpio will issue a
warning and skip such files if an attempt is made to archive them
without specifying the -K flag. Used only with the -o option.
Mutually exclusive with -c, -H options. Because the -c option can
not be used, device files with major numbers greater than 127 or
minor numbers greater than 255 could not normally be archived; the
binary format is extended with this option so that those device
files can be backed up, but will not be able to be restored on older
or non-IRIX versions of cpio with the correct major and minor
number. Warning: Use of this option may result in the creation of
an archive that is not portable to other machines; a warning is
issued on the first file causing the archive to not be portable.

SAQ
Posts: 5758
Joined: Wed Jul 19, 2006 8:37 am
Location: Renton, WA

Re: Restoring IRIX cpio on Linux

Unread postby SAQ » Sat Dec 11, 2010 5:49 pm

NFS for IRIX 6.5 has always been NFSv3. I think 5.3 might have been NFSv2, but later on there was a NFSv3 released for 5.3 as well. At any rate the NFS CD in IRIX 6.5 includes tardists for 6.2, 6.3, 6.4 and 6.5.

NFS did used to be a separate item, but similar to the IDO it wasn't locked with a license manager.

NFS v2 vs v3 won't be a big deal for a home network. v2 uses UDP rather than TCP, so for larger networks it isn't very efficient. V4 puts in even more improvements for larger and distributed networks, and it increases security, but it's just not there for IRIX.
Damn the torpedoes, full speed ahead!

There are those who say I'm a bit of a curmudgeon. To them I reply: "GET OFF MY LAWN!"

:Indigo: :Octane: :Indigo2: :Indigo2IMP: :Indy: :PI: :O3x0: :ChallengeL: :O2000R: (single-CM)


Return to “Getting Started, Documentation, Tips & Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest