LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-28-2005, 02:12 AM   #1
xcalibra
LQ Newbie
 
Registered: Jul 2004
Distribution: suse 9.1 pro, gentoo
Posts: 15

Rep: Reputation: 0
Is there any Virtual CD software for linux?


Any good suggestions?
 
Old 09-28-2005, 02:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what is a virtual cd to you? if you want to mount cd files then just use a loppback mount: "mount -o loop file.iso /mnt/cdrom" but yo really could exapnd a LOT more rather than posting a one liner...
 
Old 05-03-2006, 02:20 PM   #3
jevans17
LQ Newbie
 
Registered: Apr 2001
Location: Banbury UK
Distribution: Mint17
Posts: 6

Rep: Reputation: 0
Virtual CD - MY definition of what I am searching for

I have used virtual CD on the other main operating system to load information CD's like the Oxford Dictionary & infopedia so I can have extra information at my fingertips as if the CD's were loaded in my CD drive.

I suspect there is nothing on Linux like this just yet

is there?

Evan
 
Old 05-03-2006, 02:45 PM   #4
PMorph
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 213

Rep: Reputation: 31
. . . . . .
Quote:
Originally Posted by acid_kewpie
if you want to mount cd files then just use a loppback mount: "mount -o loop file.iso /mnt/cdrom"
 
Old 05-03-2006, 03:09 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by PMorph
. . . . . .
mmm yeah quite. ;-)
 
Old 05-03-2006, 08:39 PM   #6
hisnumber666
Member
 
Registered: Mar 2006
Distribution: Debian Sarge, Windows Server 2003
Posts: 66

Rep: Reputation: 15
that was gonna be my question... so basically since the image contains a filesystem, mount should know what to do with it right?
would it work with all kinds of images? iso/bin(without cuesheet), mdf/mds, nrg?
 
Old 05-03-2006, 09:33 PM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
iso files are a complete image of a file system so they can be mounted by linux easily..
http://en.wikipedia.org/wiki/ISO_image

nrg files are proprietary I doulbt Linux would know what to do with them..
mdf-- alcohol 120% ? Another proprietary file format
mds ?
 
Old 05-03-2006, 11:16 PM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by hisnumber666
that was gonna be my question... so basically since the image contains a filesystem, mount should know what to do with it right?
would it work with all kinds of images? iso/bin(without cuesheet), mdf/mds, nrg?
Yup.

You want to have some fun, and if you aren't careful get yourself confused?

Use the dd command to make a complete image of your system partition(s), copying the image(s) to some other location. Then set up mountpoint(s) and mount the image(s). Then browse into one or more of the images.

You find yourself looking at an exact copy of your system, in a directory on your system. You can chroot to the image. You can even mount recursively, mounting the image to a mountpoint within the image.
 
Old 05-04-2006, 02:13 AM   #9
hisnumber666
Member
 
Registered: Mar 2006
Distribution: Debian Sarge, Windows Server 2003
Posts: 66

Rep: Reputation: 15
yes i know about dd(disk dump)... i was more curious about different kinds of images various programs create (nero creates nrg, then there is mdf/mds(one of them is like a cuesheet for the other) and so on)...
speaking of dd... i havent had much success copying partitions from one device to the other directly... i have been trying to move my current linux installation to another hard drive, but every time something goes wrong. i got crc errors, dd runs out of space on target partition (even though the actual block size was the same)... after running fsck i browse the partition, half the stuff is gone... another time it all seemed good i tried to boot i get kernel panics.
partition magic sounds like a perfect tool to use... it finds "illegal data" in superblocks, and halts everything. although partition magic does one thing no other tool does - it expands you partition or shrinks it to the size you want without damaging you data.(i still advise to back up your important stuff and run fsck BEFORE, to make the partition clean so there wont be errors while expanding it - otherwise you are screwed)
i havent tried partimage due to the time factor... the whole procedure is quite lengthy... and once again as far as i know you have to create the target partition beforehand.
 
Old 05-04-2006, 02:13 AM   #10
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
The Alcohol 120% format, last I heard was still unusable in linux. Nero formats can be converted with nrg2iso. Would be nice if the OP actually replied but for the benefit of people in future who search, there is cdemu which is a kernel module that will trick the kernel into thinking an ISO is a actual CD drive as opposed to just mounting an ISO. Whatever turns you on I guess.

http://cdemu.sourceforge.net/
 
1 members found this post helpful.
Old 05-04-2006, 10:00 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
The .iso file is an exact image, block by block, of what's supposed to be on (say) a CD-ROM. When you mount it with the loopback device, Linux reads blocks from the virtual-device by reading from the appropriate locations in the iso-file.

