Page 1 of 1

Separate Multisession iso?

Posted: Tue 17 May 2005, 18:11
by Kelly
Puppy release 1.0.0 had a separate iso for the multisession cd. Is this no longer necessary? Is burning the regular iso to a cd using the multisession option all that is necessary now for the 1.0.2 release?

Thanks

Posted: Tue 17 May 2005, 20:12
by Flash
Hi Kelly.

The best answer I can give is to refer you to Barry's release notes on the News page.

Thanks

Posted: Tue 17 May 2005, 22:34
by Kelly
Thanks, I missed that page.

Posted: Wed 18 May 2005, 01:05
by BarryK
Yeah, but read the bit on the News page, about how got strange effects at bootup with the "-msinfo" option of cdrecord.
That has stuffed things up a bit.

Is there a clever person who can think how to ask the inserted CD if it was burnt "closed" or "open"?
"Open" means that another track can be added.

I can't find anything in /proc with that info.
The only application I can find that determines that, is the abovementioned cdrecord.
Surely it must be possible to write a little C program that can read that info off the CD? ...because, obviously it must be there somewhere on the CD/DVD, some little flag or whatever.

...anyone reading this who thinks they might know how to tackle it, it will be greatly appreciated. This little problem is holding up the multisession project.
We need to access the drive as a plain ATAPI, ie as /dev/hdx, not use any scsi stuff.

Posted: Fri 20 May 2005, 20:31
by Rich
BarryK wrote: Is there a clever person who can think how to ask the inserted CD if it was burnt "closed" or "open"?
"Open" means that another track can be added.

I can't find anything in /proc with that info.
The only application I can find that determines that, is the abovementioned cdrecord.
Surely it must be possible to write a little C program that can read that info off the CD? ...because, obviously it must be there somewhere on the CD/DVD, some little flag or whatever.
I don't know about how to access the 'flag or whatever',(or If i can be classed as a clever person ) but I've just thought of a simple way to do it.

Using a small script, write the word 'Test' to the CD in a hidden file './puppytest' ( for example ). Then read the file from the cd. If it's not found then the CD can't be written to. Suppress the error message and replace with something like 'CLOSED CD'. If the file can be read successfully, delete the file, and look for it again. If the file is still there then it's an OPEN CD. If it's gone then it's OPEN and REWRITEABLE.

It's probably quite a naive way of doing it - and I apologise for that. But it wouldn't take more than a dozen lines of text to accomplish.

Rich

Posted: Sat 21 May 2005, 01:42
by Flash
How soon in the boot process does Puppy need to know that it is booting from a multisession CD?

Posted: Sat 21 May 2005, 09:14
by BarryK
Flash wrote:How soon in the boot process does Puppy need to know that it is booting from a multisession CD?
Very early on.
The detection is supposed to happen in /etc/rc.d/rc.sysinit, the first boot script, and if it detects the cd is multisession it is then supposed to execute /etc/rc.d/rc.sysinit-cd instead id rc.sysinit. In other words, it jumps out of rc.sysinit.

Cd multisession info

Posted: Sun 22 May 2005, 03:18
by mmc
I think this might be what you are looking for (might need to cull out the portions of the code we need)

http://www.interhack.net/news/cdverity.html
src : http://www.interhack.net/projects/01med ... y-1.08.tgz


Excerpt from site ...
.... It's written in C++ for Linux and FreeBSD but the intention is to allow it to work on other systems. The device interface works at a fairly low-level by sending ATAPI commands directly to the CDROM.
Excerpt from the docs ...
Here's what you can do:

* Read each sector of data on the disk. You can arrange to have an md5 checksum computed and saved for each sector. Any information that can be read from the sector (such as what track it is in, the type of data, if there were any data errors, etc) is saved. Usually, the data itself (more than 600MBytes over an entire CD) is discarded.
* Find out information about the CD-ROM drive itself. Items such as does it support reading and writing CDs, the manufacturer, model numbers, etc.
* Read the table of contents for the CD. You can also construct a table of contents based on the sectors read from the disk. You can compare several the Mode 0 and Mode 2 table of contents. Finally, you can try and lookup the artist and album on the network.
* Finally, there are a number of tests that can be run. These can be repeatedly run and just work on whatever data has already been collected. For example, if no table of contents has been read, then those tests don't do anything significant. Similarly, of only a few sectors of data are read, then the tests are only for those sectors.
what say?

--
mmc

Posted: Sun 22 May 2005, 05:31
by BarryK
Ah, now that is promising: "works at a fairly low-level by sending ATAPI commands directly to the CDROM"

I'm downloading it right now!

Posted: Mon 23 May 2005, 09:10
by edwin
Please see my two replies in the following regarding success with puppy-1.0.2 burned as multisession using Gcombust method from the "News Page"

http://www.murga.org/~puppy/viewtopic.php?t=223

Great Job! :)

finalized info on iso

