LogFile=%TBDrive%... syntax in 'ifw.ini' TBWinRE

User discussion and information resource forum for Image products.

LogFile=%TBDrive%... syntax in 'ifw.ini' TBWinRE

Postby rybshik1 » Thu May 21, 2020 12:23 pm

LogFile=D:\IFW_Restore\IFW_log.txt in 'ifw.ini' specifies the path and filename of the log file and works just fine.

while LogFile=%TBDrive%\IFW_Restore\IFW_log.txt does NOT.

neither does LogFile="%TBDrive%\IFW_Restore\IFW_log.txt" (with quotes)

Yet if I type %TBDrive% in CMD shell it returns "D:"

For example, the following code in RunScript.cmd works fine, too:
if not exist "%TBDrive%\IFW_Restore\" mkdir %TBDrive%\IFW_Restore

So, how do I use %TBDrive% to specify the path for a filename of the log file as a global parameter for IFW? Which can be used in IFW GIU

TBWinRE is created and used on Windows 10 machine and overall works fine

I have read https://www.terabyteunlimited.com/howto/builder_settings.htm
rybshik1
 
Posts: 10
Joined: Thu May 21, 2020 12:05 pm

Re: LogFile=%TBDrive%... syntax in 'ifw.ini' TBWinRE

Postby TeraByte Support(PP) » Thu May 21, 2020 4:34 pm

There are a couple ways around this depending on what you want.

If you only care about when IFW is started manually from TBLauncher, you can add the /logfile parameter to the TBLauncher.ini file for the IFW entry. The file can be edited by going to the TBLauncher tab in Settings and clicking on the "Edit TBLauncher.ini" link at the bottom of the window.
For example (entire IFW menu section not shown here):

Parameters=/logfile:"%TBDrive%\IFW_Restore\IFW_log.txt"

Otherwise, if you're including TBOSDT in the build (the default), you can edit the InitScript.cmd file to have TBOSDT update the ifw.ini file with the expanded path. You can edit the InitScript.cmd by going to the Scripts tab in Settings, checking the "Include InitScript.cmd" box and then clicking the "Edit" link.
For example, in InitScript.cmd:

:: ----------------------------------------------------------------------------
:: Add script commands after this line

:: set IFW log file path

if not defined TBDrive goto :EOF

:: create IFW_Restore folder on TBDrive
if not exist "%TBDrive%\IFW_Restore\" mkdir "%TBDrive%\IFW_Restore"

:: create TBOSDT run file
echo set ini "X:\Program Files\TeraByte Drive Image Backup and Restore Suite\ifw.ini" Options LogFile "%TBDrive%\IFW_Restore\ifw.log" > setlogfile.run

:: run TBOSDT run file
"X:\Program Files\TeraByte Drive Image Backup and Restore Suite\TeraByte OSD Tool Suite Pro\win\tbosdtw64.exe" setlogfile.run
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1400
Joined: Thu Aug 11, 2011 5:51 pm

Re: LogFile=%TBDrive%... syntax in 'ifw.ini' TBWinRE

Postby rybshik1 » Thu May 21, 2020 5:09 pm

TeraByte Support(PP)
I got the idea, thanks

But still curious - why so?

Why %TBDrive% does not resolve/expand to string "D:"
at
LogFile="%TBDrive%\IFW_Restore\IFW_log.txt"
rybshik1
 
Posts: 10
Joined: Thu May 21, 2020 12:05 pm

Re: LogFile=%TBDrive%... syntax in 'ifw.ini' TBWinRE

Postby TeraByte Support(PP) » Thu May 21, 2020 5:31 pm

IFW currently doesn't expand it. If expansion is supported in a future update then the work-around wouldn't be needed at that point.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1400
Joined: Thu Aug 11, 2011 5:51 pm

NT Disk Signature for USB flash drive is changing

Postby rybshik1 » Fri May 22, 2020 2:40 am

I use a 64Gb USB flash drive as TBWinRE bootable media as well as the backup destination. So my backup command line parameters are:
/d:{500B6834-700C-434D-AE46-023342701F59} /f:#0x5EC6F647@0x1:"\IFW_Restore\Backup-w0-$~YYYY$-$~MM$-$~DD$"

For one and the same USB flash drive, I noticed that its NT Disk Signature is changing almost every time I boot. So if I save the backup command line with "Save for TBWinPE" button, the next time I boot the NT Disk Signature for my USB flash drive will be different. It makes useless saving the backup command line for future backups of the same hardware.

