IFL.LOG
IFL.LOG
I'm doing automated restores using the bootfile method of IFL. Impressive and fast.
Can I adapt the script so that the log is copied to a HD partition at the end of the restore, before the restart? I'd like to be able to view the log in Windows.
Edit... emailing the log works fine. Just interested in the other option.
Can I adapt the script so that the log is copied to a HD partition at the end of the restore, before the restart? I'd like to be able to view the log in Windows.
Edit... emailing the log works fine. Just interested in the other option.
-
- Posts: 1646
- Joined: Fri Aug 12, 2011 12:51 am
Re: IFL.LOG
Brian,
If you don't want to use Linux mounting you can use TBOSDT to mount the partition and copy the log file.
For example:
copylog.tbs (placed in ifl_scripts folder)
--------------
sub main()
printl("Copying log file...")
ext("open fs 0: 0 0x1")
ext("copy file /tbu/ifl.log 0:\iflauto.log -y")
ext("close fs 0:")
printl("Copy finished.")
end sub
--------------
Then setup the script being run to run copylog.tbs and then reboot.
script1
--------------
#! /bin/bash
/tbu/imagel -v --f:/mnt/thisfile.tbi
/tbu/tbosdt /tbu/scripts/copylog.tbs
reboot
--------------
If you don't want to use Linux mounting you can use TBOSDT to mount the partition and copy the log file.
For example:
copylog.tbs (placed in ifl_scripts folder)
--------------
sub main()
printl("Copying log file...")
ext("open fs 0: 0 0x1")
ext("copy file /tbu/ifl.log 0:\iflauto.log -y")
ext("close fs 0:")
printl("Copy finished.")
end sub
--------------
Then setup the script being run to run copylog.tbs and then reboot.
script1
--------------
#! /bin/bash
/tbu/imagel -v --f:/mnt/thisfile.tbi
/tbu/tbosdt /tbu/scripts/copylog.tbs
reboot
--------------
Re: IFL.LOG
Paul,
Many thanks for that. Brilliant as usual.
Many thanks for that. Brilliant as usual.
Re: IFL.LOG
Everything is working well but for my own education can ifl.log be written to ifl.bin?
-
- Posts: 305
- Joined: Wed Aug 31, 2011 4:22 pm
Re: IFL.LOG
If you wanted to, yes. One way would be to use tbosdt to mount the partition containing ifl.bin, and then mount the ifl.bin file itself, to copy the log file to it. The script below is a variation of the previous script that would do the job:
copylog2.tbs to be placed in the ifl_scripts directory:
----------------------------------------------------------------------------
sub main()
printl("Copying log file...")
ext("open fs 0: 0 0x1")
ext("open fs 1: 0:/iflboot/ifl.bin")
ext("copy file /tbu/ifl.log 1:/iflauto.log -y")
ext("close fs 1:")
ext("close fs 0:")
printl("Copy finished.")
end sub
----------------------------------------------------------------------------
And that script could be called from a Linux shell script like the one below:
shell script (e.g. script1) to be placed in the ifl_scripts directory:
--------------------------------------------------------------------------------------------
#! /bin/bash
# create image
/tbu/imagel --b --d:l0@0x1 --f:l0@0x8282:"/win7.tbi" --vb --uy
# save log file to ifl.bin
/tbu/tbosdt /tbu/scripts/copylog2.tbs
# reboot when ready (optional)
echo "Press <Enter> to reboot..."
read xyz
reboot
--------------------------------------------------------------------------------------------
Of course, once you get back into Windows, you would have to access the contents of the ifl.bin file to view the log. That file is a FAT file system contained in a file, so you could use tbosdtw.exe to mount the file, and then use the tbosdt 'type' command to list the file contents. Or use some other software that can access a fs within a file.
copylog2.tbs to be placed in the ifl_scripts directory:
----------------------------------------------------------------------------
sub main()
printl("Copying log file...")
ext("open fs 0: 0 0x1")
ext("open fs 1: 0:/iflboot/ifl.bin")
ext("copy file /tbu/ifl.log 1:/iflauto.log -y")
ext("close fs 1:")
ext("close fs 0:")
printl("Copy finished.")
end sub
----------------------------------------------------------------------------
And that script could be called from a Linux shell script like the one below:
shell script (e.g. script1) to be placed in the ifl_scripts directory:
--------------------------------------------------------------------------------------------
#! /bin/bash
# create image
/tbu/imagel --b --d:l0@0x1 --f:l0@0x8282:"/win7.tbi" --vb --uy
# save log file to ifl.bin
/tbu/tbosdt /tbu/scripts/copylog2.tbs
# reboot when ready (optional)
echo "Press <Enter> to reboot..."
read xyz
reboot
--------------------------------------------------------------------------------------------
Of course, once you get back into Windows, you would have to access the contents of the ifl.bin file to view the log. That file is a FAT file system contained in a file, so you could use tbosdtw.exe to mount the file, and then use the tbosdt 'type' command to list the file contents. Or use some other software that can access a fs within a file.
Re: IFL.LOG
Tom, that is excellent too.
I like this ifl.bin method of restoring. I created a single ifl.bin with no script and the RUNSCRIPTS line commented out. I have a series of scripts and IFL_BOOT.CFG files. I can use this example .run file to prepare ifl.bin prior to a validate (or a restore/backup).
open fs 0: N:\IFLBOOT\ifl.bin
copy IFL_BOOT.CFG 0: /y
del file 0:scripts\* /y
copy validate 0:scripts /y
copy copylog.tbs 0:scripts /y
copy copylog2.tbs 0:scripts /y
close fs 0:
I like this ifl.bin method of restoring. I created a single ifl.bin with no script and the RUNSCRIPTS line commented out. I have a series of scripts and IFL_BOOT.CFG files. I can use this example .run file to prepare ifl.bin prior to a validate (or a restore/backup).
open fs 0: N:\IFLBOOT\ifl.bin
copy IFL_BOOT.CFG 0: /y
del file 0:scripts\* /y
copy validate 0:scripts /y
copy copylog.tbs 0:scripts /y
copy copylog2.tbs 0:scripts /y
close fs 0:
Re: IFL.LOG
WOW! I cannot understand it but it is beautiful.
I cannot get my head around this scripting. I need to understand
something like this rather than learn it parrot-fashion. There was
some talk some time ago of TBU providing a script builder via a GUI.
Are there any tutorials for complete novices?
--
Cheers
DrT
______________________________
We may not be able to prevent the stormy times in
our lives; but we can always choose to dance
in the puddles (Jewish proverb).
I cannot get my head around this scripting. I need to understand
something like this rather than learn it parrot-fashion. There was
some talk some time ago of TBU providing a script builder via a GUI.
Are there any tutorials for complete novices?
--
Cheers
DrT
______________________________
We may not be able to prevent the stormy times in
our lives; but we can always choose to dance
in the puddles (Jewish proverb).
-
- Posts: 305
- Joined: Wed Aug 31, 2011 4:22 pm
Re: IFL.LOG
Brian K wrote:
> Tom, that is excellent too.
>
> I like this ifl.bin method of restoring. I created a single ifl.bin with no
> script and the RUNSCRIPTS line commented out. I have a series of scripts
> and IFL_BOOT.CFG files. I can use this example .run file to prepare ifl.bin
> prior to a validate (or a restore/backup).
>
> open fs 0: N:\IFLBOOT\ifl.bin
> copy IFL_BOOT.CFG 0: /y
> del file 0:scripts\* /y
> copy validate 0:scripts /y
> copy copylog.tbs 0:scripts /y
> copy copylog2.tbs 0:scripts /y
> close fs 0:
Brain, I guess I didn't quite understand the purpose of your question, but in any case, it looks like you've worked out a nice alternative way to work with boot files.
> Tom, that is excellent too.
>
> I like this ifl.bin method of restoring. I created a single ifl.bin with no
> script and the RUNSCRIPTS line commented out. I have a series of scripts
> and IFL_BOOT.CFG files. I can use this example .run file to prepare ifl.bin
> prior to a validate (or a restore/backup).
>
> open fs 0: N:\IFLBOOT\ifl.bin
> copy IFL_BOOT.CFG 0: /y
> del file 0:scripts\* /y
> copy validate 0:scripts /y
> copy copylog.tbs 0:scripts /y
> copy copylog2.tbs 0:scripts /y
> close fs 0:
Brain, I guess I didn't quite understand the purpose of your question, but in any case, it looks like you've worked out a nice alternative way to work with boot files.
Re: IFL.LOG
Sorry for the confusion, Tom. No question intended. Just a comment about my variation of the method.
Re: IFL.LOG
Tom, another comment and not a question. Prior to using this bootfile method for auto restores I was using a partition containing TeraByte WinRE with IFW. I used TBOSDT to copy the relevant IFW restore batch file to the partition and then booted the WinRE. The main reason I changed methods is the IFL restore is slightly faster (on my computer) than the IFW restore. When I tested last year the IFW restore was slightly faster.