Posted: Tue 24 May 2005, 11:22
by FrankA
parallel in wiki:

http://www.goosee.com/puppy/wikka/MultiSessionBoot

http://www.goosee.com/puppy/development/developer.htm and homepage

info on multisession is in the lead-in 9MB = 4500 sectors which also keeps TOC. if cd is not finalized, only then there is a pointer to the next writable address. so one can read this out in raw mode.

this way a multisession CD can be identified

possible solution

Posted: Wed 25 May 2005, 11:42
by Jesse
Hello,

I have a very likely candidate for a solution to this problem.

It works for my computers limited environment, it correctly identifies one particular multisession cdrom I have as multisession, and a comercial stamped cd as closed, but I don't currently have a burner to make my own test cases.

It really really should work :roll:, the program uses the linux kernel "uniform cdrom driver interface" which dates back to kernel 2.1.x. Which is why I am quite happy to post the source code in a public forum.

What I don't know:
1) is if it correctly identifies a multisession disc with only one track (one session of writing on it).

2) if a multisession disc that gets closed, is still identified as "multisession".

Can people who want to test this, have a go and post back to this thread. With either success or failure for cases #1 and #2.
If you have a problem with it, please send me the "-d" debug output from it.

Run with -h flag for info.
Puppy Binary and source code inside archive.

Jesse

Posted: Wed 25 May 2005, 15:59
by BarryK
Jesse,
Sorry to be the bearer of bad tidings, but it isn't working for me.
Yes, it works if the CD has more than one track, but I have a multisession CD newly burned, only one track, and cdrominfo returns "Closed".

I just checked the CD with "cdrecord -msinfo dev=/dev/hdd"
and it returns "0,42579"
whereas a closed CD returns "cdrecord: Cannot read first writable address"

Posted: Thu 26 May 2005, 00:52
by Guest
Hi Barry,

Here this one might do it :-)
the numbers for "singe track open multisession" that you get from cdrecord should be the same numbers that you get on this MULTI line (from debug output):
MULTI: 18008, 330701
though for single track the first number will be 0.

The reason that I don't know if its right yet is I can't find a definition of what is "multisession open".

this is from my two track open multisession cd disc:

# ./cdrominfo -d -p
CDROM INFO version 0.0.3
opening drive
get slots
found 1 slots
DriveStatus: Disc
DiscStatus: Data 1
Capabilities: closable_tray ejectable_tray lockable programmable_speed multisession Medium_Catalog_Number Media_Changed Audio_Functions resetable (has custom ioctls) (driver implements drive status) (driver implements generic packets) [drive is a DVD]
MULTI: 18008, 330701
MULTI: is XA
MULTI: addr format is LBA
TOC: 1-2
toc-e: track 1, adr 1, ctrl 4, format 1 datamode 0, LBA addr 0.
toc-e: track 2, adr 1, ctrl 4, format 1 datamode 0, LBA addr 18008.
device:/dev/cdrom|DVD|RO|1|SW_CLOSE|SW_OPEN|closed|Data|2|LBA|Multisession|

Jesse

Posted: Thu 26 May 2005, 06:27
by BarryK
A normal closed Puppy CD returned this:
MULTI: 0, 31184
MULTI: is not XA
MULTI: addr format is LBA
TOC: 1-1

A multisession CD with only one track returned this:
MULTI: 0, 31183
MULTI: is not XA
MULTI: addr format is LBA
TOC: 1-1

...so, it remains elusive!
The solution to the problem is the error message that cdrecord returns when it determines that a CD is not multi-session. It somehow determines that beyond the first track is not writable.

Posted: Fri 27 May 2005, 00:27
by Jesse
Hi Barry,

I'm sorry to have used your time with those last few versions of cdrominfo without success.
I realise the build to test time with this app is way unacceptable, and today I'm going to put my wallet where my mouth is and go buy a cdwriter so I can test this on my computer.
My last cdwriter died a death from its "spin the cd" motor failing. I could certainly use some retail therapy.

Jesse

Posted: Fri 27 May 2005, 12:56
by BarryK
Don't get stressed about it though, after all, we're supposed to be doing this for fun/hobby, or whatever.

We do a couple of fallback methods, not as elegant but would work.
The latest is the little C prog GuestToo wrote that detects if alt/shift/ctrl keys held down -- that could be used to force a multisession boot.

Posted: Fri 27 May 2005, 14:12
by Flash
BarryK wrote:Don't get stressed about it though, after all, we're supposed to be doing this for fun/hobby, or whatever.
Indeed!
We do a couple of fallback methods, not as elegant but would work.
The latest is the little C prog GuestToo wrote that detects if alt/shift/ctrl keys held down -- that could be used to force a multisession boot.
If you are going to put in a boot options screen anyway, this could just be another option, right?

Posted: Sat 28 May 2005, 14:16
by BarryK
Yeah, that's right, i'm probably going to have a boot menu like John's build. So an option on the menu would probably be the easiest way to do it.