error running fieltool.sh


Forum: Other Help Topics
Topic: error running fieltool.sh
started by: sunburnt

Posted by sunburnt on Feb. 18 2005,00:04
I`m unable to make a backup file with the Backup/Restore menu.
No back backup.tar.gz file is being made, file /.backup_device has sda1 in it.
I found the command is "filetool.sh" & the GUI is filetool.lua thru /.fluxbox/menu.
This is the response from running "filetool.sh backup sda1" at command prompt.
The Broken pipe part is the same as an error on shutdown.

@ = little square made of dots.

@1;34mBacking up files to /cdrom
/mnt/sda1 @[0;39m/@[1]+   Broken pipe       tar -C / -T $HOME/filetool.lst --exclude-Cache -czf $MOUNTPOINT/backup.tar.gz 2>/dev/null
-@\@|@@[1;34mDone.@[0;39m
----end-of-output----

Posted by roberts on Feb. 18 2005,00:23
Trying to write to a non writeable device will surely break your pipes.
Posted by sunburnt on Feb. 18 2005,04:49
Why would sda1 the flash drive be nonwritable?
Clean install to Usb drive doesn`t fix problem.
Drive work before so it`s not at fault.
It seems to be a misdirection of a path, but how?

Posted by tronik on Feb. 18 2005,06:17
Roberts i think didn't see your sda1..and only saw /cdrom

Uh...I have the same problem sunburnt..I've determined its a race condition, and I thought i was the ONLY one who had it as i've been unable to find anyone else to repeat the condition..

The file you're looking for is not /.backup_device but /opt/.backup_device

A race condition because I can manually do backup (as root, from a terminal - open terminal type 'sudo su ; filetool.sh backup' ) and it works flawlessly everytime...its crappy because my auto-backup doesn't work all of the time (pipe doesn't break all the time, so it works occasionally, a race condition for me because its RANDOM and can only be a race condition if it works the rest of the time.

anyway, like i've said, i think its a race condition...i got tired of it, so i started backing up to my usb drive manually everytime...just got pissed that no one knew anything about it or had the same problem ;p and thats the easiest way to avoid it...but um...here are some suggestions...

i'm not at my console right now, but if there is a 'sleep' or 'wait' or a timer type command, put the backup script on a timer, or, write a shellscript to do it for you...that way it will isolate the backup routine (while its not trying to shut down everything else, etc) and will hopefully terminate race conditions.

i hope this helps, please tell me what happens. ;)

Posted by sunburnt on Feb. 18 2005,07:33
A listing of running filetool.sh from console as root.

root@ttyp0[dsl]# /usr/sbin/filetool.sh backup
tar: /mnt/sda1/backup.tar.gz: Cannot stat: No such file or dir.

  then comes a list of the /opt directory

/cdrom: Cannot open: Is a directory
tar (child): Error is not recoverable: exiting now

  then comes the rest of the /opt dir. & /home dir.

Press enter to continue:
root@ttyp0[dsl]#

  When I type "sda1" at the end it changes.

root@ttyp0[dsl]# /usr/sbin/filetool.sh backup sda1
Backing up files to /cdrom
/mnt/sda1 [1]+  Broken pipe     tar -C / -T $HOME/filetool.lst
  --exclude=Cache -czf $MOUNTPOINT/backup.tar.gz 2>/dev/null
Done.

  It seems there`s something seriously wrong with the PATH
     & or system variables;  "$MOUNTPOINT" ?    Don`t know!
  Your right about the "filetool.sh" path, I just didn`t type it.

Posted by mikshaw on Feb. 18 2005,15:23
it looks like your sda1 is being tried as the source rather than the destination, and trying /cdrom as the destination.

Perhaps you need another argument?
(filetool.sh backup source destination)

Posted by sunburnt on Feb. 18 2005,22:39
You`ll have to forgive my ignorance mikshaw but the source is the contense of filetool.lst, how do I use that?  How about:

filetool.sh backup "cat filetool" /mnt/sda1

Posted by mikshaw on Feb. 18 2005,23:36
hmm...that sounds unnecessarily redundant, so it's probably incorrect.  I think I was wrong anyway.

All I know is that the output is saying "Backing up files to /cdrom"....i was thinking at first that it was trying to write to the wrong device.  However, after a little exploring it seems that /cdrom is the mountpoint for the KNOPPIX and boot files, and whatever files are included with them.....so i guess that would be the mountpoint for your usb device?
perhaps the device is mounted read-only, or maybe you need to remount the device on /mnt/sda1 (one device, two mountpoints).  That sounds weird, but it may be the only way to make it writeable.

Posted by sunburnt on Feb. 19 2005,00:02
I also noticed /cdrom IS /mnt/sda1, odd but if it ALWAYS reflects the
 device DSL is on, it could be backup dev. for writable drives.
I mount and write files to sda1 manually in DSL, so it`s writable as su.
I know very little about writing script, maybe something like:

#!/bin/bash
# Script for Backup of DSL settings

echo -n "${BLUE}Backing up files to:  /cdrom ${NORMAL}"
sudo tar -C / -T /mnt/ramdisk/home/dsl/filetool.lst --exclude=Cache  -czf /cdrom/backup.tar.gz
echo "${BLUE}Done.${NORMAL}"
exit 0


