PDA

View Full Version : New Live CD distro can run from and save to the same CD!



eadz
03-09-2005, 02:12 AM
Now there's a live CD that can actually save data back onto its own disk! How does it work? The PC boots with a multi-session CD inserted in the CD-burner drive -- thus, Puppy Linux automatically knows which drive is the CD-burner, in case you have more than one CD/DVD drive. Then you use Puppy in the normal way. At shutdown, all the changed files in your home directory are saved back to CD. That's it. Next time you boot, all the personal files are restored!"

http://www.goosee.com/puppy/multi-puppy.htm

http://linux.slashdot.org/article.pl?sid=05/03/08/2345250&from=rss

lilsirecho
03-09-2005, 04:14 AM
eadz;
I am wondering what burn program(s) available for Linux to enable multi-session CD burns?

eadz
03-09-2005, 04:53 AM
according to the pupply linux page, they use Gcombust

Harry Kuhman
03-09-2005, 05:22 AM
I saw the Slashdot article too. I found this very interesting for a slightly different reason. A while ago I make a copy of DSL as the first session of a multi-session disk. I then used DSL to write files to the second session. I did not expect to have DSL somehow find the second session automatically and load stuff the way that Puppy Linux does. The thing that I found at that time was that the DSL disk would no longer boot after I had burnt the second session. I accepted this as how el torro botable disks work. But if Puppy Linux can do it then I'm wondering what they are doing differently than I did and why Puppy can boot after a second session is written on it but DSL can not. If anyone has any insight on this issue I would appreciate them sharing it. I have bookmarked the Puppy Linux pages linked to in the slashdot article, but have not read them completely yet.

TyphoonMentat
03-09-2005, 08:06 PM
This feature isn't new, actually - it's just the integration that makes it novel. Puppy basically boots with the equivalent of "knoppix toram" and then writes to the CD when it's done. I'm working on a script to do this without using a ramdisk as Puppy does.

Flash00
03-28-2005, 06:41 AM
I saw the Slashdot article too. I found this very interesting for a slightly different reason. A while ago I make a copy of DSL as the first session of a multi-session disk. I then used DSL to write files to the second session. I did not expect to have DSL somehow find the second session automatically and load stuff the way that Puppy Linux does. The thing that I found at that time was that the DSL disk would no longer boot after I had burnt the second session. I accepted this as how el torro botable disks work. But if Puppy Linux can do it then I'm wondering what they are doing differently than I did and why Puppy can boot after a second session is written on it but DSL can not. If anyone has any insight on this issue I would appreciate them sharing it. I have bookmarked the Puppy Linux pages linked to in the slashdot article, but have not read them completely yet.
I don't know bootable discs but I have a theory anyway, based on my limited understanding of the boot process:
the code that makes a bootable disc bootable must be contained in the disc directory. When you add to a multisession disc, the burning program must of course create a new directory. As a boot sector virus prevention measure, the DSL burning program is probably designed not to include any executable code from the original directory in the new directory.

I post this purely as a learning exercise for myself, in the hope that someone who actually knows the answer will confirm, or at least correct me.

