View previous topic :: View next topic |
Author |
Message |
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Tue Jan 27, 2015 5:12 pm Post subject: No /dev/sg0 with sata dvd player |
|
|
I can't write on dvd+rw disks, although reading commercial disks works fine. I suspect that in addition to /dev/sr0, I should have a /dev/sg0, If that is the case, how do I get that into /dev. If not, what should I be looking for. I have the following scsi references in /usr/src/linux/.config. Code: | # SCSI device support
CONFIG_SCSI_MOD=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_NETLINK is not set
# CONFIG_SCSI_MQ_DEFAULT is not set
CONFIG_SCSI_PROC_FS=y
# SCSI support type (disk, tape, CD-ROM)
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
CONFIG_SCSI_SCAN_ASYNC=y
# SCSI Transports
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
# CONFIG_ISCSI_IBFT_FIND is not set
| Many thanks,
Fred |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54262 Location: 56N 3W
|
Posted: Tue Jan 27, 2015 5:25 pm Post subject: |
|
|
Fred Krogh,
I suspect its CONFIG_CHR_DEV_SG=y _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Tue Jan 27, 2015 5:34 pm Post subject: |
|
|
I have CONFIG_CHR_DEV_SG=m, I can try changing that to a y, but will need to reboot to try it and that I can only do after clearing up some other things. Will let you know if that makes a difference. Thanks. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Tue Jan 27, 2015 6:40 pm Post subject: |
|
|
I have just rebooted with a DVD+RW disk in the drive that I can't do anything with. So now I have CONFIG_CHR_DEV_SG=y, but still no /dev/sg0. I also needed to add a softlink to get /dev/dvd pointing to /dev/sr0. So I'm hoping for another suggestion. Thanks. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54262 Location: 56N 3W
|
Posted: Tue Jan 27, 2015 7:29 pm Post subject: |
|
|
Fred Krogh,
As a test use mknod to add a few /dev/sg nodes.
sg0 is Code: | crw-r----- 1 root disk 21, 0 May 12 2013 /dev/sg0 | but so thot permissions don't get in the way, make them 666
Every sd or sr should have an associated sg, so don't skimp on mknod for the test.
If its the dev nodes missing, you should have just made the missing nodes.
If the kernel code is correct underneath the node, it will work util the next reboot.
If the kernel code is still missing, making dev nodes won't help.
What does uname -a tell you?
crw-r----- looks wrong
crw-rw---- would be better. Thats my static /dev in a mess. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Wed Jan 28, 2015 3:11 pm Post subject: |
|
|
Using mknod, I now have in /dev Quote: | crw-rw-rw- 1 root root 21, 0 Jan 28 06:48 /dev/sg0
brw-rw----+ 1 root cdrom 11, 0 Jan 28 06:59 /dev/sr0 | uname -a gives Quote: | Linux mon1 3.18.3-gentoo #1 SMP Sat Jan 17 12:56:01 PST 2015 x86_64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GenuineIntel GNU/Linux | . I have tried formatting disks using Quote: | dvd+rw-format -f /dev/dvd
mkfs.ext2 -t ext2 /dev/dvd | When trying to look at the contents of the disk, I get Quote: | mount: wrong fs type, bad option, bad superblock on /dev/sr0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so. | dmesg|tail ssys Quote: | [57795.372974] cdrom: sr0: dirty DVD+RW media, "finalizing"
[57925.581737] traps: get-edid[6678] trap invalid opcode ip:7fd947d25f6f sp:7fff2cb1f580 error:0 in libx86.so.1[7fd947d1e000+20000] | Is any of this helpful? Thanks. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54262 Location: 56N 3W
|
Posted: Wed Jan 28, 2015 6:08 pm Post subject: |
|
|
Fred Krogh,
The kernel you are running was built on uname -a: | Sat Jan 17 12:56:01 PST 2015 |
On Tue Jan 27, 2015, you said you rebooted into a kernel with CONFIG_CHR_DEV_SG=y set.
It looks like you are not running the kernel you think you are.
Code: | dvd+rw-format -f /dev/dvd
mkfs.ext2 -t ext2 /dev/dvd | that takes me back. I seem to recall that you need to use dvd+rw media (CD-RW works too), the kernel packet writing patches and some specdal /dev nodes to make this work.
The packet writitng mailing list closed on 2011.10.26 12:59. I still have my archive.
I will need to do some digging if you want help with this, its been a long time since I used packet writing. Its very slow.
My optical writer was IDE. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Wed Jan 28, 2015 8:41 pm Post subject: |
|
|
You are correct. Evidently I updated the config files, but did not recompile the kernel. Damn. I'll post more when I have the kernel redone. Sorry. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Wed Jan 28, 2015 8:56 pm Post subject: |
|
|
Now on a reboot, I have /dev/sr0, /dev/sg0, /dev/sg1, and /dev/sg2. I still can't format a dvd in such a way that I can look at it. I still get: cdrom: sr0: dirty DVD+RW media, "finalizing". Sometime in the distant (say 3 years?) past, I think I had this working. I've also tried to get this to work using fdisk, and mkfs.ext2 /dev/sr0. This one complains that Quote: | mke2fs 1.42.12 (29-Aug-2014)
Found a dos partition table in /dev/sr0
Proceed anyway? (y,n) y
Creating filesystem with 1147552 4k blocks and 287424 inodes
Filesystem UUID: 28a9290b-2dca-4419-8128-08fafbbc26f0
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736 | After this I still have the same errors in trying to access the dvd.
If it is not too much trouble for you, I'd be interested in getting this fixed. But this is not my only means for doing backups. Many thanks, Fred |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54262 Location: 56N 3W
|
Posted: Wed Jan 28, 2015 9:09 pm Post subject: |
|
|
Fred Krogh,
I always used UDF on dvd+rw. You must use a filesystem with a 32k block size as thats the block size on the underlying media. UDF is designed for this sort of thing.
I recall that with UDF, it would gather writes into 32k chunks to avoid 8 read/erase/write cycles ber physical block written.
I suspect that with other filesystems the kernel caching will help a lot.
I've not used packet writining like this since before April 2009, when this system was put together.
I'll put a little time into it this week but it will be the weekend before I can fix my old PC, which has a failed PSU. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Wed Jan 28, 2015 9:15 pm Post subject: |
|
|
I'm not familiar with UDF. If it is just a matter of formatting the dvd to use it, I'm all for it. If this is what you are suggesting I'll do some looking into this. (At the moment as you know -- many thanks -- I'm more concerned about the monitor problem.) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54262 Location: 56N 3W
|
Posted: Wed Jan 28, 2015 9:42 pm Post subject: |
|
|
Fred,
Read http://fy.chalmers.se/~appro/linux/DVD+RW/
Its old and mostly still correct, even though its written around the ide-scsi layer which nobody uses.
udftools is still in the tree. You will need UDF support in the kernel.
You can practice with UDF in an empty file - no need to destroy any media.
When it works, try
Code: | mkudffs --spartable=2 --media-type=cdrw /dev/scdN
mount -o rw,noatime /dev/scdN /mnt/cdrom | well, not exactly that. Read the mkudffs man page. Adapt the command to your media, and /dev/sr0.
There is one wrinkle that sticks in my mind. UDF is read only backwards compatible. That means that older versions of UDF code can read newer versions of the filesystem. However they may not be able to write them.
I'm out of touch with the kernel UDF driver. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|