LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-23-2017, 09:42 AM   #16
hilltownboy
Member
 
Registered: Jan 2008
Location: Ashfield, MA
Distribution: Debian 10 "Buster", Arch
Posts: 123

Original Poster
Rep: Reputation: 15

ferrari:
Code:
user@debian:~$ sudo modprobe sr_mod
user@debian:~$ lsmod | grep sr
sr_mod                 24576  0
cdrom                  49152  1 sr_mod
pcmcia_rsrc            20480  1 yenta_socket
pcmcia_core            20480  3 yenta_socket,pcmcia,pcmcia_rsrc
scsi_mod              180224  6 sd_mod,usb_storage,libata,uas,sr_mod,sg
user@debian:~$ ll /dev/sr*
ls: cannot access '/dev/sr*': No such file or directory
 
Old 11-23-2017, 10:49 AM   #17
hilltownboy
Member
 
Registered: Jan 2008
Location: Ashfield, MA
Distribution: Debian 10 "Buster", Arch
Posts: 123

Original Poster
Rep: Reputation: 15
AwesomeMachine:

Booted with a data disk in external USB drive. No sr0 or dvd in /dev, but the following:
Code:
crw-rw----+ 1 root cdrom    21,   1 Nov 23 11:33 sg1
 
Old 11-23-2017, 12:33 PM   #18
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,231

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
What does sg_map show?
Code:
~> sudo sg_map
For reference I get
Code:
[sudo] password for root: 
/dev/sg0  /dev/sda
/dev/sg1  /dev/sr0
~>
 
Old 11-23-2017, 07:15 PM   #19
hilltownboy
Member
 
Registered: Jan 2008
Location: Ashfield, MA
Distribution: Debian 10 "Buster", Arch
Posts: 123

Original Poster
Rep: Reputation: 15
ferrari:
Code:
user@debian:~$ sudo sg_map
sudo: sg_map: command not found
AwesomeMachine:
Booted with data disk in internal cd drive. No sr0,dvd,or cdrom in /dev.
Using eject:
Code:
user@debian:~$ eject
eject: tried to use `/dev/sr0' as device name but it is no block device
eject: unable to find or open device for: `cdrom'
 
Old 11-23-2017, 07:51 PM   #20
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,231

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
It's part of the sg3-utils package...
https://packages.debian.org/stretch/sg3-utils
 
Old 11-23-2017, 10:42 PM   #21
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
It looks like the drive is /dev/sg1
 
Old 11-24-2017, 03:22 AM   #22
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,231

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Quote:
It looks like the drive is /dev/sg1
I agree, but the sr_mod ( SCSI cdrom sr) driver is supposed to create the /dev/sr* device node for cdrom/dvd support AFAIU.
 
Old 11-24-2017, 03:29 AM   #23
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,231

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Maybe this only applies to SCSI/SATA devices, and /dev/sg1 is all there is for a legacy IDE device?
 
Old 11-24-2017, 03:35 AM   #24
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,231

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Another way to confirm...
Code:
cat /proc/sys/dev/cdrom/info
 
Old 11-24-2017, 03:37 AM   #25
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
It's probably using the sg driver instead of the sr driver, because it's a USB CD drive.
 
Old 11-24-2017, 03:45 AM   #26
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,231

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Quote:
It's probably using the sg driver instead of the sr driver, because it's a USB CD drive.
Ah, I see. I hadn't realised it was a USB-connected device.
 
Old 11-24-2017, 10:51 AM   #27
hilltownboy
Member
 
Registered: Jan 2008
Location: Ashfield, MA
Distribution: Debian 10 "Buster", Arch
Posts: 123

Original Poster
Rep: Reputation: 15
I have confused matters by using both the USB drive and the internal drive.

This morning my /dev has changed: now shows sg1 as well as sg0; also now shows sr0 as well as links from cdrom,cdrw,dvd and dvdrw to sr0.

Eject worked on the internal drive with no disk in it. But with a data disk in it I can't mount it or eject it:
Code:
user@debian:~$ mount /media/cdrom
mount: no medium found on /dev/sr0
user@debian:~$ mount /media/cdrom /mnt
mount: only root can do that
user@debian:~$ sudo mount /media/cdrom /mnt
mount:  /media/cdrom0 is not a block device
user@debian:~$ sudo mount /dev/sr0 /mnt
mount: no medium found on /dev/sr0
user@debian:~$ eject
eject: unable to eject, last error: Inappropriate ioctl for device
Code:
user@debian:/dev$ ll |grep sr0
lrwxrwxrwx  1 root root           3 Nov 24 11:32 cdrom -> sr0
lrwxrwxrwx  1 root root           3 Nov 24 11:32 cdrw -> sr0
lrwxrwxrwx  1 root root           3 Nov 24 11:32 dvd -> sr0
brw-rw----+ 1 root cdrom    11,   0 Nov 24 11:32 sr0

Last edited by hilltownboy; 11-24-2017 at 10:52 AM.
 
Old 11-24-2017, 11:23 AM   #28
hilltownboy
Member
 
Registered: Jan 2008
Location: Ashfield, MA
Distribution: Debian 10 "Buster", Arch
Posts: 123

Original Poster
Rep: Reputation: 15
After the above I was now able to boot from a disk in the internal drive. It began to install Puppy linux to RAM but froze, so I had to shutdown. Now upon rebooting Debian Stretch /dev no longer has sr0 and links.

Code:
user@debian:~$ cat /proc/sys/dev/cdrom/info
cat: /proc/sys/dev/cdrom/info: No such file or director
 
Old 11-24-2017, 12:10 PM   #29
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 3,264
Blog Entries: 1

Rep: Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102
Quote:
Originally Posted by hilltownboy View Post
...my ancient BIOS...
Have you checked to see if there is an update available for that ancient BIOS?
 
Old 11-25-2017, 03:29 AM   #30
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,237
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
Quote:
Originally Posted by hilltownboy View Post
After the above I was now able to boot from a disk in the internal drive. It began to install Puppy linux to RAM but froze, so I had to shutdown. Now upon rebooting Debian Stretch /dev no longer has sr0 and links.
i'm beginning to suspect that your thread title is misleading, and your problems do not stem from an upgrade and even the mysteriously disappearing cd rom drive is just a symptom of something bigger - hardware trouble?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Mouse won't work in top bar or at login screen on w510 after debian jessie to stretch upgrade. gimili Linux - Software 11 08-02-2017 10:04 AM
LXer: How to upgrade Debian 8 Jessie to Debian 9 Stretch LXer Syndicated Linux News 0 06-16-2017 02:11 AM
mount command show /dev/sr0 .what sr0 is representing ? gardenair Linux - Newbie 5 03-09-2012 11:27 AM
using flash drive changes device /dev/sr0 to /dev/sr1 for mapping to /dev/pktcdvd/0? lugoteehalt Linux - Software 3 10-24-2007 10:27 AM
/dev/cdrom links to /dev/sg0 instead of /dev/sr0 -why? Yalla-One Slackware 3 10-01-2006 07:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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