How to recover a pendrive after the OpenSUSE instalation

I used a pendrive to install openSUSE. Everything worked fine, but now the pendrive can not be used for anything other than installing OpenSUSE.

The pendrive is not even accessible, I do not see it in the dolphin and even when I type ls -l /dev in a console.
How do I do to be able to use the pendrive again for a new recording?

Tanks in advance

It should be available as /dev/sd. , else there is something wrong.

Check dmesg when you connect it.

I already have 4 pendrives in this situation.
They are good devices, which were working normally but just use to install OpenSUSE (or any other) and no longer works on any computer.
But they continue to serve to install the OS that is written on it

See the result on the /dev

vendas:/home/sergio # ll /dev | grep sd
lrwxrwxrwx  1 root   root           4 Abr 16 14:30 resume -> sda6
lrwxrwxrwx  1 root   root           4 Abr 17 12:00 root -> sda1
brw-rw----  1 root   disk      8,   0 Abr 17 12:00 sda
brw-rw----  1 root   disk      8,   1 Abr 17 12:00 sda1
brw-rw----  1 root   disk      8,   2 Abr 17 12:00 sda2
brw-rw----  1 root   disk      8,   3 Abr 17 12:00 sda3
brw-rw----  1 root   disk      8,   4 Abr 17 12:00 sda4
brw-rw----  1 root   disk      8,   5 Abr 17 12:00 sda5
brw-rw----  1 root   disk      8,   6 Abr 17 12:00 sda6
brw-rw----  1 root   disk      8,  16 Abr 16 14:30 sdb
brw-rw----  1 root   disk      8,  32 Abr 16 14:30 sdc
brw-rw----  1 root   disk      8,  48 Abr 16 14:30 sdd
brw-rw----  1 root   disk      8,  64 Abr 16 14:30 sde

That is not what I suggested. And it does not say much. I assume (but it is just a guess, because you did not explain anything) that sda is your system disk. But I have no idea what sdb, sdc, sdd abd sde are. Is not one of them the pendrive you are talking about? Or are they the four holes of a multiple card reader?

On Mon 17 Apr 2017 03:46:01 PM CDT, sergelli wrote:

I used a pendrive to install openSUSE. Everything worked fine, but now
the pendrive can not be used for anything other than installing
OpenSUSE.

The pendrive is not even accessible, I do not see it in the dolphin and
even when I type ls -l /dev in a console.
How do I do to be able to use the pendrive again for a new recording?

Tanks in advance

Hi
As root user use the wipefs -a command on each partition and the root
device, MAKE sure it’s the RIGHT device!!!

For example, the usb device is sdb;


lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1  7.6G  0 disk
├─sdb1   8:17   1  3.7M  0 part
└─sdb2   8:18   1  4.1G  0 part

grover:~ # wipefs -a /dev/sdb2
/dev/sdb2: 5 bytes were erased at offset 0x00008001 (iso9660): 43 44 30 30 31

grover:~ # wipefs -a /dev/sdb1
/dev/sdb1: 8 bytes were erased at offset 0x00000036 (vfat): 46 41 54 31 32 20 20 20
/dev/sdb1: 1 byte was erased at offset 0x00000000 (vfat): eb
/dev/sdb1: 2 bytes were erased at offset 0x000001fe (vfat): 55 aa

grover:~ # wipefs -a /dev/sdb
/dev/sdb: 5 bytes were erased at offset 0x00008001 (iso9660): 43 44 30 30 31
/dev/sdb: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdb: calling ioctl to re-read partition table: Success

grover:~ # lsblk /dev/sdb
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb    8:16   1  7.6G  0 disk


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.22.2|4.4.57-18.3-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Sorry, I changed the dmesg command for ls -l
Here is the requested command and yes, sda is my hard drive