I took this code from Robert Shingledecker`s code & altered it.
I`m not sure how much of filetool.sh is required to be reliable.
The source & destination are hard coded, so no arguments.
I think the very first line`s needed for script to function, duh?
If ANYONE has any thoughts, suggestions, etc., PLEASE feel free!!!

Posted by roberts on Feb. 19 2005,02:04
Lets start by posting which version of DSL you are using and the contents of the filetool.lst, i.e., which files you are trying to backup.
Posted by sunburnt on Feb. 19 2005,03:42
DSL ver. 9.1
filetool.lst is standard, there`s no backup.tar.gz file to change it.
Want to add: .fluxbox/backgrounds, .fluxbox/init,
    & Firefox: pref., history, & bookmarks to it.

Posted by roberts on Feb. 19 2005,07:22
Still I am not getting what I asked for...
If you have a wrong path of a file you are trying to backup, you will have problems.
Need to see your filetool.lst. If you add a non-existent file to the filetool.lst you will have problems. Need to see your filetool.lst.

You should not have to run the script from the CLI. I just verifed that indeed everything works fine from a v0.9.1
Using Usb Install To Pendrive Then using the control panel backup,
You are prompted to enter the Device: sda1 Backup proceeds normally. Rebooting provides the autorestore feature.

Another possible area is how did you install DSL to the pendrive?
There are so many "windows" install methods that could possibly be a problem. If the wrong boot.img file in used, your sda1 may not really be writeable. Try this:
Using the mount app utility, select the sda1 device. Then open up a  shell and type the following:

mount

The output for the device sda1 should contain both these lines:
/dev/sda1 on /cdrom type vfat (rw)
/dev/sda1 on /mnt/sda1 type vfat (rw,nosuid,nodev,umask=000,uid=1001,gid=500)

All of this is assuming that you have indeed used standard DSL procedures.

Posted by sunburnt on Feb. 19 2005,09:00
I mounted sda1 & ran XTerminal, report as follows:

dsl@box:~$ mount
/dev/root on / type ext2 (rw)
/dev/sda1 on /cdrom type vfat (rw)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw,size=405504k)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
/dev/hda1 on /mnt/hda1 type vfat (rw,nosuid,nodev,umask=000,uid=1001,gid=500)
/dev/sda1 on /mnt/sda1 type vfat (rw,nosuid,nodev,umask=000,uid=1001,gid=500)
dsl@box:~$

As you can see both the lines are present.
The line:  "/proc/bus/usb..." makes me wonder, but maybe it`s normal.
The only line I put in filetool.lst is:   home/dsl/.fluxbox/init
 to save the set background command.
I want to add Firefox stuff, but haven`t even got that far yet.
On shutdown there`s an error:  can`t umount /KNOPPIX, not good!
I think it`s my install method, but it`s worked well until now...
I`ll burn an iso saturday so I can do a normal install.
Is there any extra files I`ll need to run the USB install on the menu?
I recall a post about downloading a file but don`t know if it`s for v9.1
I appreciate the help, I hope the fault isn`t mine, I really like DSL!

Posted by sunburnt on Feb. 19 2005,21:31
roberts;      burned iso & booted, couldn`t mount drives errors.
DSL started, wouldn`t install to USB, same as another post,
  just a flash & it makes an empty frugal_usb.tar.gz.
Downloaded frugal_usb.tar.gz, tried again & get the popup
  asking (y), nothing written to USB.
Checked & DSL won`t mount sda1, & same can`t umount
  /KNOPPIX error on shutdown as the previous USB install.

Posted by roberts on Feb. 19 2005,23:25
Sounds like you have a bad download, or bad burn, or even a flaky cdrom while trying to read, as the errors that you report are certainly not normal. I assumed you checked the md5sum file to be sure you have a good download. It seems to me your goal is run DSL from a pendrive. Also from your other post requesting a zip file of DSL for pendrives and that you are a Windows user. If you do not want to make a cdrom of DSL, then try the zip file approach. See my answer to your other post here.

< http://damnsmalllinux.org/cgi-bin....t=0;r=1 >

Posted by sunburnt on Feb. 20 2005,01:16
I tried the shell script I suggested, ended up modifing it to:


#!/bin/bash
# Script for Backup of DSL settings to USB.

echo -n "${BLUE}Backing up files to:  /cdrom ${NORMAL}"
tar -C / -T /home/dsl/filetool.lst --exclude=Cache  -czf /cdrom/backup.tar.gz
echo "${BLUE}Done.${NORMAL}"
exit 0


IT WORKS! And shows NO ERRORS, but it needs some error testing code.
It makes the backup.tar.gz file, & on boot the background is restored.
The 2 lines starting with echo aren`t needed, & they don`t show if
  the file`s run in emelfm, but they probably would in XTerminal.

Being as /cdrom is the destination, I think ANY WRITEABLE DRIVE
  THAT DSL IS BOOTED FROM should work as the backup & restore drive.

Tried the CD on the other PC & it had a normal bootup.
Read your post in: USB version of DSL, I guess your saying
  that DSL embedded has the proper layout & drivers for the
  USB to boot off of?
I though it was only for running under Win.?

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.