Is there a way to force TBWinRE not to change the NT Disk Signature for the USB flash drive? Or a way to assign a specific value, such as, for example, #0x5EC6F647 ?

Feature request: to add a new LogFile option/parameter, which places a copy of IFW.LOG to the same location as the backup destination (whatever it may be).

BTW, in a similar backup scenario (USB flash drive as bootable media as well as the backup destination), but with Image for Linux V3.39 (instead of Image for Windows), IFL fails to validate the backup. It may have something to do with hardware or drivers, but it appears that Windows 10 WinRE handles my scenario (or hardware) better than do Linux kernel/drivers included with IFL 3.39.

Is there an easy way to make IFL work as good as IFW for the above scenario? Given that I do not have Linux on my computer(s).
rybshik1
 
Posts: 10
Joined: Thu May 21, 2020 12:05 pm

Re: NT Disk Signature for USB flash drive is changing

Postby TeraByte Support(PP) » Fri May 22, 2020 10:12 am

rybshik1 wrote:
> I use a 64Gb USB flash drive as TBWinRE bootable media as well as the
> backup destination. So my backup command line parameters are:
> /d:{500B6834-700C-434D-AE46-023342701F59}
> /f:#0x5EC6F647@0x1:"\IFW_Restore\Backup-w0-$~YYYY$-$~MM$-$~DD$"
>
> For one and the same USB flash drive, I noticed that its NT Disk Signature
> is changing almost every time I boot. So if I save the backup command
> line with "Save for TBWinPE" button, the next time I boot the NT
> Disk Signature for my USB flash drive will be different. It makes useless
> saving the backup command line for future backups of the same hardware.
>
> Is there a way to force TBWinRE not to change the NT Disk Signature for the
> USB flash drive? Or a way to assign a specific value, such as, for
> example, #0x5EC6F647 ?

Neither TBWinPE/RE or Builder change the disk signature. I would assume it's changing when being updated with MakeDisk since that recreates the UFD. If that's the case, you could manually update the TBWinPE/RE files after creating the build instead of running MakeDisk. Instructions on updating manually are in this KB article: https://www.terabyteunlimited.com/kb/article.php?id=620