vendas:/home/sergio # dmesg | grep sd
    2.988512] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
    2.988619] sd 0:0:0:0: [sda] Write Protect is off
    2.988624] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    2.988667] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    3.028371]  sda: sda1 sda2 < sda5 sda6 > sda3 sda4
    3.029275] sd 0:0:0:0: [sda] Attached SCSI disk
    3.622134] sd 0:0:0:0: Attached scsi generic sg0 type 0
    5.015697] sd 5:0:0:0: Attached scsi generic sg2 type 0
    5.024696] sd 5:0:0:1: Attached scsi generic sg3 type 0
    5.034515] sd 5:0:0:2: Attached scsi generic sg4 type 0
    5.036081] sd 5:0:0:1: [sdc] Attached SCSI removable disk
    5.044306] sd 5:0:0:3: Attached scsi generic sg5 type 0
    5.057956] sd 5:0:0:0: [sdb] Attached SCSI removable disk
    5.076708] sd 5:0:0:2: [sdd] Attached SCSI removable disk
    5.086592] sd 5:0:0:3: [sde] Attached SCSI removable disk
    5.109961] sd 4:0:0:0: Attached scsi generic sg6 type 0
    5.110464] sd 4:0:0:0: [sdf] 15644912 512-byte logical blocks: (8.01 GB/7.45 GiB)
    5.111083] sd 4:0:0:0: [sdf] Write Protect is off
    5.111089] sd 4:0:0:0: [sdf] Mode Sense: 0b 00 00 08
    5.111714] sd 4:0:0:0: [sdf] No Caching mode page found
    5.111779] sd 4:0:0:0: [sdf] Assuming drive cache: write through
    5.115849]  sdf: sdf1 sdf2
    5.118581] sd 4:0:0:0: [sdf] Attached SCSI removable disk
    8.223395] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
   13.819275] EXT4-fs (sda1): re-mounted. Opts: acl,user_xattr
   16.739841] EXT4-fs (sda3): recovery complete
   16.739854] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
   16.751905] Adding 7229212k swap on /dev/sda6.  Priority:-1 extents:1 across:7229212k FS
   34.634251] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)

Above, the dmesg command was run with a pendrive with the problem in question.
See bellow the result when using a pendrive that work well


