LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 09-20-2007, 02:01 PM   #16
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57

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
 
Old 09-20-2007, 03:32 PM   #17
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
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".
 
Old 09-20-2007, 05:09 PM   #18
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by PatrickNew View Post
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
 
Old 09-21-2007, 03:57 PM   #19
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
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
 
Old 09-21-2007, 11:19 PM   #20
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
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".
 
Old 09-22-2007, 02:09 AM   #21
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
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 )
 
Old 10-14-2007, 05:47 AM   #22
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
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
 
Old 10-14-2007, 11:47 AM   #23
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
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?
 
Old 12-10-2007, 01:44 PM   #24
benow
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Rep: Reputation: 0
FYI, I've written a little application that does this and a bit more.

benow.ca/admin/project/index.page?op=view&key=13
 
Old 12-10-2007, 01:45 PM   #25
benow
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Rep: Reputation: 0
http://benow.ca/admin/project/index.page?op=view&key=13
 
Old 12-10-2007, 01:50 PM   #26
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
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!
 
Old 12-10-2007, 02:17 PM   #27
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
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 View Post
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 ?

 
Old 12-10-2007, 02:42 PM   #28
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
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?
 
Old 12-11-2007, 01:50 AM   #29
benow
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Rep: Reputation: 0
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!
 
Old 12-11-2007, 09:56 AM   #30
benow
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Rep: Reputation: 0
The source is included in the jar, if you wish to tinker, btw.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount /dev/hdc /dev/cdrom doesn't work ShrikesHarvest Linux - Newbie 10 02-21-2009 07:05 AM
/dev/hdc no longer linked to /dev/cdrom - why? Ook Slackware 3 08-25-2007 12:00 AM
why has udev swapped /dev/hdc and /dev/hdd ? chaosbear Linux - Hardware 2 08-09-2006 03:23 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
ln: creating symbolic link `/dev/dvd' to `/dev/hdc': Permission denied qazwsx27 Fedora 3 06-14-2005 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration