IFL log file

User discussion and information resource forum for TeraByte Drive Image products, including TBNetManage.
tbifan39
Posts: 64
Joined: Fri Sep 16, 2011 5:08 pm

Re: IFL log file

Post by tbifan39 »

ADD1=scripts\*.*,>/tbu/scripts/|initrmfs

It did not work. I am giving up. Maybe someone will figure out how to get it to work someday. Thank you!
TeraByte Support(PP)
Posts: 1740
Joined: Fri Aug 12, 2011 12:51 am

Re: IFL log file

Post by TeraByte Support(PP) »

That should put the scripts into the /tbu/scripts folder of the build. Were they there when you booted to IFL and checked? If so, then it should just be a case of configuring the script to properly mount the UFD. It may have to search for it since the drive numbers can change between boots, for example. You would also need to set the IFL 'logfile' parameter to point to whatever the mounted path was for the log file.

For example:

1. Create the script file. I used "findifl" in this example. Put the script into the "scripts" subfolder of the IFL MakeDisk files.
2. Run MakeDisk and select the Traditional...Custom mode.
3. On the step to add ifl.ini options, add the logfile option: logfile=/tbu/iflmedia/ifl.log
4. On the Boot Option - Mounting step, select the "Normal Boot - Boot Drive is Not Mounted" option.
5. On the Boot Option - Scripting step, select the "Run All..." option (assumes you just put the one script in the scripts folder).
6. Finish creating the IFL ISO file.

For the findifl script, the example below just searches for a matching partition number and label. You would need to adjust as necessary to match up to your specific flash drive. This example is searching for the first partition (1) with a partition label starting with "IFL_4". If you're using a different partition label, adjust the search text to match. Also, it assumes a FAT32 partition is being used.

While testing, it's generally a lot easier to boot to IFL and just tweak and run the script until you get it working as needed. Then create the IFL boot media configured to run it on startup. To get the blkid output being used, run the Terminal and then the blkid command. For example, to list the output for /dev/sdb2, you would run: blkid /dev/sdb2

If testing in IFL and trying to run the script, you may need to set the permissions first. From a Terminal: chmod 777 findifl
Then, to run the script: ./findifl

Code: Select all

#! /bin/bash

for f in sd{a..z}
do
	p=1
	echo Checking /dev/$f$p...
	blkid /dev/$f$p | grep "LABEL=\"IFL_4" > /dev/null
	if [ "$?" = "0" ]; then
		echo IFL partition found: /dev/$f$p
		mkdir /tbu/iflmedia
		mount /dev/$f$p /tbu/iflmedia
		break
	fi
done
tbifan39
Posts: 64
Joined: Fri Sep 16, 2011 5:08 pm

Re: IFL log file

Post by tbifan39 »

OK... the script worked, but I had to run it manually.

it did not write anything to the actual USB drive. When I boot back into Windows, the /tbu/iflmedia folder was not there.
How do I save to the actual drive? The drive/partition is sdb2

I want the ifl.log to be in a folder called "TBU" on drive dev/sdb2

I want the file to still be there when I boot windows.
TeraByte Support(PP)
Posts: 1740
Joined: Fri Aug 12, 2011 12:51 am

Re: IFL log file

Post by TeraByte Support(PP) »

The "/tbu/iflmedia" folder isn't on the UFD. That's the running system location used for mounting the partition. The IFL log, if configured correctly, would be saved to the root folder of the UFD.

In the script example I posted, it's looking for a partition with a label starting with 'IFL_4' and then it would mount it. That would find the default used for the media. If you are using a different label for the partition you would need to change the search text. Also, since your partition is a '2' you would also need to change the 'p=1' to 'p=2'.

Setting up a specific folder on the partition also requires some modifications. Create the folder on the UFD (or have the script create it) and adjust the 'logfile=<path>' option to point to it (keep in mind that Linux is case-sensitive).

For example, assuming your partition label is 'MYUFD' and you want the log saved in the \TBU folder on the UFD:

When creating the IFL media, set 'logfile' to the correct path: logfile=/tbu/iflmedia/TBU/ifl.log
(step 3 in the previous example)

Code: Select all

#! /bin/bash

for f in sd{a..z}
do
	p=2
	echo Checking /dev/$f$p...
	blkid /dev/$f$p | grep "LABEL=\"MYUFD" > /dev/null
	if [ "$?" = "0" ]; then
		echo IFL partition found: /dev/$f$p
		mkdir /tbu/iflmedia
		mount /dev/$f$p /tbu/iflmedia
		mdkir /tbu/iflmedia/TBU
		break
	fi
done
tbifan39
Posts: 64
Joined: Fri Sep 16, 2011 5:08 pm

Re: IFL log file

