Michael Lazin on 13 Aug 2009 13:14:34 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] stick drive that mounts as /dev/sda (or sdb....)


I always type fdisk -l with no arguments at the prompt to view all the attached devices and their device names.  For example,

80trcd1:/home/mlazin# fdisk -l

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           8       64228+  de  Dell Utility
/dev/sda2   *           9        5107    40957717+   7  HPFS/NTFS
/dev/sda3            5108        5350     1951897+  82  Linux swap / Solaris
/dev/sda4            5351        9726    35150220   83  Linux

Disk /dev/sdc: 4110 MB, 4110227968 bytes
127 heads, 62 sectors/track, 1019 cylinders
Units = cylinders of 7874 * 512 = 4031488 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1005     3956684+   b  W95 FAT32
/dev/sdc2   *        1006        1019       55118   83  Linux

As you can see I have a usb key attached with 2 partitions, 1 windows, one linux.  This can be useful for seeing what to mount. 

On Thu, Aug 13, 2009 at 2:02 PM, Edmond Rodriguez <erodrig_97@yahoo.com> wrote:

Some more comments on my question of mounting to /dev/sda:  T
The drive I was writing about is a Centon, and I went back to Google with other search terms. Though I cannot be sure right now if this is the exact same drive, look below at the mounting instructions.  Here they say /dev/sda.   I kind of wonder what is going on too, as this is the first time I ever see such a method of mounting a drive.

text below from http://centonspecials.com/html.php

How to mount the Centon DataStick III in RedHat Linux 9.0
   * Open a terminal window and log on as root.
   * Use the “System Tools >>> Hardware Browser>>>Hard Drives” function to check the mount point
   * Create directory for the DataStick III.
   * mkdir /mnt/usbflash
(You
may want to make sure the directory is accessible from your user
account - for more info, see the forum posting How to mount the
DataStick III under Linux)
   * Mount the DataStick III
“mount /dev/sda /mnt/usbflash” (assumes the mount point is sda - your mount point may differ)

