Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
--->>> You forgat the "$" signs which mark a shell-word as name for variable
evaluation. See the difference:
HA! yes i do this on a regular basis. :-(
don't understand what's going on here :-(
>>Code:
>>$ dir_in_iso=/Documents99
>>echo "dir_in_iso"
>>dir_in_iso
>>$ echo "$dir_in_iso"
>>/Documents99
what i'm attempting, i've tried to layout below.
write xorriso code using the #!/bin/sh shebang. vi editor. then save the file as xorris.sh. then chmod xorris.sh to make xorris.sh executable. then execute xoriss.sh -----> $./xorris.sh
well! seems like we may have finally got sucess here :-)
interesting: when the run hit line 1 [!/bin/sh] (forgot the # should read #!)it complained but continued to march on and ended with success. However, when the typo is corrected to [#!/bin/sh] no complaint. just success! finally, after further investigation, it seems SHEBANG is not needed
what did we do here? xorriso code is run automatically from an executable file, executable xorris.sh.
cheers :-)
delano@delano-p6653w:~$ ./xorris.sh
./xorris.sh: line 1: !/bin/sh: No such file or directory
xorriso 1.4.8 : RockRidge filesystem manipulator, libburnia project.
Drive current: -outdev '/dev/sr0'
Media current: DVD-RW restricted overwrite
Media status : is written , is appendable
Media summary: 1 session, 23 data blocks, 46.0k data, 4488m free
Beginning to blank medium in mode 'fast'.
Blanking done
xorriso : NOTE : Re-assessing -outdev '/dev/sr0'
Drive current: -outdev '/dev/sr0'
Media current: DVD-RW restricted overwrite
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 4488m free
xorriso : UPDATE : 1 files added in 1 seconds
Added to ISO image: file '/file1'='/home/delano/file'
xorriso : UPDATE : Formatting. Working since 0 seconds
libburn : NOTE : Write start address is 2 * 32768
xorriso : UPDATE : Writing: 16s 8.3% fifo 0% buf 100% 0.0xD
xorriso : UPDATE : Writing: 192s 100.0% fifo 0% buf 100% 0.3xD
xorriso : UPDATE : Writing: 192s 100.0% fifo 0% buf 100% 0.0xD
ISO image produced: 23 sectors
Written to medium : 192 sectors at LBA 32
Writing to '/dev/sr0' completed successfully.
It is usually optional if you execute shell scripts from the shell
but it might be needed if the script is executed from some other
binary program via system call execve(2).
The first line "#!/bin/sh" explicitely chooses the program /bin/sh
as interpreter for the file. If you omit it, then the default of your
shell comes into effect:
man dash says
Code:
If the program is not a normal executable file (i.e., if it
does not begin with the "magic number" whose ASCII representation is
"#!", so execve(2) returns ENOEXEC then) the shell will interpret the
program in a subshell.
man bash says
Code:
If this execution fails because the file is not in executable format,
and the file is not a directory, it is assumed to be a shell script, a
file containing shell commands. A subshell is spawned to execute it.
[...]
If the program is a file beginning with #!, the remainder of the first
line specifies an interpreter for the program. The shell executes the
specified interpreter on operating systems that do not handle this exe‐
cutable format themselves.
One of these two shells is normally the actual shell interpreter for
#!/bin/sh. Possibly you can find out by looking for a link target of
file /bin/sh
great stuff; expands my horizons mightily, and thank you. :-)
remember complaint of necessity to remember to open sr0 tray before entering an xorriso command at CLI. well perhaps the problem is solved: for me anyway, simply added -eject at end of xorriso command.
xorriso -outdev /dev/sr0 -format as_needed -eject. tray pops out. however, tray remains out for some time and then, for some mysterious reason, goes back in. generally, there is time enough to make code correction and then execute CLI. it's not the perfect solution, but for now it works for me :-)
code won't succeed with "-format" must have "-format as_needed." however, i'm confident you may help here :-)
The xorriso command -eject wants a parameter: "in", "out", "all".
Command -format should not be used frequently. Normally you need it
only once per medium.
> tray remains out for some time and then, for some mysterious reason,
> goes back in.
Does this some time last quite exactly 200 seconds ?
It is a strange riddle why some few drive do this. I have two of them.
Another Debian user has one to.
I tested one of mine with SATA data cable off. It pulled in.
The computer cannot have told it to do so.
In comment #38 you wrote:
> xorriso -outdev /dev/sr0 -toc
> Drive type : vendor 'PHILIPS' product 'DVD+-RW DVD8631' revision 'GD30'
That is quite some old drive, according to the web.
Is this the drive which pulls in the tray ?
Drive current: -outdev '/dev/sr0'
Media current: DVD-RW restricted overwrite
Media status : is written , is appendable
Media summary: 2 sessions, 117 data blocks, 234k data, 4488m free
Drive current: -outdev '/dev/sr0'
Drive type : vendor 'hp' product 'DVD A DH16ABLH' revision '3HD9'
Drive id : '2A8031902177'
Media current: DVD-RW restricted overwrite
Media product: RITEKW01 , Ritek Corp
Media status : is written , is appendable
Media blocks : 192 readable , 2297696 writable , 2297888 overall
TOC layout : Idx , sbsector , Size , Volume Id
ISO session : 1 , 32 , 73s , ISOIMAGE
ISO session : 2 , 128 , 44s , ISOIMAGE
Media summary: 2 sessions, 117 data blocks, 234k data, 4488m free
Media nwa : 192s
>>Does this some time last quite exactly 200 seconds ?
will do several time checks then take the average from pop_out until pop_in.
>>I tested one of mine with SATA data cable off. It pulled in.
The computer cannot have told it to do so.
spooky :-)
>>The xorriso command -eject wants a parameter: "in", "out", "all".
Command -format should not be used frequently. Normally you need it
only once per medium.
when -eject all -- present xorriso gives failure. are the "" needed -->> "all"
> Drive type : vendor 'hp' product 'DVD A DH16ABLH' revision '3HD9'
That's not much younger than the other. )
> > I tested one of mine with SATA data cable off. It pulled in.
> > The computer cannot have told it to do so.
> spooky :-)
There's a little computer in each drive running the firmware.
So it's still within the realm of rational science.
I am riddling how this feature is named and why it appears with some few
drives from different vendors.
I believed in an individual glitch of my LG GH24NSC0. But then i got my
hands on a new ASUS DRW-24D5MT which does the same. A member of
debian-user mailing list has an Optiarc AD-5240S which too pulls in
after quite exactly 200 seconds.
Yours would be the fourth among then 24 inspected drives.
> when -eject all -- present xorriso gives failure. are the "" needed -->> "all"
Urm. I fail to understand what you want to tell me.
Please show the xorriso run which you try and the error messages which
you get from it.
>>Urm. I fail to understand what you want to tell me.
>>Please show the xorriso run which you try and the error messages which
>>you get from it.
appended several variations of eject on the end of the xorris command - no joy :-(
Get good results without "eject." below is some of the various efforts in using "eject"
xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 17 nodes read in 1 seconds
Drive current: -dev '/dev/sr0'
Media current: DVD-RW restricted overwrite
Media status : is written , is appendable
Media summary: 3 sessions, 146 data blocks, 292k data, 4488m free
Volume id : 'ISOIMAGE'
Added to ISO image: directory '/Public1'='/home/delano/Public'
xorriso : NOTE : Giving up for -eject whole -dev '/dev/sr0'
This one may have possibilities. the "NOTE" is of interest, but it seems more trial and error is required.
no iso Public1 is generated in the process.
additionally: the close and open gyrations of the tray is totally random. decided it is useless to time the
the restless devil.
cheers :-)
wayne
////////////////////////////////////////////////////////////////////////////////////////////////////////////
The command and its parameter must be perceived by the shell parser
as two "words". The parser is the thing which interprets blanks, quotation
marks, "$"-signs, and more in order to obtain a list of program "arguments".
This list is what a program sees after it got started by the shell.
In your case it was
xorriso commands may be preceded by zero to many "-" characters.
"eject", "-eject", "----eject" is the same. But predefined parameter
words like "out" have to match the prescriptions of the manual.
> the close and open gyrations of the tray is totally random.
What is the shortest timespan for which it staid out ?
(I hope it does not open randomly.)
>>What is the shortest timespan for which it staid out ?
ten (10) instances observed when tray closed by its own initiative. greatest number of seconds tray remained in open position: 220 seconds. shortest number of seconds tray remained open 156 seconds.
tray remained open an average of 198 seconds.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.