Ignite-UX

Ignite-UX. Reading tape headers without booting from tape?

 
SOLVED
Go to solution
Peter A. Berger Jr.
Regular Advisor

Ignite-UX. Reading tape headers without booting from tape?

UNIX Gurus: In regards to a make_tape_recovery Ignite-UX tape. Is there a way to read (ie: tar/cpio, etc) a tape header from an unlabeled DDS tape and determine the system hostname to which it belonged without inserting the tape, booting from it and looking at the welcome banner that says what machine hostname made the tape? It takes forever to boot these tapes just to see a hostname banner and then rebooting again to do another tape. Any help/411 would be great. Thanks. :)
11 REPLIES 11
Pete Randall
Outstanding Contributor

Re: Ignite-UX. Reading tape headers without booting from tape?

Peter,

It's a tar format. You simply have to forward space past the boot header (mt fsf 1) and then you can read it with tar. If you store a file somewhere in the root volume that identifies the host, you can then read that file and no which host you've got.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Ignite-UX. Reading tape headers without booting from tape?

Sorry - make that "know which host".


Pete

Pete
Neritan Omari
Occasional Advisor

Re: Ignite-UX. Reading tape headers without booting from tape?

Hi Peter ,

you can try :

#cat < /dev/rmt/Xm | xd -tc | head -10

it gives some info form the header of tape
i hope it's useful .


BR's
Peter A. Berger Jr.
Regular Advisor

Re: Ignite-UX. Reading tape headers without booting from tape?

I tried the:
cat < /dev/rmt/0m | xd -tc | head -xxxx
command and incremented the xxxx higher and higher, but couldn't find the system hostname in there. I even tried adding a "grep -i aad06" (aad06 = hostname) in there to no avail.
I'm assuming that since the system boots from the tape and it takes a long time to eventually reach the IgniteUX welcome banner displaying the hostname, that the information I'm looking for might not be in the header of the tape but somewhere deep in there.
I'm not too saavy at this sorta stuff so I'm pretty much stuck by incrementing the xxxx and trying again. I appreciate the help/tips though...If there's anything else I can try I will. Thanks again!!!
Stephen Keane
Honored Contributor

Re: Ignite-UX. Reading tape headers without booting from tape?

An alternate approach (if you have the disk space - around 70 MBytes) is to copy the LIF off the Ignite tape and extract the RAM fs from it. The data you are interested in is hidden in the first 8k of the RAM fs.

# mt -f /dev/rmt/0m rew
# dd if=/dev/rmt/0m of=/foo/LIF bs=2k
# lifcp /foo/LIF:INSTALLFS /foo/FS
# dd if=/foo/FS of=/foo/First8k bs=8k count=1
# grep "sysadm_message" First8k

You can then erase LIF, FS and First8k



Stephen Keane
Honored Contributor
Solution

Re: Ignite-UX. Reading tape headers without booting from tape?

Sorry, that last line should have read

# grep "sysadm_message" /foo/First8k

The advantage is that you can script this (if there are a lot of tapes to check), the only human intervention required is to load/unload the tape(s). The disadvantage is that you need around 80MBytes of spare disk space. You don't need to interrupt the process (unlike tarring a file off the tape) and the tape will be rewound at the end. It doesn't take too long to copy the LIF off the tape either.
Rene Mendez_4
Super Advisor

Re: Ignite-UX. Reading tape headers without booting from tape?

Check /etc/rc.config.d/netconf -> file contains information of the net

Restore is relative

# cd tmp
# mt -f /dev/rmt/0mn rew
# mt -f /dev/rmt/0mn fsf 1
# tar tvf /dev/rmt/0mn
#tar xvf /dev/rmt/0mn /etc/rc.config.d/netconf

Regards
Rene
Rene Mendez_4
Super Advisor

Re: Ignite-UX. Reading tape headers without booting from tape?

Check /etc/rc.config.d/netconf -> file contains information of the net

Restore is relative

# cd tmp
# mt -f /dev/rmt/0mn rew
# mt -f /dev/rmt/0mn fsf 1
# tar tvf /dev/rmt/0mn
#tar xvf /dev/rmt/0mn etc/rc.config.d/netconf

Regards
Rene
Devender Khatana
Honored Contributor

Re: Ignite-UX. Reading tape headers without booting from tape?

Peter,

Another way of doing it is to untar any file that contains hostname information. Suppose syslog.log. You can untar this file with the procedure given above from the tape and can find out for which server this backup was as there is a local hostname entry in each line of syslog.log.

HTH,
Devender
Impossible itself mentions "I m possible"