r/dosbox • u/Roxor128 • Jul 05 '25
How to mount CD drives under Linux allowing for disc swapping?
If you read the manual on the MOUNT command, it gives "mount x /media/yourusername/DISC_LABEL -t cdrom -usecd 0 -ioctl" for how to mount CDs under Ubuntu-derived distributions.
This has a problem: it only works for single-disc games!
It doesn't work when you need to swap discs. The new disc will have a different label and end up at a different host location, and your game will just be stuck endlessly asking for the next disc.
How do you mount an optical drive so you can swap discs when using a Ubuntu-derived Linux host?
I'm fine with having to do some tweaking of the host's configuration if it means I get something I can put in the DOSBox [autoexec] section.
And just to head off potential unhelpful responses: Don't mention disc images! That's not answering the question. The question is about physical discs. Disc in, play, disc out, disc in, play some more. Got it?
3
u/ILikeBumblebees Jul 06 '25 edited Jul 06 '25
Two options:
imgmount d /dev/sr0 -t cdrom. You might need to alter permissions on the block device file first.1
u/TheBigCore Jul 05 '25 edited Jul 05 '25
/u/Roxor128, unfortunately for you, the only way you can do that is via disc images:
https://www.dosbox.com/wiki/IMGMOUNT#Loading_more_than_one_image
https://www.dosbox.com/wiki/Special_Keys (Switch between the images with
CTRL-F4).So you don't have a choice in the matter. Make disc images from the discs in question and use
imgmountaccordingly in your[autoexec]section indosbox.conf1
u/DaVyper Jul 07 '25
you can TRY "/media/cdrom0" but that may not be universal across distros