Auto reboot and restore with IFW

Discussion in 'backup, imaging & disk mgmt' started by n8chavez, Sep 14, 2021.

  1. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    I've been using brian* for years. It's very simple. No GUIs needed.
     
  2. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,336
    Location:
    Location Unknown
    What I mean is, Drivesnapshot can restore in bootable dos environment just by attempting to restore in an active OS. The same is true for Reflect. Terabyte cannot do this, without much altering. It's frustrating.
     
  3. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    This is my favourite because IFL is the fastest.

    Windows scripts to reboot into IFL...

    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%\tbosdtw.exe" type.tbs
    echo.
    pause
    D:\My_files\BOOTNOW\BIGGIGA\IFL.cmd
    Code:
    sub main()
      ext("open fs 0: 0 0x2")
      ext("del file 0:\scripts\scriptslist.txt /y")
      printl("Creating scriptslist.txt")
      ext("SET TEXTLINE 0:\scripts\scriptslist.txt ^"restore_brian_.tbs^"")
      printl(" ")
      ext("type 0:\scripts\scriptslist.txt")
      ext("close fs 0:")
    end sub
    Code:
    CD /d D:\My_files\BOOTNOW\bootnowuefi 1.02\win
    bootnowu64.exe IFL


    This is the restore script in IFL...

    Code:
    sub main()
      exec("/tbu/imagel --r --uy --d:{8B9E0625-CEAC-CAC3-DC5D-585E6A73FFFF} --f:{EC486460-7118-1AD0-A75B-585E9773FFFF}@0x2:^"/TeraByte_TBI_Backups/brian*^" --sp:0x1,0x2,0x3,0x4 --wco --rb:4", 1)
    end sub
     
  4. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    This process can be fully automated. You could get the BIOS to start your computer at 0300 and then a Scheduled Task could start the restore at 0330. Then your computer could shutdown at 0400.
     
  5. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,336
    Location:
    Location Unknown
    This is just a simple bat pointing to OSDT right?

    What file is this?

    How did you make this file. When running a restore I see no option to "Save for TBWinPE".
     
  6. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    Nate,

    Sorry for the omission. The first 3 scripts are...

    type.cmd
    type.tbs
    IFL.cmd

    The last script is created in IFL on the HD. (I called it "restore_brian_.tbs")(but no " ") There is no "Save for TBWinPE" option in IFL. You would use "Show Command" and save it to the boot/scripts folder. Don't save it to the scripts folder.
    When making the IFL boot media you have to use these options...

    Traditional Custom
    Leave Boot Drive Mounted as /tbu/boot
    Run List - Run Scripts Listed in scriptslist.txt

    Then you copy the IFL partition to your HD and setup a Boot Item in BootIt. You can resize the IFL partition to 150 MiB.
     
    Last edited: Sep 19, 2021
  7. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    In the second script...

    ext("open fs 0: 0 0x2")

    ...is the IFL partition on the HD.
     
  8. Gaddster

    Gaddster Registered Member

    Joined:
    Dec 11, 2013
    Posts:
    140
    Location:
    UK
    Thanks Brian.

    I'm going to tinker about with IFW and see what I can conjure up.
     
  9. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    Out of interest, if you delete the contents of rest-bw.txt (or just create an empty rest-bw.txt file) TBWinRE will boot to an IFW window. You can close IFW and have access to a lot of tools in the menu at the left of your screen.

    Perhaps first time users should do this. Have an empty rest-bw.txt. Nothing unexpected can happen.
     
  10. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    Gaddster,

    How are you going with IFW? This works from IFW bootwim. Your idea of using drive letters for a universal restore method for the family is good...

    Code:
    for %%f in (C D E F G H I J K L M N O P Q R S) do if exist %%f:\Windows\System32\ set OSPARTITION=%%f:
    for %%f in (C D E F G H I J K L M N O P Q R S) do if exist %%f:\TeraByte_TBI_Backups\IFW3\ set DESTINATION=%%f:
    start "" "X:\Program Files\TeraByte Drive Image Backup and Restore Suite\imagew.exe" /wait /r /uy /d:?%OSPARTITION% /f:"%DESTINATION%\TeraByte_TBI_Backups\IFW3\10_01" /sp:0x3 /wco /rb:4
    
     
  11. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    Fully automated. Just run "test-bootwim.cmd" and the computer restarts into TBWinRE, the restore happens and the computer restarts into Win10.
     
  12. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    You need a new TBWinRE. Use the same folder. When building the new TBWinRE, in Settings, Scripts tab, put a tick in "Include InitScript.cmd". Click Edit if the script doesn't open. Paste the following 3 lines below "echo InitScript running".

    Code:
    for %%f in (C D E F G H I J K L M N O P Q R S) do if exist %%f:\Windows\System32\ set OSPARTITION=%%f:
    for %%f in (C D E F G H I J K L M N O P Q R S) do if exist %%f:\TeraByte_TBI_Backups\ set DESTINATION=%%f:
    start "" "X:\Program Files\TeraByte Drive Image Backup and Restore Suite\imagew.exe" /wait /r /uy /d:?%OSPARTITION% /f:"%DESTINATION%\TeraByte_TBI_Backups\brian*" /sp:0x3 /wco /rb:4
    You will have to edit the second and third lines. Make sure you have /rb:4

    Make a new test-bootwim.cmd. Here is mine (from a different computer). Edit it to your path.

    Code:
    "D:\My_Files\TBWinRE_files\346pe-bootwim\tbwinpe.exe" /bootwim "D:\My_Files\TBWinRE_files\346pe-bootwim\ISO\sources\boot.wim"
    
    
    Note everything from /run onwards has been removed. (/run D:\My_Files\TBWinRE_files\rest-bw.txt)
    rest-bw.txt is no longer used.

    Double click test-bootwim.cmd and the restore happens.
    As I mentioned earlier, it's a good idea to create a backup image from bootwim instead of a restore, until you feel comfortable to do a restore.
     
    Last edited: Sep 22, 2021
  13. Gaddster

    Gaddster Registered Member

    Joined:
    Dec 11, 2013
    Posts:
    140
    Location:
    UK
    Code:
    for %%f in (C D E F G H I J K L M N O P Q R S) do if exist %%f:\Windows\System32\ set OSPARTITION=%%f:
    for %%f in (C D E F G H I J K L M N O P Q R S) do if exist %%f:\Images\ set DESTINATION=%%f:
    DEL /F /Q /A %OSPARTITION%\pagefile.sys
    DEL /F /Q /A %OSPARTITION%\hiberfil.sys
    RD /S /Q "%OSPARTITION%\System Volume Information"
    RD /S /Q %OSPARTITION%\RECYCLER
    RD /S /Q %OSPARTITION%\$Recycle.bin
    CLS
    imagew64.exe /wait /b /d:?%OSPARTITION% /f:%DESTINATION%\Images\OS-Partition /hash /usemd
    wpeutil shutdown
    The above is what I used on my sisters laptop and as a fail safe I didn't let it automatically overwrite OS-Partition.TBI.......It worked perfectly, same with the differential one.

    The PE I made was using the Windows 11 adk and only added the needed few IFW files.
     
  14. Gaddster

    Gaddster Registered Member

    Joined:
    Dec 11, 2013
    Posts:
    140
    Location:
    UK
    Myself coming from the old days of Symantec Ghost, where batch scripting was the norm. I've made all sorts of automated imaging scripts etc over the years but for normal every day computer users it is absolutely insane to expect them to do what myself, Brian and others do (especially as this stuff is normal to us).

    My family members just boot an usb stick and select either "Backup" or "Restore" and Drive Snapshot will either backup (full image and seven rotating differentials) or restore their Windows partition then turns the computer off......Asking them to download, edit batch files etc would be like asking them to write in Japanese.
     
  15. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,113
    Location:
    NSW, Australia
    Nice. You sorted it out independently.

    You can add software to TBWinRE. eg Drive Snapshot and explorer++_1.3.5_x64. You can add scripts to TBWinRE.
    These (apps/scripts) appear in the TBLauncher menu on the left of the screen so you could click the "DS restore OS" item and the restore would happen. This even works with the bootwim version so USB boot media isn't needed for a DS or IFW restore. There is no need to click through the DS or IFW GUIs to do a restore.
     
  16. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    11,126
    Location:
    U.S.A. (South)
    You fellows speak (my script backup) language and you can bet am taking notes on this end. I admire the scripts for DS and they proven very efficient. (Haven't tried with TerabyteForWindows scripts) Automation on this level may not be for everyone but once that newfound confidence pans out, it is infinitely simple and convenient. Great discussion.
     
  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.