vendas:/home/sergio # dmesg | grep sd
    2.988512] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
    2.988619] sd 0:0:0:0: [sda] Write Protect is off
    2.988624] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    2.988667] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    3.028371]  sda: sda1 sda2 < sda5 sda6 > sda3 sda4
    3.029275] sd 0:0:0:0: [sda] Attached SCSI disk
    3.622134] sd 0:0:0:0: Attached scsi generic sg0 type 0
    5.015697] sd 5:0:0:0: Attached scsi generic sg2 type 0
    5.024696] sd 5:0:0:1: Attached scsi generic sg3 type 0
    5.034515] sd 5:0:0:2: Attached scsi generic sg4 type 0
    5.036081] sd 5:0:0:1: [sdc] Attached SCSI removable disk
    5.044306] sd 5:0:0:3: Attached scsi generic sg5 type 0
    5.057956] sd 5:0:0:0: [sdb] Attached SCSI removable disk
    5.076708] sd 5:0:0:2: [sdd] Attached SCSI removable disk
    5.086592] sd 5:0:0:3: [sde] Attached SCSI removable disk
    5.109961] sd 4:0:0:0: Attached scsi generic sg6 type 0
    5.110464] sd 4:0:0:0: [sdf] 15644912 512-byte logical blocks: (8.01 GB/7.45 GiB)
    5.111083] sd 4:0:0:0: [sdf] Write Protect is off
    5.111089] sd 4:0:0:0: [sdf] Mode Sense: 0b 00 00 08
    5.111714] sd 4:0:0:0: [sdf] No Caching mode page found
    5.111779] sd 4:0:0:0: [sdf] Assuming drive cache: write through
    5.115849]  sdf: sdf1 sdf2
    5.118581] sd 4:0:0:0: [sdf] Attached SCSI removable disk
    8.223395] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
   13.819275] EXT4-fs (sda1): re-mounted. Opts: acl,user_xattr
   16.739841] EXT4-fs (sda3): recovery complete
   16.739854] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
   16.751905] Adding 7229212k swap on /dev/sda6.  Priority:-1 extents:1 across:7229212k FS
   34.634251] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
 1872.024569] sd 8:0:0:0: Attached scsi generic sg6 type 0
 1872.323379] sd 8:0:0:0: [sdf] 977920 512-byte logical blocks: (500 MB/477 MiB)
 1872.324873] sd 8:0:0:0: [sdf] Write Protect is off
 1872.324880] sd 8:0:0:0: [sdf] Mode Sense: 03 00 00 00
 1872.326126] sd 8:0:0:0: [sdf] No Caching mode page found
 1872.326133] sd 8:0:0:0: [sdf] Assuming drive cache: write through
 1872.332770]  sdf: sdf1
 1872.337512] sd 8:0:0:0: [sdf] Attached SCSI removable disk
 1880.738038] FAT-fs (sdf1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Please read everything and answer everything

But I have no idea what sdb, sdc, sdd abd sde are. Is not one of them the pendrive you are talking about? Or are they the four holes of a multiple card reader?

And originally:

Check dmesg when you connect it.

Thus not a grep of the whole dmesg, but only of the lines generated when connecting (that is putting the USB connector of the drive in the USB hole of the system.
That is either show the last 20-30 lines immedialtly after connecting, or do

dmesg -w

then connect and then Ctrl-C to stop dmesg.

And we are only trying to find out if connecting creates a /dev/sd. entry or not. You say “not”, but do not add any prove of it

and even when I type ls -l /dev in a console

is no prove, but only your conclusion.

BTW, if the sd. is created, you can use malcolmlewis’ advice. But as long a there is no sd. for the pendrive, you can not execute anything on it.

I’m assuming you want to know what lines are created when I put my penDrive into a USB port and the dmesg -w command is operating on a console,

Below are the created lines.



 1534.462031] usb 1-5: new high-speed USB device number 6 using ehci-pci
 1534.582493] usb 1-5: New USB device found, idVendor=0951, idProduct=1665
 1534.582501] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 1534.582507] usb 1-5: Product: DataTraveler 2.0
 1534.582511] usb 1-5: Manufacturer: Kingston
 1534.582515] usb 1-5: SerialNumber: 001BFC3653D9BF6129527333
 1534.583087] usb-storage 1-5:1.0: USB Mass Storage device detected
 1534.583306] scsi9 : usb-storage 1-5:1.0
 1535.606873] scsi 9:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
 1535.608431] sd 9:0:0:0: Attached scsi generic sg6 type 0
 1537.047928] sd 9:0:0:0: [sdf] 15364416 512-byte logical blocks: (7.86 GB/7.32 GiB)
 1537.049296] sd 9:0:0:0: [sdf] Write Protect is off
 1537.049305] sd 9:0:0:0: [sdf] Mode Sense: 23 00 00 00
 1537.049913] sd 9:0:0:0: [sdf] No Caching mode page found
 1537.049920] sd 9:0:0:0: [sdf] Assuming drive cache: write through                                                                                         
 1537.077289]  sdf: sdf1 sdf2
 1537.081054] sd 9:0:0:0: [sdf] Attached SCSI removable disk

I do not understand why this is so complicated to solve, because this problem must be happening with all people who are using a penDrive to install an operating system and a procedure like 1,2 and 3 would be enough to solve the problem. Unfortunately, I do not know what these procedures are.

It is not complicated to solve in the normal case (as you say many people use USB mass-storagr for installing and many pepare them for other use again after that). But you reported:

I do not see it … even when I type ls -l /dev in a console

I do not know why you said so, but oit is clear you did.
And I now think this is probably a wrong conclusion of your’s, because the dmesg lines you post clearly say it is now /dev/sdf.

so do

wipefs -a /dev/sdf

After that partition it with your favorite partitioner.

And again, I have to ask, where is the answer to my question

But I have no idea what sdb, sdc, sdd abd sde are. Is not one of them the pendrive you are talking about? Or are they the four holes of a multiple card reader?

But we having now the correct dmesg info, I am no more interested in it.

You skipping half or even more of the questions asked is the main reason that this takes so long I am afraid.

Sorry, this is my bad habit. But, I am very grateful for your help that solved my problems with penDrive.