In order to actually make sense of what's on the "device," of course Linux must also have an appropriate driver for the filesystem that's used on the "device." Most frequently that's ISO9660; the Microsoft MS-DOS format, renamed. But it can be others.

As you observe, ISO-files are very handy for dealing with material that is shipped on CD-ROMs because hard-drives are typically much faster.
 
Old 05-04-2006, 11:01 AM   #12
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
The Virtual CDROM jukebox article Linux Journal did a few years back was a wonderful example of this put to practical use.

http://www.linuxjournal.com/article/5639

Quote:
One 40GB hard drive occupies one spot on an IDE or SCSI controller. It can contain the equivalent of 57 full-sized CD-ROMs (at 700MB each). We would need 57 CD-ROM drives attached to the server to get the equivalent functionality, which is a practical impossibility.
 
Old 05-04-2006, 04:25 PM   #13
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by hisnumber666
speaking of dd... i havent had much success copying partitions from one device to the other directly... i have been trying to move my current linux installation to another hard drive, but every time something goes wrong. i got crc errors, dd runs out of space on target partition (even though the actual block size was the same)
I will bet that you tried, for instance, dd if=/dev/hda1 of=somethingorother...

Well guess what. That doesn't work. But, then, you knew that, didn't you?

When you do that you aren't picking up the actual ends of the partition.

To actually get an image of the partition, what you do is first run fdisk -l /dev/hda.

Take this result and compute the exact location of the partition on the disk, then use those values in dd.

For example, on my linux system, the system partition is located on /dev/sdc2. So, fdisk gives me this:

Code:
Disk /dev/sdc: 18.3 GB, 18351959040 bytes
255 heads, 63 sectors/track, 2231 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1         261     2096451    7  HPFS/NTFS
/dev/sdc2             262        1495     9912073+  83  Linux
/dev/sdc3            1496        2231     5911920    f  W95 Ext'd (LBA)
/dev/sdc5            1496        1750     2048256    7  HPFS/NTFS
/dev/sdc6            1751        2005     2048256    7  HPFS/NTFS
/dev/sdc7            2006        2231     1815313+   6  FAT16
This output specifies the # heads, the # of sectors/track, and the number of cylinders on the drive. For each partition, fdisk lists the starting cylinder and the ending cylinder, and the size in sectors; by default the formatting tools will use cylinder boundaries. Linux uses sectors that are 1024 bytes, which is 2 - 512 byte blocks. dd wants the starting sector and the size of the partition, in appropriate units. Default size for dd is blocks of 512 bytes.

To get the starting sector of the partition, take the end cylinder of the previous partition. Multiply that number by the number of sectors/track, then by the number of heads. This gives the first sector of the last track of the previous partition. Now add in the number of sectors/track to this number and the result is the first sector of the first track of the first cylinder of the next partition.

To get the size of the partition, subtract the beginning cylinder from the end cylinder and add one (to get the cylinder count). Then multiply this number by the sectors/track and the # heads. Then subtract the sectors/track from the result to get the total sectors in the partition.

The size of the partition may also be determined in sectors by taking the size listed by fdisk (in "blocks"), multiplying it by 2, and adding 1. I often compute it both ways just to make sure there is no mistake.

So, for my particular case where I want to use dd to image my system partition, I establish that the starting sector of the partition is 4193028 and the length of the partition in sectors is 19824147.

Thus, the dd command to do this partition is:

dd if=/dev/sdc of=/mnt/sdb1/sysimage bs=512 skip=4193028 count=19824147

Works perfectly. This is how I routinely backup. makes restoration easy; the restore is:

dd if=/mnt/sdb1/sysimage of=/dev/sdc bs=512 seek=4193028 count=19824147

Oh, by the way. The astute reader will note that most of this disk is formatted for Windows.

Well, the system has 4 hard drives in it and they are all a mishmash of windows and linux, except sdb which is all Linux. The system can dual-boot but I haven't booted Windows NT for years. Instead, I run VMware and routinely have Windows 2000 up and running in Linux.

Last edited by jiml8; 05-04-2006 at 04:27 PM.
 
  


Reply



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
virtual music jukebox software fulviom Linux - General 1 09-02-2005 07:36 PM
Virtual Machine Software. Is it for me? Damon Spector Linux - Software 1 08-07-2005 12:56 PM
Free Virtual Machine Software? Corey Edwards General 7 07-07-2005 06:26 PM
software for virtual cd in linux spyghost Linux - Software 5 09-03-2003 11:48 AM
What software can be used to create Virtual CD ? futurist Linux - Software 16 07-06-2003 10:12 AM

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

All times are GMT -5. The time now is 12:13 AM.

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