* [gentoo-user] Strange partition on USB stick
@ 2011-10-03 22:15 Mick
2011-10-04 3:39 ` Adam Carter
2011-10-07 22:09 ` Klaus Müller
0 siblings, 2 replies; 12+ messages in thread
From: Mick @ 2011-10-03 22:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 2051 bytes --]
I can't recall if I asked this before, but I am looking at a partition on a
USB stick which seems to have a FAT16 fs on it and in parted says:
==================================================
Model: Crucial Gizmo! overdrive (scsi)
Disk /dev/sdb: 1023MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 1023MB 1023MB fat16
==================================================
What does "Partition Table: loop" mean?
fdisk -l is more confusing:
==================================================
Disk /dev/sdb: 1022 MB, 1022623744 bytes
32 heads, 61 sectors/track, 1023 cylinders, total 1997312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x69737369
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/sdb1 ? 1869771365 2038460886 84344761 69 Unknown
/dev/sdb2 ? 1701519481 3571400945 934940732+ 73 Unknown
/dev/sdb3 ? 2573 2573 0 74 Unknown
/dev/sdb4 0 3435113471 1717556736 0 Empty
Partition table entries are not in disk order
==================================================
What are the partitions shown as sdb1-4?
Also Id 73 and 74 are I think reserved Ids? Id 69 is I think Novell Netware
5+ (according to:
http://www.win.tue.nl/~aeb/partitions/partition_types-1.html) not FAT16.
I am not sure I understand what it is showing me.
BTW, cfdisk spews it out right from the start:
==================================================
FATAL ERROR: Bad primary partition 1: Partition begins after end-of-disk
Press any key to exit cfdisk
==================================================
So, does it have a partition table? How can you explain the fdisk output?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-03 22:15 [gentoo-user] Strange partition on USB stick Mick
@ 2011-10-04 3:39 ` Adam Carter
2011-10-04 5:18 ` Mick
2011-10-07 22:09 ` Klaus Müller
1 sibling, 1 reply; 12+ messages in thread
From: Adam Carter @ 2011-10-04 3:39 UTC (permalink / raw
To: gentoo-user
If the data is important, I'd use ddrescue to create an image of the
drive, then run testdisk over that image to see if it can untangle the
partition table mess. Both are in portage.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 3:39 ` Adam Carter
@ 2011-10-04 5:18 ` Mick
2011-10-04 5:27 ` Paul Hartman
0 siblings, 1 reply; 12+ messages in thread
From: Mick @ 2011-10-04 5:18 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 754 bytes --]
On Tuesday 04 Oct 2011 04:39:45 Adam Carter wrote:
> If the data is important, I'd use ddrescue to create an image of the
> drive, then run testdisk over that image to see if it can untangle the
> partition table mess. Both are in portage.
Well, that's the thing: I'm not sure that there is a mess. At least not as
far as parted is concerned, which can read the partition table properly.
I suspect that fdisk (unlike parted) is not capable of reading the device
correctly.
I forgot to say that when mounted the USB stick shows not partitions (i.e.
there is no sdb1, sdb2, etc.) To access the fs I must do something like:
pmount /dev/sdb
and then all is lists under /media/sdb. It is like a big floppy.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 5:18 ` Mick
@ 2011-10-04 5:27 ` Paul Hartman
2011-10-04 6:53 ` Alan McKinnon
2011-10-04 6:58 ` Mick
0 siblings, 2 replies; 12+ messages in thread
From: Paul Hartman @ 2011-10-04 5:27 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 4, 2011 at 12:18 AM, Mick <michaelkintzios@gmail.com> wrote:
> On Tuesday 04 Oct 2011 04:39:45 Adam Carter wrote:
>> If the data is important, I'd use ddrescue to create an image of the
>> drive, then run testdisk over that image to see if it can untangle the
>> partition table mess. Both are in portage.
>
> Well, that's the thing: I'm not sure that there is a mess. At least not as
> far as parted is concerned, which can read the partition table properly.
>
> I suspect that fdisk (unlike parted) is not capable of reading the device
> correctly.
>
> I forgot to say that when mounted the USB stick shows not partitions (i.e.
> there is no sdb1, sdb2, etc.) To access the fs I must do something like:
>
> pmount /dev/sdb
>
> and then all is lists under /media/sdb. It is like a big floppy.
I think that's your answer. The "partition table" looks funny because
it isn't one. :) It is somewhat common. I've had some myself that are
like that.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 5:27 ` Paul Hartman
@ 2011-10-04 6:53 ` Alan McKinnon
2011-10-04 15:57 ` Mick
2011-10-04 6:58 ` Mick
1 sibling, 1 reply; 12+ messages in thread
From: Alan McKinnon @ 2011-10-04 6:53 UTC (permalink / raw
To: gentoo-user
On Tue, 4 Oct 2011 00:27:50 -0500
Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Tue, Oct 4, 2011 at 12:18 AM, Mick <michaelkintzios@gmail.com>
> wrote:
> > On Tuesday 04 Oct 2011 04:39:45 Adam Carter wrote:
> >> If the data is important, I'd use ddrescue to create an image of
> >> the drive, then run testdisk over that image to see if it can
> >> untangle the partition table mess. Both are in portage.
> >
> > Well, that's the thing: I'm not sure that there is a mess. At
> > least not as far as parted is concerned, which can read the
> > partition table properly.
> >
> > I suspect that fdisk (unlike parted) is not capable of reading the
> > device correctly.
> >
> > I forgot to say that when mounted the USB stick shows not
> > partitions (i.e. there is no sdb1, sdb2, etc.) To access the fs I
> > must do something like:
> >
> > pmount /dev/sdb
> >
> > and then all is lists under /media/sdb. It is like a big floppy.
>
> I think that's your answer. The "partition table" looks funny because
> it isn't one. :) It is somewhat common. I've had some myself that are
> like that.
>
I have a 4G Sandisk that does that too. It does everything a regular
USB stick does except a) create a proper partition table and b) be
booted from
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 6:53 ` Alan McKinnon
@ 2011-10-04 15:57 ` Mick
0 siblings, 0 replies; 12+ messages in thread
From: Mick @ 2011-10-04 15:57 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1616 bytes --]
On Tuesday 04 Oct 2011 07:53:47 Alan McKinnon wrote:
> On Tue, 4 Oct 2011 00:27:50 -0500
>
> Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> > On Tue, Oct 4, 2011 at 12:18 AM, Mick <michaelkintzios@gmail.com>
> >
> > wrote:
> > > On Tuesday 04 Oct 2011 04:39:45 Adam Carter wrote:
> > >> If the data is important, I'd use ddrescue to create an image of
> > >> the drive, then run testdisk over that image to see if it can
> > >> untangle the partition table mess. Both are in portage.
> > >
> > > Well, that's the thing: I'm not sure that there is a mess. At
> > > least not as far as parted is concerned, which can read the
> > > partition table properly.
> > >
> > > I suspect that fdisk (unlike parted) is not capable of reading the
> > > device correctly.
> > >
> > > I forgot to say that when mounted the USB stick shows not
> > > partitions (i.e. there is no sdb1, sdb2, etc.) To access the fs I
> > > must do something like:
> > >
> > > pmount /dev/sdb
> > >
> > > and then all is lists under /media/sdb. It is like a big floppy.
> >
> > I think that's your answer. The "partition table" looks funny because
> > it isn't one. :) It is somewhat common. I've had some myself that are
> > like that.
>
> I have a 4G Sandisk that does that too. It does everything a regular
> USB stick does except a) create a proper partition table and b) be
> booted from
I guess what I'm asking is:
If there isn't a partition table, then why fdisk sees /dev/sdb1-4 with
somewhat strange ID types? What is it that it interprets as 4 partitions?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 5:27 ` Paul Hartman
2011-10-04 6:53 ` Alan McKinnon
@ 2011-10-04 6:58 ` Mick
2011-10-04 16:18 ` Paul Hartman
1 sibling, 1 reply; 12+ messages in thread
From: Mick @ 2011-10-04 6:58 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1220 bytes --]
On Tuesday 04 Oct 2011 06:27:50 Paul Hartman wrote:
> On Tue, Oct 4, 2011 at 12:18 AM, Mick <michaelkintzios@gmail.com> wrote:
> > On Tuesday 04 Oct 2011 04:39:45 Adam Carter wrote:
> >> If the data is important, I'd use ddrescue to create an image of the
> >> drive, then run testdisk over that image to see if it can untangle the
> >> partition table mess. Both are in portage.
> >
> > Well, that's the thing: I'm not sure that there is a mess. At least not
> > as far as parted is concerned, which can read the partition table
> > properly.
> >
> > I suspect that fdisk (unlike parted) is not capable of reading the device
> > correctly.
> >
> > I forgot to say that when mounted the USB stick shows not partitions
> > (i.e. there is no sdb1, sdb2, etc.) To access the fs I must do
> > something like:
> >
> > pmount /dev/sdb
> >
> > and then all is lists under /media/sdb. It is like a big floppy.
>
> I think that's your answer. The "partition table" looks funny because
> it isn't one. :) It is somewhat common. I've had some myself that are
> like that.
If there isn't a partition table, then why fdisk sees /dev/sdb1-4 with
somewhat strange ID types?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 6:58 ` Mick
@ 2011-10-04 16:18 ` Paul Hartman
2011-10-04 18:39 ` Mick
0 siblings, 1 reply; 12+ messages in thread
From: Paul Hartman @ 2011-10-04 16:18 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 4, 2011 at 1:58 AM, Mick <michaelkintzios@gmail.com> wrote:
> On Tuesday 04 Oct 2011 06:27:50 Paul Hartman wrote:
>> On Tue, Oct 4, 2011 at 12:18 AM, Mick <michaelkintzios@gmail.com> wrote:
>> > On Tuesday 04 Oct 2011 04:39:45 Adam Carter wrote:
>> >> If the data is important, I'd use ddrescue to create an image of the
>> >> drive, then run testdisk over that image to see if it can untangle the
>> >> partition table mess. Both are in portage.
>> >
>> > Well, that's the thing: I'm not sure that there is a mess. At least not
>> > as far as parted is concerned, which can read the partition table
>> > properly.
>> >
>> > I suspect that fdisk (unlike parted) is not capable of reading the device
>> > correctly.
>> >
>> > I forgot to say that when mounted the USB stick shows not partitions
>> > (i.e. there is no sdb1, sdb2, etc.) To access the fs I must do
>> > something like:
>> >
>> > pmount /dev/sdb
>> >
>> > and then all is lists under /media/sdb. It is like a big floppy.
>>
>> I think that's your answer. The "partition table" looks funny because
>> it isn't one. :) It is somewhat common. I've had some myself that are
>> like that.
>
> If there isn't a partition table, then why fdisk sees /dev/sdb1-4 with
> somewhat strange ID types?
It's misinterpreting the data that happens to be there because it
makes the assumption that it's a partition table even though it's not.
You can create a real partition table on that device and reformat, if
you want. (Note that some flash-based devices suffer degraded
performance if you repartition or reformat them because they come with
specially-aligned FAT tables from the factory)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 16:18 ` Paul Hartman
@ 2011-10-04 18:39 ` Mick
2011-10-04 19:36 ` Paul Hartman
0 siblings, 1 reply; 12+ messages in thread
From: Mick @ 2011-10-04 18:39 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 2250 bytes --]
On Tuesday 04 Oct 2011 17:18:18 Paul Hartman wrote:
> On Tue, Oct 4, 2011 at 1:58 AM, Mick <michaelkintzios@gmail.com> wrote:
> > On Tuesday 04 Oct 2011 06:27:50 Paul Hartman wrote:
> >> On Tue, Oct 4, 2011 at 12:18 AM, Mick <michaelkintzios@gmail.com> wrote:
> >> > On Tuesday 04 Oct 2011 04:39:45 Adam Carter wrote:
> >> >> If the data is important, I'd use ddrescue to create an image of the
> >> >> drive, then run testdisk over that image to see if it can untangle
> >> >> the partition table mess. Both are in portage.
> >> >
> >> > Well, that's the thing: I'm not sure that there is a mess. At least
> >> > not as far as parted is concerned, which can read the partition table
> >> > properly.
> >> >
> >> > I suspect that fdisk (unlike parted) is not capable of reading the
> >> > device correctly.
> >> >
> >> > I forgot to say that when mounted the USB stick shows not partitions
> >> > (i.e. there is no sdb1, sdb2, etc.) To access the fs I must do
> >> > something like:
> >> >
> >> > pmount /dev/sdb
> >> >
> >> > and then all is lists under /media/sdb. It is like a big floppy.
> >>
> >> I think that's your answer. The "partition table" looks funny because
> >> it isn't one. :) It is somewhat common. I've had some myself that are
> >> like that.
> >
> > If there isn't a partition table, then why fdisk sees /dev/sdb1-4 with
> > somewhat strange ID types?
>
> It's misinterpreting the data that happens to be there because it
> makes the assumption that it's a partition table even though it's not.
>
> You can create a real partition table on that device and reformat, if
> you want. (Note that some flash-based devices suffer degraded
> performance if you repartition or reformat them because they come with
> specially-aligned FAT tables from the factory)
Interesting! I didn't know that.
I have repartitioned USB sticks in the past, but did not notice any change in
performance - to be honest I didn't measure it. I assume then that if I were
to re-partition for any reason I would need to stick to exactly the same start
& finish shown by parted.
Re-formatting it ought to be OK though, as long as the fat16 shown by parted
is correct.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 18:39 ` Mick
@ 2011-10-04 19:36 ` Paul Hartman
2011-10-04 21:35 ` Mick
0 siblings, 1 reply; 12+ messages in thread
From: Paul Hartman @ 2011-10-04 19:36 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 4, 2011 at 1:39 PM, Mick <michaelkintzios@gmail.com> wrote:
> On Tuesday 04 Oct 2011 17:18:18 Paul Hartman wrote:
>> You can create a real partition table on that device and reformat, if
>> you want. (Note that some flash-based devices suffer degraded
>> performance if you repartition or reformat them because they come with
>> specially-aligned FAT tables from the factory)
>
> Interesting! I didn't know that.
>
> I have repartitioned USB sticks in the past, but did not notice any change in
> performance - to be honest I didn't measure it. I assume then that if I were
> to re-partition for any reason I would need to stick to exactly the same start
> & finish shown by parted.
>
> Re-formatting it ought to be OK though, as long as the fat16 shown by parted
> is correct.
I think filesystems other than FAT are aligned well already, assuming
your partitions are aligned, but with FAT there are some hoops you
must jump through.
There is a tool called flashbench that can test your drive
(destructively!) and figure out the most optimal block sizes. Here's a
great article about it and optimizing USB flash drives in general:
https://lwn.net/Articles/428584/
And here is a forum thread about figuring out the FAT alignment:
http://www.patriotmemory.com/forums/showthread.php?3696
The SD council makes a tool for MS Windows that optimally formats and
securely erases SD cards. Might be interesting to compare the results
of its format to a standard fdisk and mkfs.vfat in linux.
One thing I'm going to do next time I get a new SD card or flash drive
is take a snapshot of the boot sector/partition tables/FAT tables so
if I ever want to reformat it to FAT, I can restore the -- presumably
optimal -- factory layout.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-04 19:36 ` Paul Hartman
@ 2011-10-04 21:35 ` Mick
0 siblings, 0 replies; 12+ messages in thread
From: Mick @ 2011-10-04 21:35 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 2006 bytes --]
On Tuesday 04 Oct 2011 20:36:06 Paul Hartman wrote:
> On Tue, Oct 4, 2011 at 1:39 PM, Mick <michaelkintzios@gmail.com> wrote:
> > On Tuesday 04 Oct 2011 17:18:18 Paul Hartman wrote:
> >> You can create a real partition table on that device and reformat, if
> >> you want. (Note that some flash-based devices suffer degraded
> >> performance if you repartition or reformat them because they come with
> >> specially-aligned FAT tables from the factory)
> >
> > Interesting! I didn't know that.
> >
> > I have repartitioned USB sticks in the past, but did not notice any
> > change in performance - to be honest I didn't measure it. I assume then
> > that if I were to re-partition for any reason I would need to stick to
> > exactly the same start & finish shown by parted.
> >
> > Re-formatting it ought to be OK though, as long as the fat16 shown by
> > parted is correct.
>
> I think filesystems other than FAT are aligned well already, assuming
> your partitions are aligned, but with FAT there are some hoops you
> must jump through.
>
> There is a tool called flashbench that can test your drive
> (destructively!) and figure out the most optimal block sizes. Here's a
> great article about it and optimizing USB flash drives in general:
> https://lwn.net/Articles/428584/
>
> And here is a forum thread about figuring out the FAT alignment:
> http://www.patriotmemory.com/forums/showthread.php?3696
>
> The SD council makes a tool for MS Windows that optimally formats and
> securely erases SD cards. Might be interesting to compare the results
> of its format to a standard fdisk and mkfs.vfat in linux.
>
> One thing I'm going to do next time I get a new SD card or flash drive
> is take a snapshot of the boot sector/partition tables/FAT tables so
> if I ever want to reformat it to FAT, I can restore the -- presumably
> optimal -- factory layout.
Excellent find! I've got some studying to do.
Thanks for sharing. :-)
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Strange partition on USB stick
2011-10-03 22:15 [gentoo-user] Strange partition on USB stick Mick
2011-10-04 3:39 ` Adam Carter
@ 2011-10-07 22:09 ` Klaus Müller
1 sibling, 0 replies; 12+ messages in thread
From: Klaus Müller @ 2011-10-07 22:09 UTC (permalink / raw
To: gentoo-user
Am 04.10.11 00:15, Mick wrote:
> I can't recall if I asked this before, but I am looking at a partition on a
> USB stick which seems to have a FAT16 fs on it and in parted says:
>
> ==================================================
> Model: Crucial Gizmo! overdrive (scsi)
> Disk /dev/sdb: 1023MB
> Sector size (logical/physical): 512B/512B
> Partition Table: loop
>
> Number Start End Size File system Flags
> 1 0.00B 1023MB 1023MB fat16
> ==================================================
>
> What does "Partition Table: loop" mean?
>
http://www.mail-archive.com/parted-devel@lists.alioth.debian.org/msg02423.html
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-10-07 22:10 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 22:15 [gentoo-user] Strange partition on USB stick Mick
2011-10-04 3:39 ` Adam Carter
2011-10-04 5:18 ` Mick
2011-10-04 5:27 ` Paul Hartman
2011-10-04 6:53 ` Alan McKinnon
2011-10-04 15:57 ` Mick
2011-10-04 6:58 ` Mick
2011-10-04 16:18 ` Paul Hartman
2011-10-04 18:39 ` Mick
2011-10-04 19:36 ` Paul Hartman
2011-10-04 21:35 ` Mick
2011-10-07 22:09 ` Klaus Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox