2

I'm trying to get data from magnetic tape in the ubuntu installer environment respectively the rescue mode of the ubuntu installer image.

To do so, i need to position on a distinct filespace/filemark within the magnetic tape. During normal operation the mt-st package is used for this.

So i have gone through all the *.udeb packages available in the /cdrom/pool/main tree of in the rescue mode of the ubuntu 14.04 installer image but didn't find a suitable package.

What are the possibilities?

5
  • Why do you use rescue mode? Possibilities: get internet connection and install the package with apt-get install mt-st; or: download the .deb file of the package and install it with dpkg -i /path/to/file.deb
    – Byte Commander
    Mar 10, 2015 at 11:49
  • Sorry, no clue what you are doing there... Busybox is above my knowledge.
    – Byte Commander
    Mar 10, 2015 at 13:08
  • Reason is, that i'm doing a bare metal restore using the busybox binary in the rescue-mode of the installer environment. The restore works already via ssh, USB stick, DVD. And i wanted to add magnetic tape as possible backup/restore device. Everything else worked seamlessly. So installer environment is basically enough and i wanted to avoid using the "Try ubuntu" feature for a bare metal restore since it seems rather bloated for that purpose. And a few years ago, there was a mt-st companion on the debian-installer called mt-gnu if i remember correctly.
    – QBall
    Mar 10, 2015 at 13:08
  • Ah, now I get your point. Why don't you create a customized live-cd with that package preinstalled? (Don't ask me how to do that, I only heard that it is possible, never tried)
    – Byte Commander
    Mar 10, 2015 at 13:11
  • I had already the feeling that i will have to find out more about the packages "bootcd-backup - tools to backup a Debian or alien Linux installation" and "bootcd - run your system from cd without need for disks". Just hoped to get around it since everything else already works. Another advantage of the installer environment is, that it discovers devices and needed drivers on the target system. Therefore i was able to restore on different hardware.
    – QBall
    Mar 10, 2015 at 13:41

1 Answer 1

1

As the tape devices /dev/st0 (rewinding tape drive) and /dev/nst0 (non-rewinding tape drive) are discovered, the following workaround worked for me:

dd if=/dev/st0 of=/dev/zero count=0

rewinds the tape (equals "mt -f /dev/st0 rewind").

dd if=/dev/nst0 of=/dev/zero [bs=<block size>]

"fast forwards" to the next file space (equals "mt -f /dev/nst0 fsf 1"). But be aware: I saw some "out of memory"-messages from the dd command when the tape was created with large "block size" (i used 1MiB) and the was not specified. So you should generally know the "block size" when restoring from tapes in the installer environment.

dd if=/dev/[n]st0 [bs=<block size>] | tar [<tar options>] -f - [<file spec>]

Finally retrieves the data (the "-f -" tells tar to read from STDIN). Also here it is a very good idea to know the "block size" the tape was created with.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .