Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-20-2007, 02:01 PM
|
#16
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Original Poster
Rep:
|
this is rather strange reply of the burnfolder:
Ready for burning [y/n] ?y
Value iso: ../iso254
Value to_burn: pictures
Value 2: /dev/hdb
Thu Sep 20 20:59:37 CEST 2007: mkisofs started
I: -input-charset not specified, using iso-8859-1 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
174 extents written (0 MB)
Thu Sep 20 20:59:37 CEST 2007: cdrecord started
wodim: Bad Option: -allow-lowercase.
Usage: wodim [options] track1...trackn
Use wodim -help
to get a list of valid options.
Use wodim blank=help
to get a list of valid blanking options.
Use wodim dev=b,t,l driveropts=help -checkdrive
to get a list of drive specific options.
Use wodim dev=help
to get a list of possible SCSI transport specifiers.
Thu Sep 20 20:59:37 CEST 2007: eject ../iso254
eject: tried to use `../iso254' as device name but it is no block device
eject: tried to use `./../iso254' as device name but it is no block device
eject: unable to find or open device for: `../iso254'
Please input another disk, then hit enter
|
|
|
09-20-2007, 03:32 PM
|
#17
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
Indeed, we need to add a "rm $ISO" to the end to clean up after the iso. Also, regarding the eject problems, that's just a mistake in the script. Replace every instance of "eject $ISO" with "eject $2".
|
|
|
09-20-2007, 05:09 PM
|
#18
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Original Poster
Rep:
|
Quote:
Originally Posted by PatrickNew
Indeed, we need to add a "rm $ISO" to the end to clean up after the iso. Also, regarding the eject problems, that's just a mistake in the script. Replace every instance of "eject $ISO" with "eject $2".
|
this is the code fixed:
Code:
#!/bin/sh
umount /media/cdrom0
umount /media/cdrom
umount /media/cdrom0
umount /media/cdrom
umount /media/cdrom0
date
if [ "$2" != "" ] ; then
echo " "
echo "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
echo " Folder backup script:"
echo "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
echo " "
echo " The available cdrom/dvd drives for burning are :"
echo $1
ls -la "$1"
ls -la "$(cat /etc/fstab | grep /media/cdrom | awk ' { print $1 } ')"
echo " Burning of the following folder: $1"
echo "$1"
ls -la "$1"
du -h "$1"
echo " "
echo " to the following device : $2 "
echo " Nota: Maximum device size for burning set to value of: 4294967296"
echo " "
echo $1
cd $1
printf "Ready for burning [y/n] ?"
read THEFIRSTGARBAGE
if [ "$THEFIRSTGARBAGE" == "y" ] ; then
ISO=`mktemp ../isoXXX`
TOTAL_SIZE=0
SIZE=0
TO_BURN=""
echo "==> New burning " >> /tmp/burningscript.log
echo "$(date) :" >> /tmp/burningscript.log
for X in *
do
SIZE=`du -b $X | tail -n 1 | cut -f 1`
if [ `expr $SIZE + $TOTAL_SIZE` -gt 4294967296 ]
then
rm $ISO
echo " Value iso: $ISO"
echo " Value to_burn: $TO_BURN"
echo " Value 2: $2"
echo " $(date): mkisofs started"
echo " Value iso: $ISO" >> /tmp/burningscript.log
echo " Value to_burn: $TO_BURN" >> /tmp/burningscript.log
echo " Value 2: $2" >> /tmp/burningscript.log
echo " mkisofs started" >> /tmp/burningscript.log
mkisofs -o $ISO $TO_BURN
echo " $(date): cdrecord started" >> /tmp/burningscript.log
echo " $(date): cdrecord started"
cdrecord -allow-lowercase -ldots -allow-multidot -J -joliet-long -r dev=$2 $ISO
rm $ISO
echo " $(date): eject $2 " >> /tmp/burningscript.log
echo " $(date): eject $2 "
eject $2
echo "Please input another disk, then hit enter"
read GARBAGE
TO_BURN="$X"
else
TO_BURN="$TO_BURN $X "
fi
done
mkisofs -o $ISO $TO_BURN
cdrecord dev=$2 $ISO
rm $ISO
eject $2
fi
fi
date
echo "Bye"
I'll try 2morrow.Good night & thanks
|
|
|
09-21-2007, 03:57 PM
|
#19
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Original Poster
Rep:
|
the weird thing is that you try and it ejects ddvd, and say this
Code:
pictures
Value 2: /dev/hdb
Fri Sep 21 22:55:55 CEST 2007: mkisofs started
I: -input-charset not specified, using iso-8859-1 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
174 extents written (0 MB)
Fri Sep 21 22:55:55 CEST 2007: cdrecord started
wodim: Bad Option: -allow-lowercase.
Usage: wodim [options] track1...trackn
Use wodim -help
to get a list of valid options.
Use wodim blank=help
to get a list of valid blanking options.
Use wodim dev=b,t,l driveropts=help -checkdrive
to get a list of drive specific options.
Use wodim dev=help
to get a list of possible SCSI transport specifiers.
Fri Sep 21 22:55:55 CEST 2007: eject /dev/hdb
Please input another disk, then hit enter
tired to look at it today
|
|
|
09-21-2007, 11:19 PM
|
#20
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
Wow, sorry I've led you astray so many times, I'm just not thinking right. The trouble is, when I gave you the list of options including "-allow-lowercase" and told you to append it to "cdrecord", I should have told you to add it to "mkisofs".
|
|
|
09-22-2007, 02:09 AM
|
#21
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Original Poster
Rep:
|
No problem:
that's the present script:
Code:
#!/bin/sh
umount /media/cdrom0
umount /media/cdrom
umount /media/cdrom0
umount /media/cdrom
umount /media/cdrom0
maxsizeofyourdevice=4294967296
date
if [ "$2" != "" ] ; then
echo " "
echo "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
echo " Folder backup script:"
echo "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
echo " "
echo " The available cdrom/dvd drives for burning are :"
echo $1
ls -la "$1"
ls -la "$(cat /etc/fstab | grep /media/cdrom | awk ' { print $1 } ')"
echo " Burning of the following folder: $1"
echo "$1"
ls -la "$1"
du -h "$1"
echo " "
echo " to the following device : $2 "
echo " Nota: Maximum device size for burning set to value of: $maxsizeofyourdevice"
echo " "
printf "would you like to enter another value [y/n] ?"
read THEFIRSTGARBAGE
if [ "$THEFIRSTGARBAGE" == "y" ] ; then
printf "Enter the value:"
read maxsizeofyourdevice
fi
echo " "
echo $1
cd $1
printf "Ready for burning [y/n] ?"
read THEFIRSTGARBAGE
if [ "$THEFIRSTGARBAGE" == "y" ] ; then
ISO=`mktemp ../isoXXX`
TOTAL_SIZE=0
SIZE=0
TO_BURN=""
echo "==> New burning " >> /tmp/burningscript.log
echo "$(date) :" >> /tmp/burningscript.log
for X in *
do
SIZE=`du -b $X | tail -n 1 | cut -f 1`
if [ `expr $SIZE + $TOTAL_SIZE` -gt "$maxsizeofyourdevice" ]
then
rm $ISO
echo " Value iso: $ISO"
echo " Value to_burn: $TO_BURN"
echo " Value 2: $2"
echo " $(date): mkisofs started"
echo " Value iso: $ISO" >> /tmp/burningscript.log
echo " Value to_burn: $TO_BURN" >> /tmp/burningscript.log
echo " Value 2: $2" >> /tmp/burningscript.log
echo " mkisofs started" >> /tmp/burningscript.log
mkisofs -allow-lowercase -ldots -allow-multidot -J -joliet-long -r -o $ISO $TO_BURN
echo " $(date): cdrecord started" >> /tmp/burningscript.log
echo " $(date): cdrecord started"
cdrecord dev=$2 $ISO
rm $ISO
echo " $(date): eject $2 " >> /tmp/burningscript.log
echo " $(date): eject $2 "
eject $2
echo "Please input another disk, then hit enter"
read GARBAGE
TO_BURN="$X"
else
TO_BURN="$TO_BURN $X "
fi
done
mkisofs -allow-lowercase -ldots -allow-multidot -J -joliet-long -r -o $ISO $TO_BURN
cdrecord dev=$2 $ISO
rm $ISO
eject $2
fi
fi
date
echo "Bye"
I have no dvd anymore to test it ... 
(Script daily getting upgraded, that's the night build  )
|
|
|
10-14-2007, 05:47 AM
|
#22
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Original Poster
Rep:
|
Hi;
after some time, I just gave a quick try to our script
it burnt somlething during 1-2min ....  no dvd burnt...
Code:
du: cannot access `RougeNoir,': No such file or directory
du: cannot access `Gme002': No such file or directory
du: cannot access `UnFois.avi': No such file or directory
du: cannot access `Usd': No such file or directory
du: cannot access `01.jpg': No such file or directory
Warning: creating filesystem that does not conform to ISO-9660.
I: -input-charset not specified, using iso-8859-1 (detected in locale settings)
genisoimage: No such file or directory. Invalid node - '208-Dina'.
wodim: No write mode specified.
wodim: Asuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'LITE-ON '
Identification : 'DVDRW SHM-165P6S'
Revision : 'MS0M'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
Speed set to 22160 KB/s
Starting to write CD/DVD at speed 17.0 in real unknown mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Errno: 0 (Success), read track info scsi sendcmd: no error
CDB: 52 00 00 00 00 00 00 00 1C 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 24 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x24 Qual 0x00 (invalid field in cdb) Fru 0x0
Sense flags: Blk 0 (not valid)
resid: 28
cmd finished after 0.001s timeout 240s
wodim: Cannot get next writable address.
Sun Oct 14 12:40:59 CEST 2007
Bye
I ll have to look a bit the code one day, since my burning will have to one day...
maybe in december ...
Greetings
|
|
|
10-14-2007, 11:47 AM
|
#23
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
I suspect the error is in all the du warnings about things not being found. Are you sure you specified the path of the folder correctly?
|
|
|
12-10-2007, 01:44 PM
|
#24
|
LQ Newbie
Registered: Dec 2007
Posts: 12
Rep:
|
FYI, I've written a little application that does this and a bit more.
benow.ca/admin/project/index.page?op=view&key=13
|
|
|
12-10-2007, 01:45 PM
|
#25
|
LQ Newbie
Registered: Dec 2007
Posts: 12
Rep:
|
|
|
|
12-10-2007, 01:50 PM
|
#26
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
I have yet to try that out, but I really like the idea of it. The little script I hacked together never worried about optimality of anything. I'm due to back up my /home to DVD in about a week, and I'm pretty sure I'll be using your app. Thanks!
|
|
|
12-10-2007, 02:17 PM
|
#27
|
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561
Original Poster
Rep:
|
Code:
Usage: org.benow.burninate.Burninator [args]
-h,--help Print this help message.
--device DVD device to burn from (default: /dev/dvd)
--mount DVD mount point to use (default: /mnt/cdrom)
--size Media capacity, in bytes (default: 4698270000)
--copies Burn this many copies of the files (default: 1)
--nuke Automatically delete successfully burned files. (otherwise, moves to ./offline/ directory)
--quiet Don't spew so much useless crap
Quote:
Originally Posted by PatrickNew
I have yet to try that out, but I really like the idea of it. The little script I hacked together never worried about optimality of anything. I'm due to back up my /home to DVD in about a week, and I'm pretty sure I'll be using your app. Thanks!
|
sounds good because of the subdirectories !
Code:
To invoke the jar, try the following
$ cd /dir/to/files
$ java -jar /path/to/burninate.jar [args]
or create a burninator invocation script
$ echo "java -jar /path/to/burninate.jar \$*" > burninator
$ chmod +x burninator
$ sudo mv burninator /usr/bin
so that means we should do:
Code:
$ cd myfoldertobackup
$ whereis burninator
$ /usr/bin/burninator --device /dev/hdc --nuke *
RIGHT ?