For your build (because you're having it find the boot drive), you'd need to copy the following two files at a bare minimum:
ISO\sources\boot.wim
TBData\TBWinRE.txt

How are you running the backup? Is it automated so it runs on boot-up (using RunScript.cmd) or configured in some custom script? If so, you could let the script run IFW with using %TBDrive% where needed (could use /logfile to update/continue an existing log file):

/logfile:"%TBDrive%\IFW_Restore\ifw.log" /b /d:{500B6834-700C-434D-AE46-023342701F59} /f:"%TBDrive%\IFW_Restore\Backup-w0-$~YYYY$-$~MM$-$~DD$"

> BTW, in a similar backup scenario (USB flash drive as bootable media as
> well as the backup destination), but with Image for Linux V3.39 (instead
> of Image for Windows), IFL fails to validate the backup. It may have
> something to do with hardware or drivers, but it appears that Windows 10
> WinRE handles my scenario (or hardware) better than do Linux kernel/drivers
> included with IFL 3.39.
>
> Is there an easy way to make IFL work as good as IFW for the above
> scenario? Given that I do not have Linux on my computer(s).

What's reported for the failed validation? Are you doing a backup using direct access or mounting the UFD to a path and accessing via Linux?

The easiest method would probably be to create the IFL UFD using the Custom option and select to leave the boot media mounted (/tbu/boot). Then you could script the backup to use the /tbu/boot path (/tbu/boot/IFW_Restore, etc.) in the IFL command line or when done manually.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1400
Joined: Thu Aug 11, 2011 5:51 pm

Re: NT Disk Signature for USB flash drive is changing

Postby rybshik1 » Fri May 22, 2020 10:46 am

TeraByte Support(PP) wrote:
> The easiest method would probably be to create the IFL UFD using the Custom option
> and select to leave the boot media mounted (/tbu/boot). Then you could script the
> backup to use the /tbu/boot path (/tbu/boot/IFW_Restore, etc.) in the IFL command
> line or when done manually.
>
This is exactly what I have been successfully doing for the last several years booting off an IFL boot disk - USB3 Flash drive, for bare metal backup and restore. I have never had Linux systems (always Windows), but I liked IFL boot disk on USB3 Flash drive. It seamlessly worked when the backup destination was the internal 2d hard drive and occasionally external USB HDD.

Recently I tried (a few attempts) to back up my new Dell Latitude 5400 Windows 10 using 64Gb USB flash drive as IFL boot disk as well as the backup destination (the same scenario as with IFW above). IFL booted fine as usual, the backup creation seemed going OK, but when validation started, it continuously failed.

That was actually the reason why I tried IFW and it does the job (although less convenient than IFL boot disk). So IFW TBWinRE works well on exactly the same hardware (Dell Latitude 5400 + ADATA S102 USB Flash) as IFL 3.39 boot disk failed on. What's why I suggested that the latest WinRE for Win-10 supports my hardware scenario well, while the IFL boot disk does NOT, at least out-of-the box, with its built-in Linux kernel.

Does it seam as a reasonable assumption?
rybshik1
 
Posts: 10
Joined: Thu May 21, 2020 12:05 pm

Referencing HDD to back up

Postby rybshik1 » Fri May 22, 2020 1:06 pm

TeraByte Support(PP) wrote:
/logfile:"%TBDrive%\IFW_Restore\ifw.log" /b /d:{500B6834-700C-434D-AE46-023342701F59} /f:"%TBDrive%\IFW_Restore\Backup-w0-$~YYYY$-$~MM$-$~DD$"

Thank you! It works.

Is it possible to identify a machine's Windows system drive and reference it as a drive to back up?

Or, if there are more than one HDD on the machine, is it possible to add a script which will ask which HHD to back up and then pass it as a parameter to the above command line above?

How to change time format inside the log file to 24hrs/military ?
rybshik1
 
Posts: 10
Joined: Thu May 21, 2020 12:05 pm

Re: NT Disk Signature for USB flash drive is changing

Postby TeraByte Support » Fri May 22, 2020 9:36 pm

Maybe there is no signature, so a random one is created each time. You
can set one in Windows when you go to Disk Management it will say it
needs to be initialized. Or you can use tbosdt and the "set mbr sig"
option (help set mbr sig).

As far as IFL, you'd want to actually go through the process of
memtest86+ and the rest of it, windows and linux are going to be using
different memory areas, interface to devices, etc..

See https://www.terabyteunlimited.com/kb/article.php?id=151




On 5/22/2020 2:40 AM, rybshik1 wrote:
> I use a 64Gb USB flash drive as TBWinRE bootable media as well as the backup destination. So my backup > Is there a way to force TBWinRE not to change the NT Disk Signature for the USB flash drive? Or a way to assign a specific value, such as, for example, #0x5EC6F647 ?

>
> Is there an easy way to make IFL work as good as IFW for the above scenario? Given that I do not have Linux on my computer(s).
>
>

TeraByte Support
 
Posts: 2957
Joined: Thu May 05, 2011 3:37 pm

Re: Referencing HDD to back up

Postby rybshik1 » Sat May 23, 2020 10:40 am

> TeraByte Support(PP) wrote:
> /logfile:"%TBDrive%\IFW_Restore\ifw.log" /b
> /d:{500B6834-700C-434D-AE46-023342701F59}
> /f:"%TBDrive%\IFW_Restore\Backup-w0-$~YYYY$-$~MM$-$~DD$"

I got my script working
if not exist "%TBDrive%\IFW_Restore\" mkdir %TBDrive%\IFW_Restore

Set /P MyHDD="Type a value for MyHDD and press Enter: "
echo Variable "MyDD" is set to %MyHDD%.

start "" "%ProgramFiles%\TeraByte Drive Image Backup and Restore Suite\imagew.exe" /wait /priority:4 /b /uy /um /d:%MyHDD% /f:"%TBDrive%\IFW_Restore\hdd$~DN$-$~YYYY$-$~MM$-$~DD$\$~YYYY$-$~MM$-$~DD$-$~HHMM$" /max:4GiB /vb /comp:7 /rb:8 /logfile:"%TBDrive%\IFW_Restore\IFW_log.txt"

So, now I am still looking how to change time format inside the log file to 24hrs/military.
rybshik1
 
Posts: 10
Joined: Thu May 21, 2020 12:05 pm

Next

Return to Image for DOS/Linux/Windows