>
>From: Edmond Rodriguez <erodrig_97@yahoo.com>
>To: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
>Sent: Thursday, August 13, 2009 1:28:04 PM
>Subject: Re: [PLUG] stick drive that mounts as /dev/sda (or sdb....)
>
>
>root@noname:~# fdisk -l /dev/sda
>
>Disk /dev/sda: 4043 MB, 4043309056 bytes
>125 heads, 62 sectors/track, 1018 cylinders
>Units = cylinders of 7750 * 512 = 3968000 bytes
>Disk identifier: 0x6f20736b
>
>This doesn't look like a partition table
>Probably you selected the wrong device.
>
>   Device Boot      Start         End      Blocks   Id  System
>/dev/sda1   ?      100405      247697   570754815+  72  Unknown
>Partition 1 has different physical/logical beginnings (non-Linux?):
>     phys=(357, 116, 40) logical=(100404, 79, 11)
>Partition 1
> has different physical/logical endings:
>     phys=(357, 32, 45) logical=(247696, 24, 51)
>Partition 1 does not end on cylinder boundary.
>/dev/sda2   ?       21767      271577   968014120   65  Novell Netware 386
>Partition 2 has different physical/logical beginnings (non-Linux?):
>     phys=(288, 115, 43) logical=(21766, 48, 47)
>Partition 2 has different physical/logical endings:
>     phys=(367, 114, 50) logical=(271576, 60, 42)
>Partition 2 does not end on cylinder boundary.
>/dev/sda3   ?      241276      491086   968014096   79  Unknown
>Partition 3 has different physical/logical beginnings (non-Linux?):
>     phys=(366, 32, 33) logical=(241275, 3, 30)
>Partition 3 has
> different physical/logical endings:
>     phys=(357, 32, 43) logical=(491085, 14, 39)
>Partition 3 does not end on cylinder boundary.
>/dev/sda4   ?      372346      372354       27749+   d  Unknown
>Partition 4 has different physical/logical beginnings (non-Linux?):
>     phys=(372, 97, 50) logical=(372345, 119, 25)
>Partition 4 has different physical/logical endings:
>     phys=(0, 10, 0) logical=(372353, 14, 33)
>Partition 4 does not end on cylinder boundary.
>
>Partition table entries are not in disk order
>
>
>
>>
>>From: Michael Lazin <microlaser@gmail.com>
>>To: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
>>Sent: Thursday, August 13, 2009 1:07:00 PM
>>Subject: Re: [PLUG] stick drive that mounts as /dev/sda (or sdb....)
>>
>>>>I don't think you can have a drive without a partition table.  Most thumb drives have 1 or 2 partitions on it by default.  There are a lot of them that come with a separate partition with some proprietary junk you probably don't want.  What does "fdisk -l" output?
>>
>>
>>On Thu, Aug 13, 2009 at 12:40 PM, Edmond Rodriguez <erodrig_97@yahoo.com> wrote:
>>
>>>>>Is there a reason why mounting a formatted usb stick drive with no partition table would be a bad practice?
>>>
>>>
>>>>>>During a meeting about two months ago, I mentioned I had a 4GB usb stick drive that I could only mount to /dev/sda (or b or c etc..).  I eventually learned I could mount it to /dev/sda (instead of sda1, or sda2 etc..)
>>>
>>>>>>The drive mounts fine and I tried putting some large files in it, which also worked fine.
>>>
>>>>>>A comment was made at the meeting that the stick drive had no partition table, which was true.  Though fdisk shows me a partition table, the data looks random, and a warning is printed that the device probably has no partition table.
>>>
>>>>>>Someone was also surprised I could successfully mount this drive to /dev/sda.  I have googled and seen a few sites discussing doing the same thing.
>>>
>>>>>>All seems well.  but is there a reason this is NOT a good practice (using the drive with no partition table)?
>>>
>>>>>>Here is some log information and a "df" command below:
>>>
>>>>>>Aug 13 12:23:28 localhost kernel: usb 1-1: Manufacturer: USBest Technology
>>>>>>Aug 13 12:23:28 localhost kernel: usb 1-1: SerialNumber: 080501118ed735
>>>>>>Aug 13 12:23:33 localhost kernel: scsi 7:0:0:0: Direct-Access     Ut165    USB2FlashStorage 0.00 PQ: 0 ANSI: 2
>>>>>>Aug 13 12:23:33 localhost kernel: sd 7:0:0:0: [sda] 7897088 512-byte hardware sectors (4043 MB)
>>>>>>Aug 13 12:23:33 localhost kernel: sd 7:0:0:0: [sda] Write Protect is off
>>>>>>Aug 13 12:23:33 localhost kernel: sd 7:0:0:0: [sda] 7897088 512-byte hardware sectors (4043 MB)
>>>>>>Aug 13 12:23:33 localhost kernel: sd 7:0:0:0: [sda] Write Protect is off
>>>>>>Aug 13 12:23:33 localhost kernel:  sda:
>>>>>>Aug 13 12:23:33 localhost kernel: sd 7:0:0:0: [sda] Attached SCSI removable disk
>>>>>>Aug 13 12:23:33 localhost kernel: sd 7:0:0:0: Attached scsi generic sg0 type 0
>>>
>>>
>>>>>>root@noname:/home/edmondrod# df -T /mnt/sda
>>>>>>Filesystem    Type   1K-blocks      Used Available Use% Mounted on
>>>>>>/dev/sda      vfat     3940828         4   3940824   1% /mnt/sda
>>>>>>___________________________________________________________________________
>>>>>>Philadelphia Linux Users Group         --        http://www.phillylinux.org
>>>>>>Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
>>>>>>General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
>>>
>>
>>
>>--
>>Michael Lazin
>>
>>ASCII ribbon campaign ( )
>>against HTML e-mail    X
>>                                 / \
>>
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug



--
Michael Lazin

ASCII ribbon campaign ( )
against HTML e-mail    X
                                 / \
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug