Burning CDs with K3b


Here's a common scenario: Someone's computer won't boot, and he's just got to get his data off that machine. As you'll find out in Chapters 4 and 5, it's really easy to take care of that problem with Knoppix, a NIC, some Ethernet, and a network, but that's not always possible. If the user has a CD-R/W on that machine, though, you can still save his bacon by burning a CD. It's not tremendously hard to burn CD-RWs from the command line, but it's easier to use a nice GUI, and K3b is easily the best CD-burning GUI available for Linux, perhaps even on any platform.

Open K3b from the K menu by selecting Multimedia K3b. The first time you open it, K3b asks you to confirm your burner's write speeds. It probably defaults to 0, which is obviously of no help, so bump it up to the correct speed and click OK.

Tip 

This might be obvious, but K3b won't work unless you have a CD-R/RW device installed on your system, and Knoppix needs to have recognized it. To confirm that K3b sees your CD-R/W, open K3b, select Settings Configure K3b, and choose the Devices button on the left. Your CD-R/W should be listed. If it isn't, click Add Device and help K3b try to find your burner. If you need broader help getting your CD-R/RW hardware to work, take a look at the CD-Writing HOWTO at http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html.

Here's something else you need to consider: You can't burn a CD if Knoppix is taking up your only CD-R/W drive! If you have two CD drives, you're set: Boot Knoppix in one and use the other to burn. If you only have one CD-R/W drive, you may need to install Knoppix on your hard drive (see Appendix B) to free your CD drive for the burn (you can uninstall Knoppix after you've checked your new CD).

K3b is divided into two main areas: a file and folder navigation area in the top half of the window and a project view in the bottom half, as shown in Figure 1-17.

image from book
Figure 1-17: K3b's main window

K3b makes it very easy to get started by providing buttons for the four most common tasks in the project view. To burn a data CD for backup, choose New Data CD Project. The project view area changes to Current Projects, as shown in Figure 1-18.

image from book
Figure 1-18: Creating a Data CD Project in K3b

Using the top half of the window, navigate to the items you want to burn and begin dragging them into the bottom half of the window. As you add items, the bar at the bottom of the window shows you how much space you've taken up on your CD and how much you have left. Gone over the limit? Just select an item in the project and press your Delete key to remove it from the burn. Once you've correctly specified the items you want to save onto a CD, click the Burn button in the bottom right of the K3b window.

A new window opens up: Data Project. This is an extremely important window because it enables you to tell K3b exactly how you want to burn your CD. You have several options here, and selecting the wrong one can mean the difference between a successful backup and a shiny hunk of plastic.

To lessen the chance that you'll end up with a bad burn, this section covers the key changes you need to make. There's not enough space in the book to cover everything, but K3b has informative built-in help. If you're unsure about an option, just click the What's This button (the one that looks like a question mark) in the upper-right corner of the window, and then select the option in the window about which you'd like more information.

Setting Burn Speed

The first thing to set is the speed at which you're going to burn your CD. Do this on the Data Project window's Writing tab (see Figure 1-19).

image from book
Figure 1-19: The Writing tab of the K3b Data Project window

If you leave Speed set to Auto, K3b tries to burn at maximum speed. This may or may not work. Experience has shown that it's a good idea to burn at a slower speed to ensure that the burn is not problematic, no matter what software you use. If you have the time and patience, 4x is slow and steady and almost always works. Granted, it takes about 15 minutes or so to burn a full 700MB disc, but if you do something else while you're burning, it's not a big deal. If you're not that patient, start out fast, test your results, and be prepared to slow things down gradually, testing after each burn until you find the optimum speed for your hardware and your media.

If you leave On the Fly selected, K3b does just that: write the files directly to the CD-R/W without first creating an ISO image. If your hardware is fast enough, this should be no problem. If your hardware is slow, however, or if you're experiencing problems burning, check On the Fly; K3b will first create an ISO image of your data, and then burn that ISO image to disc, a process that takes longer but is more likely to result in a good burn. If you uncheck On the Fly, Remove Image is no longer grayed out; however, you should probably leave Remove Image checked so that K3b erases the ISO it created once it has successfully burned it to disc, thus reclaiming your storage for Knoppix.

Remember that Knoppix is using your RAM as its hard drive, so you may not be able to write an ISO image unless you have enough RAM to hold it. To find out how much space you've got, run the df -h command in Konsole and note how much free space is available on the /ramdisk row. If you don't have enough room, check how much is available on one of your mounted hard drives. If there's space, mount the hard drive with write access (right-click on the icon on the Knoppix desktop, select Properties, open the Device tab, uncheck Read Only, and mount the drive). One last step: Tell K3b that you want it to use your hard drive to hold the ISO by changing the path for Write Image File To (which is no longer grayed out once you uncheck On the Fly on the Writing tab) so that it points to your newly mounted writable hard drive. Yes, it's a lot of work, but that's what happens when you're using a Live CD.

It's generally a good idea to select Verify Written Data (the final option on the Writing tab), which compares what was burned to the original data, thereby letting you know if something didn't work correctly.

Burning in Sessions

You need to change the settings on the Data Project's Settings tab (see Figure 1-20) only if you plan to add content to your CD over several different burning sessions.

image from book
Figure 1-20: Setting the kind of session you're using in K3b

Most of the time, you'll probably fill a CD completely, so you want the default: No Multisession. If you're going to use several different sessions, you don't want K3b to "close" the disc until you're finished. To do this correctly, use Start Multisession for the first burn, Continue Multisession for the next burns except the last one, and then complete your CD-R/W with Finish Multisession, which tells K3b that it's all right to close the disc. You'll use the default No Multisession most often, but it's good to know how to create a multiple-session CD if you need one.

Keeping Yourself Informed

The Volume Desc tab is shown in Figure 1-21.

image from book
Figure 1-21: Describing the disc you're burning in K3b

None of the information on the Volume Desc tab prevents a successful burn, but you'll probably want to spend a moment here just so things are organized and clear. In other words, this tab really isn't for the computer — it's for the human user. Fill things out as you see fit.

Understanding Filesystems

The Data Project's Filesystem tab (see Figure 1-22) is very important, especially if you want to make sure that your disc can be used on both Linux and other operating systems. For backups, this is an essential consideration. If you never have to touch a Windows machine, this tab may not be as significant to you, although there are still things here that you will probably want to set.

image from book
Figure 1-22: Tell K3b what kind of filesystem you want to place on your new CD.

Checking the boxes in the File Systems section is key if you're after cross-platform compatibility. There's a wide variety of standards for CDs, and in typical fashion in the computer world, they don't always agree. For instance, when you burn a CD, you can stick to ISO9660 standards, but all filenames must be in all capital letters, and they have to be a maximum of eight characters, plus the period and the extension. DOS, anyone? You can also use the Rock Ridge extensions, which enable UNIX systems (including Linux and Mac OS X) to read CDs that contain files with names of up to 255 characters, as well as support UNIX-like things such as owners, groups, permissions, and symbolic links. However, Windows does not support Rock Ridge (worth $50 billion and with 30,000 employees, Microsoft can't support Rock Ridge?), so don't use it as your only filesystem if you want to access your data on that operating system.

If you want to make sure that Windows users can read the content of your discs, enable Joliet extensions, which support up to 64 characters in filenames (although there's a way around this, as you'll shortly see). Users of Linux and Mac OS X can also read CDs that use Joliet, but Mac OS 9 and earlier will truncate filenames at 31 characters, a major limitation of pre-OS X Macs.

UDF, which stands for Universal Disk Format, is used mainly for DVDs, but CD-R/Ws can also use it. It allows for 127-character filenames, including spaces. The idea is that you can write to CDs and DVDs just like you write to floppies, USB drives, or hard drives: just drag and drop. For UDF to work, though, you need very recent hardware and special drivers if you're using Windows or Mac OS (most Linux distros now include support for UDF-based discs). If you're shooting for wide compatibility, you probably should avoid UDF at this time.

With an understanding of these different filesystems, the options on the Filesystem tab start to make more sense, don't they? If your disc is only going to be used on Linux machines (or Linux and Mac OS X), check Generate Rock Ridge Extensions. If you use Rock Ridge but you don't want symbolic (or "soft") links included on your burn, check Discard All Symlinks. If you are concerned about including soft links, but you want to make sure that you don't accidentally include links to files that aren't included in your burn project, make sure that you check Discard Broken Symlinks.

In addition, remember that if you're using Rock Ridge, you can tell K3b to include information about file permissions along with the burn. To do this, check Preserve File Permissions (Backup). As the name implies, this creates an exact backup of your files — not just the data, but also the meta-information about who owns it and what they can do with it.

If you want to include Windows machines in your burn, check both Generate Rock Ridge Extensions and Generate Joliet Extensions. Your Linux machines will see files of up to 255 characters, while Windows will see files truncated to 64 characters unless you check a box on the next tab, which we'll get to in just a moment.

