Using IFL UFD for an auto restore

Discussion in 'backup, imaging & disk mgmt' started by Brian K, Mar 15, 2025.

  1. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,560
    Location:
    NSW, Australia
    Create the UFD and select...
    Traditional - You have control over options (Custom)
    Leave Boot Drive Mounted as /tbu/boot
    Run List - Run Scripts Listed in scriptslist.txt

    I created the following files in D:\RESTORE\UFD but you can choose your own folder. My UFD was F:\

    type.cmd

    Code:
    @echo off
    CD /d %~dp0
    set TBpath=C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\TeraByte OSD Tool Suite Pro\win
    "%TBpath%\tbosdtw64.exe" type.tbs
    echo.
    pause
    shutdown /r /t 0
    type.tbs

    Code:
    sub main()
      ext("del file F:\scripts\scriptslist.txt /y")
      printl("Creating scriptslist.txt")
      ext("SET TEXTLINE F:\scripts\scriptslist.txt ^"copy-paste.tbs^"")
      printl(" ")
      ext("type F:\scripts\scriptslist.txt")
      printl(" ")
      exec("copy ^"D:\RESTORE\UFD\copy-paste.tbs^" F:\scripts /y")
      exec("copy ^"D:\RESTORE\UFD\reboot.sh^" F:\scripts /y")
      printl(" ")
      ext("type F:\scripts\copy-paste.tbs")
    end sub
    copy-paste.tbs

    Code:
    sub main()
      imagename=""
      printl(" ")
      printl("Restore pasted")
      printl(" ")
      exec("/tbu/imagel --r --uy --d:{C877E477-B86F-5A4A-B5FA-416628000000} --f:{018EA340-6246-11EC-96FC-E0D55E8553D4}@0x3:^"/TeraByte_TBI_Backups/" # imagename # "^" --sp:0x1,0x2,0x3,0x4 --wco", 1)
      ext("del file /tbu/boot/scripts/scriptslist.txt -y")
      ext("SET TEXTLINE /tbu/boot/scripts/scriptslist.txt ^"^"")
      exec("/tbu/boot/scripts/reboot.sh")
    end sub
     
    reboot.sh

    Code:
    #! /bin/sh
    cd boot/scripts
    rm copy-paste.tbs
    reboot
    
    Before starting, copy/paste the image filename you want to restore to the first line of copy-paste.tbs. For example...

    imagename="4part_2025-03-15-1404_DIFF_2025-03-15-1800"

    The file extension isn't needed.

    Make sure your path and drive letters are correct. Right click type.cmd and Run as administrator. Follow instructions. The computer reboots. Manually boot the UFD. IFL boots, the restore runs and Windows boots.
     
    Last edited: Mar 15, 2025
  2. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,560
    Location:
    NSW, Australia
    If you add the appropriate bootnext line to type.tbs, the UFD won't need to be manually booted. It will auto boot.

    Code:
    sub main()
      ext("set uefi bootnext 0x74B3")
      ext("del file F:\scripts\scriptslist.txt /y")
      printl("Creating scriptslist.txt")
      ext("SET TEXTLINE F:\scripts\scriptslist.txt ^"copy-paste.tbs^"")
      printl(" ")
      ext("type F:\scripts\scriptslist.txt")
      printl(" ")
      exec("copy ^"D:\RESTORE\UFD\copy-paste.tbs^" F:\scripts /y")
      exec("copy ^"D:\RESTORE\UFD\reboot.sh^" F:\scripts /y")
      printl(" ")
      ext("type F:\scripts\copy-paste.tbs")
    end sub
     
  3. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,560
    Location:
    NSW, Australia
    set uefi bootnext can give varied results depending on your UEFI BIOS.
    The following is reliable and works whether the UFD was inserted pre boot time or not.

    Code:
    "add uefi bootitem 4 0x01 ufd 0xFFFF /u"
    "set uefi bootnext 0xFFFF"
    The "4" refers to the Disk number of the UFD as seen in Disk Management. My UFD was 4. The UFD boots at the next restart. Pressing F12 isn't needed.

    You need TBOSDT Pro for BootIt Version for "add uefi bootitem".
     
    Last edited: Mar 17, 2025
  4. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,560
    Location:
    NSW, Australia
    This is the only line that needs to be changed to suit your computer...

    exec("/tbu/imagel --r --uy --d:{C877E477-B86F-5A4A-B5FA-416628000000} --f:{018EA340-6246-11EC-96FC-E0D55E8553D4}@0x3:^"/TeraByte_TBI_Backups/" # imagename # "^" --sp:0x1,0x2,0x3,0x4 --wco", 1)

    You will need to change...

    C877E477-B86F-5A4A-B5FA-416628000000
    018EA340-6246-11EC-96FC-E0D55E8553D4
    @0x3:^"/TeraByte_TBI_Backups/"
    --sp:0x1,0x2,0x3,0x4 --wco

    If you run a pretend restore in IFW and copy/paste the "Show Command, Save to file" into a text file, then you will have the information.
    No other edits are needed. It really is easy!

    # imagename # is in place of the image filename.
     
    Last edited: Mar 18, 2025
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.