SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Whenever USB inserted to Redhat machine , then /proc/bus/usb/devices file is creating and whenever we umount USB from machine , /proc/bus/usb/devices file is automatically deleted.
But in case os SuSE Linux, unable to get /proc/bus/usb/devices file by default. Is this file available at any other place or Is there any other way to get this file by default?
I run following command to get this file in SuSE and I got this.
Code:
mount -t usbfs usbfs /proc/bus/usb
But whenever I umount the USB , this file is not removing automatically.
How to get '/proc/bus/ussb/devices' file (in case of usb inserion) and how to delete automatically this file (in case of usb umount)?
That afaict, is a Red Hat specific thing. IIRC they have some automount daemon running which you might investigate. It seems like you want suse to be red hat, and it isn't. FWIW, Slackware isn't either. The disk entry is added to /proc/mounts and /etc/fstab and if you are scripting then maybe you can pick up something there.
I got some information about USB from "/proc/scsi/usb-storage/3". Is this reliable (Is this available (with same name also ) in all SuSE LES machines)?
That stuff is deprecated, and I didn't bother with it so I don't see /proc/scsi. The same would be true of any others who chose not to select that kernel option while compiling their own kernels. It does tell you the information is in /sys where I first sent you.
With suse,it's probably udev you need to be looking at.
I presume plug/unplug is recorded in dmesg |tail. kernel knows about it - it's strange that nobody writes it down.
Isn't a device node created when you plug in
Code:
ash-4.2$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 /dev/sda6 /dev/sdb /dev/sdb1
[Plugged in my usb drive here. No mount just plugin]
bash-4.2$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 /dev/sda6 /dev/sdb /dev/sdb1 /dev/sdc /dev/sdc1
[Plugged it back out. sdc disappears]
bash-4.2$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 /dev/sda6 /dev/sdb /dev/sdb1
I presume SuSE is set up for usb storage. I think the ones to use are sdb(My card reader) and sdc and not individual partitions. It will make for more inventive coding, because you have to think about nfs mounts, samba mounts, and so forth. When you look at the dmesg o/p
Code:
bash-4.2$ sudo dmesg |tail
[56693.842891] sd 11:0:0:0: [sdc] Mode Sense: 43 00 00 00
[56693.843426] sd 11:0:0:0: [sdc] No Caching mode page present
[56693.843433] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[56693.846651] sd 11:0:0:0: [sdc] No Caching mode page present
[56693.846659] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[56693.847449] sdc: sdc1
[56693.848886] sd 11:0:0:0: [sdc] No Caching mode page present
[56693.848893] sd 11:0:0:0: [sdc] Assuming drive cache: write through
[56693.848898] sd 11:0:0:0: [sdc] Attached SCSI removable disk
[56720.878539] usb 1-2: USB disconnect, device number 9
The 'Mode Sense' is probably greppable, and the USB disconnect is happening somewhere.
I looked all over for How To Install and Run openSUSE on a USB Drive. I found the easy way using tools supplied by openSUSE.
First install the USB in a usb slot, open Disks find Mount on the Top of app and Mount the ThumbDrive. Then choose Format and Format the Drive in DOS vfat 32. Next open SuseStudio and Select where the file is stored. I made a separate Directory Named Tumbleweed and DownLoaded Tumbleweed to the new Directory as opposed to Downloads because I intended to keep it for any Emergencies. Open SuseStudio, then let SuseStudio copy to ThumbDrive. That is all there is to it. EASY!
PS: SuseStudio is Available in YAST Software lookup usb and it's one of those (Read the description).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.