|
|
|
12-10-2007, 02:42 PM
|
#28
|
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Rep:
|
Should benow revisit this thread, I have a question about the -nuke option. Does this description mean that it removes the disk images that were generated, or does it remove the files that went onto that disk image?
|
|
|
12-11-2007, 01:50 AM
|
#29
|
LQ Newbie
Registered: Dec 2007
Posts: 12
Rep:
|
Heyas... yeah, watching
frenchn00b: yeah, that's it... you want to invoke it from where the files/directories you want to burn are located. I'll update the project page to make that a bit clearer.
PatrickNew: it actually doesn't make images. It creates mappings for growisofs (actually genisoimage) which it burns from... so no need to wait for images or have extra space. The --nuke option removes the files that were successfully burned to the dvd. The default operation (ie without --nuke) moves the files to a directory named 'offline' in the current directory (created if does not exist). During file scanning any files within 'offline' directories are ignored... allowing for incremental backups, of a sort. All temporary files are removed with or without nuke.
By using java I can pull some tricks that would be tough in straight-up bash (at my bash proficiency, anyway). There's a couple features I'd like to add yet... the ability to prefer whole directories (ie try to burn whole dirs before individual files), which would make the files on the dvd's a bit less fragmented (not splitting up albums, etc)... and the offlining of files to offline dirs in subdirs if an offline dir exists in the subdir (a feature hinted at in response to PatrickNew's question)... would make incremental backups easier.
But, as it stands it is quite useful. Lemme know how you make out!
|
|
|
12-11-2007, 09:56 AM
|
#30
|
LQ Newbie
Registered: Dec 2007
Posts: 12
Rep:
|
The source is included in the jar, if you wish to tinker, btw.
|
|
|
All times are GMT -5. The time now is 05:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|