Use File System Label with "Multiple File Set" IFL

User discussion and information resource forum for Image products.
Post Reply
ml49701
Posts: 3
Joined: Mon Jul 27, 2015 4:16 pm

Use File System Label with "Multiple File Set" IFL

Post by ml49701 »

I have built a grub2 multiboot system with 14 linux distros, 1 grub2 boot partition and 1 common swap partition used by each of the 14 distros: all 16 partitions are logical drives contained in one extended disk partition on an MBR drive.

Image for Linux offers a "Multiple File Set" to store backup images of all 16 logical drives /partitions. The file name template that is offered for naming these files when the multiple file set option is chosen is not useful identifying the image.

Unuseful labeling
Backup1-2015-12-04.tbi
Backup2-2015-12-04.tbi
..
..

I would like to have each file created named with the file system label displayed in the partition selection window. I have assigned these file system labels with linux application gparted.

Useful labeling:
UbuntuGnome1510-2015-12-04.tbi
UbuntuMate1510-2015-12-04.tbi
..
..

Is there a variable for the file system label that can be used in the filename field, like the variables used to place the current date and time? Must this be done with some kind of script?

Thanks in advance,
Longtime Terabyte Licensed User
TeraByte Support
Posts: 3616
Joined: Thu May 05, 2011 10:37 pm

Re: Use File System Label with "Multiple File Set" IFL

Post by TeraByte Support »

it will just take your base name and add numbers to the end. you'd have to
script the backup with a custom name.

there is no need to use multiple file sets, you can do it in a single file
and restore just one partition if needed.



"ml49701" wrote in message news:10645@public.image...

I have built a grub2 multiboot system with 14 linux distros, 1 grub2 boot
partition and 1 common swap partition used by each of the 14 distros: all 16
partitions are logical drives contained in one extended disk partition on
an MBR drive.

Image for Linux offers a "Multiple File Set" to store backup images of all
16 logical drives /partitions. The file name template that is offered for
naming these files when the multiple file set option is chosen is not useful
identifying the image.

Unuseful labeling
Backup1-2015-12-04.tbi
Backup2-2015-12-04.tbi
...
...

I would like to have each file created named with the file system label
displayed in the partition selection window. I have assigned these file
system labels with linux application gparted.

Useful labeling:
UbuntuGnome1510-2015-12-04.tbi
UbuntuMate1510-2015-12-04.tbi
...
...

Is there a variable for the file system label that can be used in the
filename field, like the variables used to place the current date and time?
Must this be done with some kind of script?

Thanks in advance,
Longtime Terabyte Licensed User

ml49701
Posts: 3
Joined: Mon Jul 27, 2015 4:16 pm

Re: Use File System Label with "Multiple File Set" IFL

Post by ml49701 »

Do you have a working script that will do what I am trying to do? If so please post it here. How do I install the script in Image for Linux boot CD?

Thanks in advance
Mark
Saginaw Michigan
TeraByte Support(TP)
Posts: 305
Joined: Wed Aug 31, 2011 4:22 pm

Re: Use File System Label with "Multiple File Set" IFL

Post by TeraByte Support(TP) »

ml49701 wrote:
> Do you have a working script that will do what I am trying to do? If so
> please post it here. How do I install the script in Image for Linux boot
> CD?
>
> Thanks in advance
> Mark
> Saginaw Michigan

The script below can serve as a template (about the simplest possible), that you can copy and modify to make it specific to your system and the actual image operations you want to do.
-----------------------------------------------------------------------------------------------------------------------------------
#! /bin/sh

/tbu/imagel --b --d:l0@0x7 --f:l1@0x1:"/alien/swap-\$~YYYY\$-\$~MM\$-\$~DD\$" --vb --uy
# iflerror=$?; if [ "$iflerror" != "0" ]; then exit $iflerror; fi

/tbu/imagel --b --d:l0@0x1 --f:l1@0x1:"/alien/esp-\$~YYYY\$-\$~MM\$-\$~DD\$" --vb --uy
# iflerror=$?; if [ "$iflerror" != "0" ]; then exit $iflerror; fi
------------------------------------------------------------------------------------------------------------------------------------

The above is set up to create images of 2 partitions with resulting file names of "swap-2015-12-06.tbi", and "esp-2015-12-06.tbi". It can be expanded to back up additional partitions by adding a line for each additional partition. The iflerror lines are optional, and can be used if you want the script to exit when it encounters an error condition during any of the image operations. To use those lines, uncomment them (remove the "#"), or just delete them otherwise.

To get the script onto the IFL boot disk, you would copy the script file (text file) into the "scripts" directory in your makedisk folder (IFL folder). Then run makedisk and create a "Custom" boot disk. When you get to the "Boot Option - Scripting" screen, refer to page 22 in the IFL manual for an explanation of the scripting options. For example, if you select the "Select at Boot" option, a menu of scripts will appear on boot (a menu of 1 script in this case), and you'll be able to run the script by selecting it and run it from the menu.

The actual command lines you need for your images can be generated by IFL by using the Show Command and Save Command options in IFL. These are explained on page 48 of the IFL manual. Essentially, you run through the IFL menus to set up a backup operation for each partition, and then Show the command, and Save the command to a script file when you get to the Options screen. Note that after selecting Save, you have a chance to edit the command line, giving you a chance to get the fs label into the file name (or you can also edit the script later).
Post Reply