I'm looking for some hints while troubleshooting missing CDROM device.
The problem is, missing configuration option for my custom kernel (linux-5.4.78).
My current .config has:
CONFIG_CDROM=y
CONFIG_BLK_DEV_SR=y
CONFIG_VHOST_SCSI=y
CONFIG_BLK_SCSI_REQUEST=y
CONFIG_SCSI_MOD=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_SCSI_SAS_ATTRS=y
CONFIG_SCSI_SAS_LIBSAS=y
CONFIG_SCSI_SAS_HOST_SMP=y
CONFIG_SCSI_LOWLEVEL=y
CONFIG_ISCSI_TCP=y
CONFIG_ISCSI_BOOT_SYSFS=y
CONFIG_SCSI_CXGB3_ISCSI=y
CONFIG_SCSI_CXGB4_ISCSI=y
CONFIG_SCSI_BNX2_ISCSI=y
CONFIG_BE2ISCSI=y
CONFIG_SCSI_HPSA=y
CONFIG_SCSI_3W_9XXX=y
CONFIG_SCSI_3W_SAS=y
CONFIG_SCSI_ACARD=y
CONFIG_SCSI_AACRAID=y
CONFIG_SCSI_AIC7XXX=y
CONFIG_SCSI_AIC79XX=y
CONFIG_SCSI_AIC94XX=y
CONFIG_SCSI_HISI_SAS=y
CONFIG_SCSI_HISI_SAS_PCI=y
CONFIG_SCSI_MVSAS=y
CONFIG_SCSI_MVSAS_TASKLET=y
CONFIG_SCSI_MVUMI=y
CONFIG_SCSI_DPT_I2O=y
CONFIG_SCSI_ADVANSYS=y
CONFIG_SCSI_ARCMSR=y
CONFIG_SCSI_ESAS2R=y
CONFIG_SCSI_MPT3SAS=y
CONFIG_SCSI_MPT2SAS=y
CONFIG_SCSI_SMARTPQI=y
CONFIG_SCSI_UFSHCD=y
CONFIG_SCSI_UFSHCD_PCI=y
CONFIG_SCSI_UFSHCD_PLATFORM=y
CONFIG_SCSI_UFS_CDNS_PLATFORM=y
CONFIG_SCSI_UFS_HISI=y
CONFIG_SCSI_UFS_BSG=y
CONFIG_SCSI_HPTIOP=y
CONFIG_SCSI_BUSLOGIC=y
CONFIG_SCSI_FLASHPOINT=y
CONFIG_SCSI_MYRB=y
CONFIG_SCSI_MYRS=y
CONFIG_VMWARE_PVSCSI=y
CONFIG_SCSI_SNIC=y
CONFIG_SCSI_DMX3191D=y
CONFIG_SCSI_FDOMAIN=y
CONFIG_SCSI_FDOMAIN_PCI=y
CONFIG_SCSI_GDTH=y
CONFIG_SCSI_ISCI=y
CONFIG_SCSI_IPS=y
CONFIG_SCSI_INITIO=y
CONFIG_SCSI_INIA100=y
CONFIG_SCSI_PPA=y
CONFIG_SCSI_IMM=y
CONFIG_SCSI_STEX=y
CONFIG_SCSI_SYM53C8XX_2=y
CONFIG_SCSI_SYM53C8XX_MMIO=y
CONFIG_SCSI_IPR=y
CONFIG_SCSI_IPR_TRACE=y
CONFIG_SCSI_IPR_DUMP=y
CONFIG_SCSI_QLOGIC_1280=y
CONFIG_SCSI_QLA_FC=y
CONFIG_SCSI_QLA_ISCSI=y
CONFIG_SCSI_LPFC=y
CONFIG_SCSI_DC395x=y
CONFIG_SCSI_AM53C974=y
CONFIG_SCSI_WD719X=y
CONFIG_SCSI_PMCRAID=y
CONFIG_SCSI_PM8001=y
CONFIG_SCSI_BFA_FC=y
CONFIG_SCSI_VIRTIO=y
CONFIG_SCSI_CHELSIO_FCOE=y
CONFIG_SCSI_LOWLEVEL_PCMCIA=y
CONFIG_SCSI_DH=y
CONFIG_SCSI_DH_RDAC=y
CONFIG_SCSI_DH_HP_SW=y
CONFIG_SCSI_DH_EMC=y
CONFIG_SCSI_DH_ALUA=y
CONFIG_ISCSI_TARGET=y
CONFIG_ISCSI_TARGET_CXGB4=y
CONFIG_QED_ISCSI=y
I'm expecting to see /dev/sr0. It's not there. dmesg is mute about sr0.
However, I'm able to see it using stock kernel and I've identified it was bring by BLK_DEV_SR on my target:
# ls -l /dev/sr0
brw-rw---- 1 root optical 11,0 Apr 21 15:02 /dev/sr0
# readlink /sys/dev/block/11\:0/device/driver
../../../../../../../../../../../../bus/scsi/driver/sr
I'd appreciate any help.
If your custom linux has udev, try udevadm monitor.
When you eject or insert a cd, you should see a change event on the terminal with the device path.
Also it's normally standard for a cdrom drive, no matter the actual device path, to be forwarded to /media/cdrom
Related
I am trying to use an "Arduboy," based on the Arduino Leonardo, with the Arduino IDE. I cannot upload the example code, however, because of the following error:
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Before you mark this as a duplicate, here are all of the things I have tried
Adding myself to the dialout group that /dev/ttyACM0 can be modified by
Running chmod a+rw /dev/ttyACM0 every time I plug in the board
Making this udev rule: KERNEL=="ttyACM0", MODE="0666"
None of these things worked. What did work was running it with xdg-su like so: xdg-su -c ./arduino. However, I think it's not the best idea to run the thing as root every time. Is there anything I can do?
I am running openSUSE Tumbleweed.
The Arduino Leonardo based boards interrupt the communication with ttyACM* for a short moment (like logging in and out) during an upload. For some reason, the permissions change during this process. See the output of a repeated ls -l --full-time /dev/ttyACM0 during a failed upload:
crw-rw-rw- 1 root dialout 166, 0 2019-08-11 17:28:31.974025089 +0200 /dev/ttyACM0
ls: cannot access '/dev/ttyACM0': No such file or directory
crw------- 1 root root 166, 0 2019-08-11 17:42:15.523439213 +0200 /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 2019-08-11 17:42:16.083442857 +0200 /dev/ttyACM0
I also use Tumbleweed. The only workaround that I currently know is to start the Arduino IDE as root.
Go to your arduino's program directory. Open terminal in the directory. Then type ./arduino-linux-setup.sh $USER. After that reboot. You are able to upload code onto your arduino.
I have a camera device that has an input device listed under /dev/input. I would like to add that input device to the group plugdev.
When I plug in the camera:
[ 704.406837] input: See3CAM_CU51 as /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/input/input21
[ 705.157657] hid-generic 0003:2560:C152.0007: hiddev0,hidraw4: USB HID v1.11 Device [e-con Systems See3CAM_CU51] on usb-0000:00:1
It's now symlinked under /dev/input/by-id
0 lrwxrwxrwx 1 root root 10 Aug 31 10:50 usb-e-con_Systems_See3CAM_CU51_172A0202-event-if00 -> ../event20
However, event20 has the following permissions:
0 crw-rw---- 1 root input 13, 84 Aug 31 10:50 event20
I've written udev rules for the hiddevice itself with success, but for some reason, I can't get the rule right for the input device. Here's what I've tried:
KERNEL=="input", ATTR{name}=="See3CAM_CU51", MODE="0666" GROUP="plugdev"
But it does not appear to work. There's not a huge deal of examples of changing the ownership of input devices out there (that I've found at least).
Update:
When I change my udev rule to
KERNEL=="input", MODE="0666" GROUP="plugdev"
that is, I leave out the device name, all my input devices in /dev/input have the correct permissions.
So basically, I'm saying "every input device gets set to mode 0666, and belong to the plugdev group", which works. But adding the ATTR{name}== breaks it.
Here's the output of udevadm info:
udevadm info -a -p /devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/input/input21
looking at device '/devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/input/input21':
KERNEL=="input21"
SUBSYSTEM=="input"
DRIVER==""
ATTR{name}=="See3CAM_CU51"
ATTR{phys}=="usb-0000:00:14.0-2/button"
ATTR{properties}=="0"
ATTR{uniq}==""
It should be working, I have the correct name set for the device, what stupid mistake am I making?
udev rules support string matching, you're probably looking for:
ACTION=="...", KERNEL=="input[0-9]*", SUBSYSTEM=="input", ...
to match on the specific action for any inputN devices, then you can add your ATTR filter(s) to select the specific device.
I am new to Linux and I am trying to set the readahead value as told by this article: https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec616116.html
When I try the command:
blockdev --setra 2048 /dev/sdb
Nothing happens. I've also tried with sudo. When I run blockreport I always get this report:
So I also tried blockdev --setra 2048 /dev/sr0 since that seems to be the device name, but then I get the error "device sr0 not found".
Do you know what I am doing wrong when trying to set the readahead value?
A restart of the system was required to take effect.
/dev/sr0 is a device on the scsi controller. /dev/cdrom is a symlink to either /dev/sr0 or /dev/hdc or whichever block device is appropriate.
I think you are trying to change RA for which the actual medium is not present.
I want to mount the USB drive on the Linux OS(HELiOS) via command line, there is a ISO image present in the USB. I want to see the directories present in the ISO image. Label/Name given to the USB is "LIVE".
Can somebody help with commands to mount and see the contents of the ISO image file.
Thanks in Advance
Following command will mount USB device at /dev/sda1 on /mnt which has fat32 file system.
mount -t vfat /dev/sdc1 /mnt
If you dont know the device name of the disk run this command just after attaching it to USB port.
dmesg | tail | egrep '[hs]d[a-z]: [hs]d[a-z][0-9]+'
This will show you the device name. Like it shows [589.289070] sdc: sdc1 in my pc. Then device name would be /dev/sdc1. /mnt directory is already there all the time.
Following command will mount the iso.
mkdir ~/iso
mount /mnt/isofile.iso ~/iso -o loop
See the contents in the iso.
ls ~/iso
How to get the details of RAID configuration in Linux ?
mdadm -D /dev/mdxx will give you detail of raid configuration.
cat /proc/mdstat will give detail about raid algorithm,level and chunk size etc .
This is real if this RAID is sofware....
In case of RAID hardware, you could type this command :
lspci -vv | grep -i raid
01:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 01)
Kernel driver in use: megaraid_sas
Kernel modules: megaraid_sas
If you're talking about a running array:
cat /proc/mdstat
If you're talking about the mdadm config file, it's usually in /etc or /etc/mdadm depending on the distribution you're running on. The following command should find it in any event:
find /etc -name '*mdadm*'
ETA: Also, I would strongly recommend that you carefully study the mdadm man page so that you are very familiar with that utility. Knowing that utility well will save your bacon at some point.
mdadm --detail /dev/md0
(or whatever /dev/mdXXX you are using)