Other Gpart does not show USB devices

Is it possible to mount USB devices which don't show via gpart?

I currently have two USB devices attached to my ThinkPad T420 which don't show up when running gpart show. FreeBSD recognises them using camcontrol devlist
Code:
<Hitachi HTS543232A7A384 ES2OA70K>  at scbus0 target 0 lun 0 (ada0,pass0)
<Hitachi HTS542580K9SA00 BBBOC31P>  at scbus1 target 0 lun 0 (ada1,pass1)
<SAMSUNG SSD PM830 mSATA 128GB CXM13D1Q>  at scbus2 target 0 lun 0 (ada2,pass2)
<AHCI SGPIO Enclosure 1.00 0001>   at scbus5 target 0 lun 0 (ses0,pass3)
<Innostor Innostor 1.00>           at scbus8 target 0 lun 0 (pass4,da0)
<Generic STORAGE DEVICE 0817>      at scbus9 target 0 lun 0 (pass5,da1

Both devices are accessible under Windows, but I can't figure out how to access them under FreeBSD (11.0-RELEASE-p8 i386).
 
One thing on FreeBSD which threw me for a loop was gpart index numbers.
So you slice your partition and end up with several slices like such: da0s1a , da0s1b , da0s1c ...etc..
But in gpart show you see no letters. Only da0s1. But if you look you will see the index numbers that are actually the different slices.
So da0s1a in gpart is da0s1 with index 1 and da0s1b is da0s1 index 2 and so on. a=1 b=2 c=3 and so on.

The gpart annotation is -i for the index number. Like this:
gpart resize -i [I]2[/I] -a 4k -s [I]47G[/I] [I]ada0[/I]
 
Is it possible to mount USB devices which don't show via gpart?
If they don't show there's no partition table. If there's no partition table there's no partition. If there's no partition there's probably no filesytem either[*], you cannot mount something that doesn't have a filesystem.

[*] You can create a filesytem on a disk without a partition table but this doesn't happen often and I highly recommend never creating such a disk.
 
If they don't show there's no partition table. If there's no partition table there's no partition. If there's no partition there's probably no filesytem either[*], you cannot mount something that doesn't have a filesystem.

[*] You can create a filesytem on a disk without a partition table but this doesn't happen often and I highly recommend never creating such a disk.

There are filesystems on both these devices as I can clearly see under Windows... Maybe there is no partition table, but there is a filesystem.
One of these USB sticks is 128GB and I'm trying to copy it to a smaller sticks as it only uses a fraction of the available space.

When inserted I see this msg on the system console:-
Code:
ugen1.3: <Innostor> at usbus1
umass0: <Innostor PenDrive, class 0/0, rev 2.10/0.01, addr 3> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:8:0: Attached to scbus8
da0 at umass-sim0 bus 0 scbus8 target 0 lun 0
da0: <Innostor Innostor 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 000000000000000668
da0: 40.000MB/s transfers
da0: 121896MB (249644974 512 byte sectors)
da0: quirks=0x12<NO_6_BYTE,NO_RC16>

but under gpart show da0 does not show up.

The USB stick contains the image of a Windows 7 installation CD and I can boot and install Windows from it. I even have a dd image of the stick.
 
OK how about ls /dev
It should show da0 and da1 from your prior posts.

It's right here in your post:


So dd if=/dev/zero of=/dev/da0 bs=1M
Then partition, slice, label and format as per Warrens site. You may not need bootcode or to make disk active.

ls /dev does show /dev/da0, but won't the above command delete the data on the USB stick? That isn't something I want to do... I just want to copy the files to a smaller disk
 
ls /dev does show /dev/da0, but won't the above command delete the data on the USB stick? That isn't something I want to do... I just want to copy the files to a smaller disk
Indeed, I'd highly recommend against any of the above advice because it is potentially destructive.

What does # file -s /dev/da0 tell you? Also: does gpart show show anything interesting at all (other than your own HD's)?

What I'm specifically getting at: is it possible that it shows a harddisk with its GUID instead of the regular notation such as da0?
 
Indeed, I'd highly recommend against any of the above advice because it is potentially destructive.

What does # file -s /dev/da0 tell you? Also: does gpart show show anything interesting at all (other than your own HD's)?

What I'm specifically getting at: is it possible that it shows a harddisk with its GUID instead of the regular notation such as da0?
Code:
root@Test:~ # file -s /dev/da0
/dev/da0: DOS/MBR boot sector; partition 1 : ID=0x7, active 0x81, start-CHS (0x0,32,33), end-CHS (0x3ff,254,63), startsector 2048, 249642926 sectors
Code:
root@Test:~ # gpart show da0
gpart: No such geom: da0.
 
0x81 disk type is msdosfs. I assumed on recent Windows they would be NTFS. So ignore fusefs-ntfs. msdosfs is natively supported.
 
After further review I note that 0x81 is not an msdosfs but was a DRDOS dos partition type. So that may be what's up.
A non standard dos partition type.
 
Code:
root@Test:~ # gpart show da0
gpart: No such geom: da0.
No, try: gpart show, without mentioning anything else.

It will give you an overview of all available disks (and their partitions if applicable), sometimes including a GUID. I'm wondering if that will show you anything else other than your own HD's.
 
No, gpart show does not acknowledge the existance of da0 (in this case), only partitions of the internal hard disks. It does show the partitions of other USB devices though when attached. I think the problem is related to a filesystem occupying the whole device, ie where da0 rather than da0s1 is a filesystem, if that is possible...
 
What happens if you try to mount da0 directly?

mount -t msdosfs /dev/da0 /mnt

A device that isn't partitioned, but is formatted with a filesystem is known as "dangerously dedicated mode". It used to be a valid setup/option for harddrives that would only be used for FreeBSD (where there would be no slices on the disk, just partitions for filesystems like ad4a ad4b ad4d ad4e).

This is actually quite common with USB sticks formatted on Windows. From the sounds of it, the disk is not partition, just formatted directly with a FAT filesystem.
 
I would copy the files off in Windows then format stick with FAT32 in Windows then copy files back.

Then you could use it with FreeBSD with the above mount command.

You will lose all special file attributes that come with NTFS and FAT32 is limited to 2GB Max file size.
 
I would copy the files off in Windows then format stick with FAT32 in Windows then copy files back.

Then you could use it with FreeBSD with the above mount command.

You will lose all special file attributes that come with NTFS and FAT32 is limited to 2GB Max file size.

The USB stick is 128GB and can't be formatted as FAT32 since that has a 64GB limit if I remember correctly. But that isn't really relevant. Having just looked at the stick, it has a WinXP installation and only takes up less than 1GB so there is 127GB!! free. I think I created the drive from an ISO image using UNETBOOTIN or somesuch which makes the drive bootable, so presumably once I've managed to copy all the files I still need to copy the boot block... I have a dd image of the drive so I guess I could copy the first x bytes to a new drive to make it bootable or maybe I could make an ISO image of the drive and than mount that in FreeBSD. Presumably if Unetbootin can create a bootable drive from an ISO then the reverse should be possible...I see that the source for Unetbootin is available here. Wonder if it compiles...


What I can't understand is why can't FreeBSD access the files on the USB stick whereas Windows can
 
What happens if you try to mount da0 directly?

mount -t msdosfs /dev/da0 /mnt

A device that isn't partitioned, but is formatted with a filesystem is known as "dangerously dedicated mode". It used to be a valid setup/option for harddrives that would only be used for FreeBSD (where there would be no slices on the disk, just partitions for filesystems like ad4a ad4b ad4d ad4e).

This is actually quite common with USB sticks formatted on Windows. From the sounds of it, the disk is not partition, just formatted directly with a FAT filesystem.

It's actually formatted NTFS... but I tried your suggestion:-
Code:
root@Test:~# ntfs-3g /dev/da0 /mnt
NTFS signature is missing.
Failed to mount '/dev/da0': Invalid argument
The device '/dev/da0' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
 
Haven't we been over this before? See Thread 60197.

Oops - guess I need to run Memtest on myself :).... It looks as though I never got to the bottom of things before I went on vacation. Thanks for finding my original thread. I'll do a follow-up there and see if I can make any progress.
 
Back
Top