TyphoonMentat
03-29-2005, 10:07 AM
Well, I hope you don't mind a correction :wink:
The program that DSL uses (cdrecord, it's the standard on all Linux distributions that can burn CDs) doesn't have any notions of boot sector virus protection. What probably happened was that HK tried to burn multisession on a disc which wasn't defined as a multisession disc to start with - causing corruption - or that something went wrong with his burn. I've tried the same process with Feather and Knoppix CDs, and they always work perfectly fine.

Harry Kuhman
03-29-2005, 10:21 AM
... What probably happened was that HK tried to burn multisession on a disc which wasn't defined as a multisession disc to start with - causing corruption - or that something went wrong with his burn. .... I don't think this was the case. I did burn it as a multi-session and left it open for additional sessiions. After booting DSL I was able to burn a second session (confirming that the cd had not been finalize as a single session disk and even bring the first session "forwad" so that I could see all of the DSL file in the new session. But the CD would not boot any longer. I even did this twice (once with a cdr, later with a cdrw), so I doubt that is was just "something" that went wrong with the burn.

Your report that you can do it with these other distros is interesting. I'll have to put duplicating this on my "to do list". I'll also try again with DSL, although to be honest I don't know exactly which version of DSL it was. I know there have been several minor releases of DSL since I did this. But if it still fails with the current DSL and does work with other distros that may point us in the right direction to understanding it.

Harry Kuhman
03-29-2005, 10:26 AM
..... I've tried the same process with Feather and Knoppix CDs, and they always work perfectly fine. Wait a second! You've tried burning Knoppix as the first session of a mutli-session CD, and were able to add more files as a second session, and have the CD still boot? How did you manage this on a CD? That second session should take more space than I've ever seen left on any Knoppic CD.

Flash00
04-02-2005, 10:07 PM
Having shot my mouth off about bootable multisession CDs I decided to do some research on the subject. Here's what I found:

First, a comprehensive and very readable history of the CD and all its formats: http://www.zzz.com.ru/zzz_original_site/art24.html

Bootable CD writing

[From what I found on the web, especially Bart's excellent website on how to create bootable CDs http://www.nu2.nu/bootcd/ and also http://www.smart-projects.net/isobuster/help/noframes/hs295.htm ]:

The El Torito http://www.phoenix.com/NR/rdonlyres/98D3219C-9CC9-4DF5-B496-A286D893E36A/0/specscdrom.pdf extension to ISO 9660 http://www.smart-projects.net/isobuster/help/noframes/hs160.htm created bootable CD ROMs which opened the door for Knoppix. I guessed that the code which makes a bootable disc bootable must be in the disc directory. Naturally the situation would be more complicated than that. First, there is something on the disc called a TOC (Table Of Contents) which I guess is what I meant by the disc directory. Then the filesystem, which I gather is not the TOC, must have some sort of internal directory that points to the files on the disc which contain the code the computer actually loads and runs when it boots.

"...The beauty of a bootable CD is that the contents are not limited to using ISO 9660 or any other file system, or any hardware platform, for that matter. Because the operating system can be included on the disc, it can be created to suit the application. More than one operating system can exist on the disc, to take optimum advantage of whatever platform or system on which it is played..." ( http://www.zzz.com.ru/zzz_original_site/art24.html )

Multi session CD writing

First: http://www-106.ibm.com/developerworks/linux/library/l-cdburn.html?ca=dgr-lnxw41BurnCD

Then [Copied from http://www.kumarayil.net/cdrw.htm ]:

(This is based on Mr. A Vasudevan <vasu_a2001@yahoo.com> mail to ILUG-Chennai)

[I also found it here http://www-106.ibm.com/developerworks/linux/library/l-cdburn.html?ca=dgr-lnxw41BurnCD ]

"Multisession CDs are built with sessions, and sessions are divided into tracks. On a single-session disk, there is a lead-in, a single TOC (table of contents), the data, and a lead-out, which finalizes the disk and prevents further recording on the disk. mkisofs links the separate sessions together.

The first time you record a session on a disk, use the -multi switch in cdrecord:

$ cdrecord -v speed=8 dev=0,0 -data -multi -eject /writer/image.iso

The disk will be fixated in a manner that makes it readable and open for adding more data. To add more sessions to this disk, mkisofs needs to know the starting and ending sector numbers, which you can find like this:

$ cdrecord dev=0,0 -msinfo
0,27139

Be sure to have the disk you are adding data to in the CD recorder. Then add two new switches, -C and -M:

$ mkisofs -o test2.iso -J -R -V Session2 -C 0,27139 -M 0,0 /files/path/

Or better, let the command shell do the work:

$ mkisofs -o test2.iso -J -R -V Session2 -C `cdrecord dev=0,0 -msinfo` -M 0,0 /files/path/

Multisession CD drives read the last session written. This command takes the TOC from the last session and combines it into the new TOC. For the last session on the disk, omit the -multi option."


Several references on the internet said that the CD drive must be new enough to be capable of reading multisession discs.

TyphoonMentat
04-02-2005, 11:02 PM
Wait a second! You've tried burning Knoppix as the first session of a mutli-session CD, and were able to add more files as a second session, and have the CD still boot? How did you manage this on a CD?

Sorry, my mistake. I meant that I used a version of Knoppix I'd trimmed down to 500Mb or so (removed lots of ancillary software and added about 20 Perl modules for my development environment), and then added more via multisession.