I inserted a new pendrive. The following is the dmesg output:

[127321.248105] usb 2-2: new high speed USB device using ehci_hcd and address 9    
[127321.380898] scsi11 : usb-storage 2-2:1.0    
[127322.381159] scsi 11:0:0:0: Direct-Access     XXXXXXXX U1170CONTROLLER  0.00 PQ: 0 ANSI: 2    
[127322.384481] sd 11:0:0:0: Attached scsi generic sg2 type 0    
[127322.387127] sd 11:0:0:0: [sdb] Attached SCSI removable disk        

But after executing the fdisk -l there is no device showing /dev/sdb

Following is the output of fdisk command:

   Device Boot      Start         End      Blocks   Id  System    

   /dev/sda1   *           1       19103   153443296    7  HPFS/NTFS    
   /dev/sda2           19103       34764   125794300    7  HPFS/NTFS    
   /dev/sda3           34764       38914    33333249    5  Extended    
   /dev/sda5           34764       34776       97280   83  Linux    
   /dev/sda6           34776       35025     1998848   82  Linux swap / Solaris    
   /dev/sda7           35025       38914    31235072   83  Linux    `

Can somebody please tell me how to debug this problem ?

Edit: There is one sdb created in the /dev directory after inserting the usb drive.

On executing the the following command I am getting the output as:

root@pradeep-laptop:~# mount /dev/sdb /mnt
mount: /dev/sdb: unknown device

Here is the output of lsusb command :

Bus 005 Device 002: ID 1c4f:0002 SiGma Micro 
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0a5c:2101 Broadcom Corp. Bluetooth Controller
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 007: ID 048d:1170 Integrated Technology Express, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The Line Bus 001 Device 007: ID 048d:1170 Integrated Technology Express, Inc. was added after inserting the pen drive.

Here is the error which I received while creating partition table using gparted

  • 1
    You can usually find your attached drives (assuming they have a label) under /dev/disk/by-label/ or otherwise /dev/disk/by-uuid which is more reliable. To see what UUID corresponds to your drive use the blkid command. Do you find it? What's output of lsblk? – user13742 Mar 15 '12 at 14:46
  • Is /dev/sdb created automatically? Maybe the usb pen drive is not formatted yet. BTW, generally it could be helpful to add small information about the Linux distribution and the kernel you use. – jofel Mar 15 '12 at 14:53
  • My Linux Kernel is: 2.6.35-22-generic and I am using Ubuntu 10.10 – pradeepchhetri Mar 15 '12 at 15:00
  • @jofel: Yes the /dev/sdb is created. I think the usb pen drive is not formatted yet. Can you tell me how to format it in Linux – pradeepchhetri Mar 15 '12 at 15:07
  • 1
    Then you have to consider the possibility that either you got a nonstandard pendrive or that the pendrive is somehow damaged/broken. Formatting it, with or without partition table, should be just a breeze, at least under GNU/Linux, provided proper drivers have been compiled either in the kernel or as modules (the disk is recognized as a "SCSI removable disk" -- I'm not an expert, but I think either that's enough or close to enough). There should be no "no medium found" errors. If it starts getting harder, before pushing too hard check if the problem is somewhere else. – njsg Mar 16 '12 at 16:10

You have to make at least one file system on the pendrive (and a partition table, certainly). The first file system you make should be the /dev/sdb1 which is then mountable. For example:

root# mkfs.xfs /dev/sdb1 && mount /dev/sdb1 /mnt -t auto

will run.

Of course, you could add more than one file system to the pendrive, their name will be /dev/sdb{1,2..n}, respectively. Editing storage devices with gparted would make the process easier by visibility.

  • 2
    Actually, it's pretty common (and annoying) to see pendrives which do not have a partition table, and where /dev/sdb would be the filesystem itself. – njsg Mar 15 '12 at 19:17
  • 1
    I doubt that mkfs.xfs /dev/sdb creates any partition table which results in getting /dev/sdb1. Either have no partition table and mount then /dev/sdb or create a partition table using e.g. fdisk or gpartet and then run the mkfs on /dev/sdb1 not on /dev/sdb otherwise you would overwrite the partition table. As usb pen drives are normally used to share data between computers, widely supported filesystems like FAT32 (mkfs.vfat -F32 /dev/sdb1) can be helpful. – jofel Mar 15 '12 at 19:38
  • @jofel: I tried to create partition table by both fdisk and gparted but I am getting the error Unable to open /dev/sdb. Can you please tell me what I can try ? – pradeepchhetri Mar 16 '12 at 3:19
  • @pradeepchhetri you need to be root to accessing /dev/sdb. Use sudo. – jofel Mar 16 '12 at 7:59
  • @jofel No, I am doing from root only. – pradeepchhetri Mar 16 '12 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.