Post by tbifan39 »

Now I understand... I thought iflmedia folder would be created on the UFD when it was mounted.

The script does not run automatically when IFL is booted. (nothing is mounted when I right-click and select Mount...
I have to open script menu and run the script.
TeraByte Support(PP)
Posts: 1740
Joined: Fri Aug 12, 2011 12:51 am

Re: IFL log file

Post by TeraByte Support(PP) »

Because it's not finding the drive normally it's not processing the run command.

Create a plain text file (use Notepad) named "iflscript" (no extension) in the IFL MakeDisk folder. The file should only contain the following text:

Code: Select all

runall
If it's easier to work with, you can create the file as iflscript.txt, edit it, and then rename it to have no extension (remove the .txt).

In the makedisk.cfg file, add the following ADD3 line:

Code: Select all

ADD3=iflscript,>/tbu/utility/|initrmfs
Then recreate your IFL boot media.
tbifan39
Posts: 64
Joined: Fri Sep 16, 2011 5:08 pm

Re: IFL log file

Post by tbifan39 »

iflscript did not work. It is in the /tbu/utility though. I tried running the script manually; runall command not found.

All I want to do is mount a drive to save log file, I never thought it would be this difficult.

Btw, i checked the box "Save settings for next time" in makeDisk utility. Where are these settings saved?
TeraByte Support(PP)
Posts: 1740
Joined: Fri Aug 12, 2011 12:51 am

Re: IFL log file

Post by TeraByte Support(PP) »

Those settings are saved in the registry and wouldn't be causing an issue here.

Can you provide the output from the following commands after booting to IFL (each line is one command)?

Code: Select all

cat /tbu/utility/bootscript.log
ls /tbu/scripts
cat /tbu/utility/iflscript
cat /tbu/scripts.log
tbifan39
Posts: 64
Joined: Fri Sep 16, 2011 5:08 pm

Re: IFL log file

Post by tbifan39 »

cat /tbu/utility/bootscript.log

ifl:~# cat /tbu/utility/bootscript.log
iflbflag=2
iflbootfile=
Begin section for iflbflag=2 or iflbflag=21, attempt:1 (optical disc or iso file)

Output of blkid just before starting search for IFL boot media:
/dev/sda1: LABEL="SYSTEM" UUID="1ADD-77ED" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="SYSTEM" PARTUUID="5cdc446c-2d6f-4222-903e-d4560b287fc8"
/dev/sda2: LABEL="Recovery" BLOCK_SIZE="512" UUID="F62A51032A50C273" TYPE="ntfs" PARTLABEL="Recovery" PARTUUID="e4ad5958-5193-4320-a962-9358bafb7eac"
/dev/sda3: LABEL="OS" BLOCK_SIZE="512" UUID="B60454ED0454B25B" TYPE="ntfs" PARTLABEL="OS" PARTUUID="4ba5e375-ceb7-41fa-b342-0a25ce48f1db"
/dev/sda4: LABEL="Data" BLOCK_SIZE="512" UUID="848E56FD8E56E6E8" TYPE="ntfs" PARTLABEL="Data" PARTUUID="5ded03ea-c342-4cf2-9038-df933e1ccafb"
/dev/sda5: LABEL="Restore" BLOCK_SIZE="512" UUID="B2765A6D765A3279" TYPE="ntfs" PARTLABEL="Restore" PARTUUID="9f1dc039-3485-4cfe-ae09-02fedabbc7b4"
/dev/sdb1: LABEL="E2B" BLOCK_SIZE="512" UUID="30409AA2409A6E7A" TYPE="ntfs" PARTUUID="0ba765c8-01"
/dev/sdb2: LABEL="E2B_PTN2" UUID="04A0-9B0D" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0ba765c8-02"
/dev/sdb3: LABEL="ANKHTECH" UUID="0895-27EB" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0ba765c8-03"
/dev/sdb4: BLOCK_SIZE="2048" UUID="2024-12-11-22-27-44-00" LABEL="IFL_4_03" TYPE="iso9660" PARTUUID="0ba765c8-04"

No media detected in optical drive /dev/sr0
removeflag=1 (iso on UFD/SD)
Checking drive /dev/sdb for vfat formatting
Checking partition /dev/sdb1 for vfat formatting
Checking partition /dev/sdb2 for vfat formatting
Partition /dev/sdb2 is vfat formatted
Mounting /dev/sdb2 at /tbu/boot
Found 1 iso file(s) on /dev/sdb2
/tbu/boot/e2b/grubfm.iso
Mounting /tbu/boot/e2b/grubfm.iso on /dev/sdb2 at /tbu/iso
sysfile = nofilethere
Did not find iflbflag=2 parameter in /tbu/iso/nofilethere
Unmounted /tbu/boot/e2b/grubfm.iso from /tbu/iso
Unmounted partition /dev/sdb2 from /tbu/boot
Checking partition /dev/sdb3 for vfat formatting
Partition /dev/sdb3 is vfat formatted
Mounting /dev/sdb3 at /tbu/boot
Found 0 iso file(s) on /dev/sdb3
Unmounted partition /dev/sdb3 from /tbu/boot
Checking partition /dev/sdb4 for vfat formatting
removeflag=0 (iso on HDD)
Checking drive /dev/sda for vfat formatting
Checking partition /dev/sda1 for vfat formatting
Partition /dev/sda1 is vfat formatted
Mounting /dev/sda1 at /tbu/boot
Found 0 iso file(s) on /dev/sda1
Unmounted partition /dev/sda1 from /tbu/boot
Checking partition /dev/sda2 for vfat formatting
Checking partition /dev/sda3 for vfat formatting
Checking partition /dev/sda4 for vfat formatting
Checking partition /dev/sda5 for vfat formatting
End section for iflbflag=2 or iflbflag=21
Begin section for iflbflag=2 or iflbflag=21, attempt:2 (optical disc or iso file)
No media detected in optical drive /dev/sr0
removeflag=1 (iso on UFD/SD)
Checking drive /dev/sdb for vfat formatting
Checking partition /dev/sdb1 for vfat formatting
Checking partition /dev/sdb2 for vfat formatting
Partition /dev/sdb2 is vfat formatted
Mounting /dev/sdb2 at /tbu/boot
Found 1 iso file(s) on /dev/sdb2
/tbu/boot/e2b/grubfm.iso
Mounting /tbu/boot/e2b/grubfm.iso on /dev/sdb2 at /tbu/iso
sysfile = nofilethere
Did not find iflbflag=2 parameter in /tbu/iso/nofilethere
Unmounted /tbu/boot/e2b/grubfm.iso from /tbu/iso
Unmounted partition /dev/sdb2 from /tbu/boot
Checking partition /dev/sdb3 for vfat formatting
Partition /dev/sdb3 is vfat formatted
Mounting /dev/sdb3 at /tbu/boot
Found 0 iso file(s) on /dev/sdb3
Unmounted partition /dev/sdb3 from /tbu/boot
Checking partition /dev/sdb4 for vfat formatting
removeflag=0 (iso on HDD)
Checking drive /dev/sda for vfat formatting
Checking partition /dev/sda1 for vfat formatting
Partition /dev/sda1 is vfat formatted
Mounting /dev/sda1 at /tbu/boot
Found 0 iso file(s) on /dev/sda1
Unmounted partition /dev/sda1 from /tbu/boot
Checking partition /dev/sda2 for vfat formatting
Checking partition /dev/sda3 for vfat formatting
Checking partition /dev/sda4 for vfat formatting
Checking partition /dev/sda5 for vfat formatting
End section for iflbflag=2 or iflbflag=21
Begin section for iflbflag=2 or iflbflag=21, attempt:3 (optical disc or iso file)
No media detected in optical drive /dev/sr0
removeflag=1 (iso on UFD/SD)
Checking drive /dev/sdb for vfat formatting
Checking partition /dev/sdb1 for vfat formatting
Checking partition /dev/sdb2 for vfat formatting
Partition /dev/sdb2 is vfat formatted
Mounting /dev/sdb2 at /tbu/boot
Found 1 iso file(s) on /dev/sdb2
/tbu/boot/e2b/grubfm.iso
Mounting /tbu/boot/e2b/grubfm.iso on /dev/sdb2 at /tbu/iso
sysfile = nofilethere
Did not find iflbflag=2 parameter in /tbu/iso/nofilethere
Unmounted /tbu/boot/e2b/grubfm.iso from /tbu/iso
Unmounted partition /dev/sdb2 from /tbu/boot
Checking partition /dev/sdb3 for vfat formatting
Partition /dev/sdb3 is vfat formatted
Mounting /dev/sdb3 at /tbu/boot
Found 0 iso file(s) on /dev/sdb3
Unmounted partition /dev/sdb3 from /tbu/boot
Checking partition /dev/sdb4 for vfat formatting
removeflag=0 (iso on HDD)
Checking drive /dev/sda for vfat formatting
Checking partition /dev/sda1 for vfat formatting
Partition /dev/sda1 is vfat formatted
Mounting /dev/sda1 at /tbu/boot
Found 0 iso file(s) on /dev/sda1
Unmounted partition /dev/sda1 from /tbu/boot
Checking partition /dev/sda2 for vfat formatting
Checking partition /dev/sda3 for vfat formatting
Checking partition /dev/sda4 for vfat formatting
Checking partition /dev/sda5 for vfat formatting
End section for iflbflag=2 or iflbflag=21
Begin section for iflbflag=2 or iflbflag=21, attempt:4 (optical disc or iso file)
No media detected in optical drive /dev/sr0
removeflag=1 (iso on UFD/SD)
Checking drive /dev/sdb for vfat formatting
Checking partition /dev/sdb1 for vfat formatting
Checking partition /dev/sdb2 for vfat formatting
Partition /dev/sdb2 is vfat formatted
Mounting /dev/sdb2 at /tbu/boot
Found 1 iso file(s) on /dev/sdb2
/tbu/boot/e2b/grubfm.iso
Mounting /tbu/boot/e2b/grubfm.iso on /dev/sdb2 at /tbu/iso
sysfile = nofilethere
Did not find iflbflag=2 parameter in /tbu/iso/nofilethere
Unmounted /tbu/boot/e2b/grubfm.iso from /tbu/iso
Unmounted partition /dev/sdb2 from /tbu/boot
Checking partition /dev/sdb3 for vfat formatting
Partition /dev/sdb3 is vfat formatted
Mounting /dev/sdb3 at /tbu/boot
Found 0 iso file(s) on /dev/sdb3
Unmounted partition /dev/sdb3 from /tbu/boot
Checking partition /dev/sdb4 for vfat formatting
removeflag=0 (iso on HDD)
Checking drive /dev/sda for vfat formatting
Checking partition /dev/sda1 for vfat formatting
Partition /dev/sda1 is vfat formatted
Mounting /dev/sda1 at /tbu/boot
Found 0 iso file(s) on /dev/sda1
Unmounted partition /dev/sda1 from /tbu/boot
Checking partition /dev/sda2 for vfat formatting
Checking partition /dev/sda3 for vfat formatting
Checking partition /dev/sda4 for vfat formatting
Checking partition /dev/sda5 for vfat formatting
End section for iflbflag=2 or iflbflag=21
Begin section for iflbflag=2 or iflbflag=21, attempt:5 (optical disc or iso file)
No media detected in optical drive /dev/sr0
removeflag=1 (iso on UFD/SD)
Checking drive /dev/sdb for vfat formatting
Checking partition /dev/sdb1 for vfat formatting
Checking partition /dev/sdb2 for vfat formatting
Partition /dev/sdb2 is vfat formatted
Mounting /dev/sdb2 at /tbu/boot
Found 1 iso file(s) on /dev/sdb2
/tbu/boot/e2b/grubfm.iso
Mounting /tbu/boot/e2b/grubfm.iso on /dev/sdb2 at /tbu/iso
sysfile = nofilethere
Did not find iflbflag=2 parameter in /tbu/iso/nofilethere
Unmounted /tbu/boot/e2b/grubfm.iso from /tbu/iso
Unmounted partition /dev/sdb2 from /tbu/boot
Checking partition /dev/sdb3 for vfat formatting
Partition /dev/sdb3 is vfat formatted
Mounting /dev/sdb3 at /tbu/boot
Found 0 iso file(s) on /dev/sdb3
Unmounted partition /dev/sdb3 from /tbu/boot
Checking partition /dev/sdb4 for vfat formatting
removeflag=0 (iso on HDD)
Checking drive /dev/sda for vfat formatting
Checking partition /dev/sda1 for vfat formatting
Partition /dev/sda1 is vfat formatted
Mounting /dev/sda1 at /tbu/boot
Found 0 iso file(s) on /dev/sda1
Unmounted partition /dev/sda1 from /tbu/boot
Checking partition /dev/sda2 for vfat formatting
Checking partition /dev/sda3 for vfat formatting
Checking partition /dev/sda4 for vfat formatting
Checking partition /dev/sda5 for vfat formatting
End section for iflbflag=2 or iflbflag=21
ifl:~#

ls /tbu/scripts
iflfind

cat /tbu/utility/iflscript
I remove iflscript - it did not work - runall command was not found

cat /tbu/scripts.log
No file or directory found
TeraByte Support(PP)
Posts: 1740
Joined: Fri Aug 12, 2011 12:51 am

Re: IFL log file

Post by TeraByte Support(PP) »

Well, it needs the iflscript file to have a chance to work. I wanted to verify what, if anything, was in scripts.log. Was trying to determine if the script was running, but had errors, or wasn't running at all. If you add the file back in and post the results, you don't need to post the bootscript.log output again.

Also, iflscript isn't a script that runs. It's a file that contains a single command (runall, in this case) that tells it what scripts to run on startup.

Are you using IFL GUI or CUI? The tests I've run have been with the GUI version.
Post Reply