The options in the Whitespace Treatment area of the window can be useful if you want to get rid of spaces in the filenames on your disc. No change does just that — files that have spaces in their names still do. Nowadays, this isn't really a problem for Linux boxes, so we just usually leave K3b set to that.

Over the years, the standards for burning CDs have morphed in many different directions. Fortunately, most modern hardware and modern operating systems support most of these addons and extensions, but it's still a good policy to test all burned CDs on the various CD readers that you plan to use before you rely on those discs! It would be a shame to make backups of your vital data onto CD, intending to transfer the data to a different machine, only to find out after you've repurposed the original box that the different computer can't read your discs. Testing is always worth the time it takes.

Fine-Tuning CD-R/W Filesystems

The Data Project's Advanced tab (see Figure 1-23) enables you to make changes to the basic CD-R/W filesystems.

image from book
Figure 1-23: You can change the basic CD-R/W filesystems in K3b.

Getting beyond the 64-character limit for the Joliet extension was mentioned earlier. Here's how to do it: Check Allow 103 Character Joliet Filenames, and you almost double your allowed filename length on Windows machines. Does this break the official Joliet standard? Yup. Does it appear to work anyway in Windows? Yup, so go for it (but remember to test first). Also remember that you can get up to 255 characters in your filenames using Rock Ridge but only 103 characters using Joliet. Still, for all but the longest of filenames, 103 characters should suffice.

The Allow Untranslated Filenames option has nine sub-options. Checking Allow Untranslated Filenames activates eight of those sub-options — weirdly, you must enable Allow Max Length Filenames (37 Characters) if you want it because that option isn't included by choosing the parent option.

In essence, checking either Allow Untranslated Filenames or any of its sub-options breaks the ISO9660 standard. We recommend going ahead and selecting Allow Untranslated Filenames anyway; in for a penny, in for a pound, as they say. Realize that your CD will not play in MS-DOS, but how concerned about that are you? We've burned countless discs with that option on, and we've never had a problem in either Linux or Windows playing those CDs. Your mileage may vary, though.

The Input Charset section enables you to specify the language character set you're using in your filenames. If you don't specify anything, K3b uses the default of ISO-8859-1, which covers Western European languages, such as the one you're using to read this book. If you're using different characters (such as Russian, Asian, or Hebrew, for example) in your filenames, specify the character set you need by checking Force Input Charset and choose from the drop-down menu. If the option you want to use isn't listed (UTF-8 isn't there, for instance), you can manually enter it.

It does take some time to examine all of these options, but if you want to do your burns correctly, you have to know how to use the program.

Ready, Set, Burn

OK, it's time to burn. Click the Burn button in the upper right corner of the window. Depending on the speed of your burner and the speed you've chosen for your burn, you'll shortly be done. While K3b works, it displays a progress bar showing you what it's doing and how far it has progressed. If you get an error, take a look at the info that K3b provides because it can help diagnose the problem.

You can create other kinds of CDs besides simple data disks, but that's probably what you'll use Knoppix for most of the time. The four main tasks are listed in the project area, but check out the Tools menu for other possibilities. Keep in mind that Knoppix comes with most of the software that K3b needs to work its magic, but a few things are missing for space reasons. For example, the transcode package isn't included, so you can't encode audio and video from DVD or AVI files, and you also don't have eMovix, so you won't be able to burn video CDs that will boot and automatically play. (You can add these on your own, however.) Conversely, you can create SVCDs (Super Video CDs), believe it or not.

Note 

The first place to go for information about K3b is the project's home page, at http://www.k3b.org. There's not a lot there, unfortunately, but you might find something useful, such as the latest news about software releases. However, the mailing list, found at http://www.sourceforge.net/mailarchive/forum.php?forum_id=1927, is currently averaging a couple of hundred emails a month, so you might be able to find help there, maybe even from Sebastian Trueg, the creator and maintainer of K3b.

If you want to learn more about burning CDs and DVDs, an excellent and up-to-date resource is Andy McFadden's CD-Recordable FAQ, which you can find at http://www.cdrfaq.org. For Linuxspecific information, see the CD-Writing HOWTO at the Linux Documentation Project, http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html. It's several years old, but still has good stuff in it.

If you want to bypass K3b completely and just use the command line, IBM's developerWorks site has a great tutorial, at http://www-106.ibm.com/developerworks/linux/library/l-cdburn.html, called Burning CDs on Linux. IBM's site requires free registration, but it's not onerous.



Hacking Knoppix
Hacking Knoppix (ExtremeTech)
ISBN: 0764597841
EAN: 2147483647
Year: 2007
Pages: 118

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net