LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-20-2024, 04:27 AM   #1
exerceo
Member
 
Registered: Oct 2022
Posts: 34

Rep: Reputation: 7
Question How to reload a CD/DVD without physically opening the disc tray?


After burning an optical disc (CD/DVD/Blu-ray) using K3b with the option not to open the tray, Linux still thinks that a blank disc is inserted.

lsblk still lists the disc as "2K" size:
Code:
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sr0          11:0    1     2K  0 rom
Mounting the disc fails:
Code:
mount: /media/username/RAM/disc: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error.
However, K3b correctly shows the disc label. This means that the optical drive and K3b is aware that the disc contains data, but the Linux system outside K3b is unaware of it, until the tray is physically opened and closed.

On Windows, writing to the disc without opening the tray works. Windows Explorer shows the files immediately after finishing.

Is there any way to reload an optical disc on Linux without physically opening the tray? How to make Linux "aware" of the new data on the disc without physically reloading the tray?


Side note: In the title of this post, I used "CD/DVD" instead of "optical disc" or "Blu-ray disc" because "CD/DVD" is the most widely understood, and "disc" can be confused with "hard disk".


And to the criers of "optical discs are obsolete!!1!1!", watch: https://www.youtube.com/watch?v=qbxaPc2Xf5M

Last edited by exerceo; 02-20-2024 at 04:29 AM. Reason: generic username
 
Old 02-20-2024, 06:20 AM   #2
lvm_
Member
 
Registered: Jul 2020
Posts: 963

Rep: Reputation: 342Reputation: 342Reputation: 342Reputation: 342
partprobe?
 
Old 02-20-2024, 10:25 AM   #3
exerceo
Member
 
Registered: Oct 2022
Posts: 34

Original Poster
Rep: Reputation: 7
Exclamation

Quote:
Originally Posted by lvm_ View Post
partprobe?
Didn't work. It caused the optical drive to spin up, but it still appears as "2K".

Code:
$ sudo partprobe /dev/sr0; lsblk /dev/sr0
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0   11:0    1   2K  0 rom

Last edited by exerceo; 02-20-2024 at 02:52 PM. Reason: correct number, dollar sign
 
Old 02-21-2024, 11:07 AM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,988

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Your lsblk output indicates the optical drive is not mounted. So just mount it with:
Code:
$ sudo mount /dev/sr0 <mountpoint>
Once mounted, the data on the drive should be accessible without having to eject the optical media. Note, the mount command must be run with admin privileges. Also, if you are writing cd audio to the disk, i.e. you are making a music cd, the disk will not be mountable with the mount command as cd audio disks have no filesystem.

Last edited by kilgoretrout; 02-22-2024 at 07:41 AM.
 
Old 02-21-2024, 12:11 PM   #5
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 794

Rep: Reputation: 253Reputation: 253Reputation: 253
Maybe rescan the bus? Assuming sr0 as proper device. You should also verify that the disk wrote correctly to rule that out.
Code:
echo "1" > /sys/class/block/sr0/device/rescan
 
  


Reply

Tags
blu-ray, cd, dvd, optical drive



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
Iso, disc backup, dd, disc to disc backup, UEFI, unmounting?, cyno77 Linux - Newbie 8 03-31-2021 08:34 PM
[SOLVED] apache2.service: Reload operation timed out. Killing reload process. dr-ing Linux - Software 5 03-27-2020 07:59 AM
apache2.service: Reload operation timed out. Killing reload process. dr-ing Linux - Software 1 03-27-2020 02:13 AM
When burning a DVD is a Video Disc just a data disc with the DVD Video file system Alpha90 Linux - Software 4 10-15-2013 04:21 PM
Tomcat reload servlet is very slow, but reload jsp is fast and good? gsbarry Programming 2 04-28-2006 09:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:33 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