LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2017, 08:48 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 10
Post Partitioning my USB.


Hello.
I used "GParted" and partitioning my USB to two partitions:
Code:
Disk /dev/sde: 7.4 GiB, 7969177600 bytes, 15564800 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
Disklabel type: dos
Disk identifier: 0x697a1dae

Device     Boot   Start      End Sectors  Size Id Type
/dev/sde1          2048  8388607 8386560    4G  6 FAT16
/dev/sde2       8388608 15564799 7176192  3.4G  6 FAT16
But, when I plug it to Windows OS then I just see one drive!!! Why?

Thank you.
 
Old 04-04-2017, 08:51 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,845

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
That's because windows will only see/read the first partition on a usb/flash drive which is by design of microsoft. It also doesn't matter what the filesystem type is. Why is a question only microsoft can answer.
 
Old 04-04-2017, 08:53 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,820
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
For anything larger than 2 TB you need to use the GPT partition table type. Your output shows you are using the DOS partition table type.

You can use parted and "mklabel gpt" to do that.

You may also which to change the partitions themselves from FAT16 to NTFS.

Last edited by MensaWater; 04-04-2017 at 08:56 AM.
 
Old 04-04-2017, 08:55 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,820
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
Quote:
Originally Posted by yancek View Post
That's because windows will only see/read the first partition on a usb/flash drive which is by design of microsoft. It also doesn't matter what the filesystem type is. Why is a question only microsoft can answer.
I'm not sure that is correct. It seems to me my home USB WD drive has 2 partitions on it and both my Windows 7 and my Windows 10 laptops can see both partitions. Its been a while since I did anything with it so I won't swear to that but my original setup was to allow backups to separate partitions from the 2 laptops.
 
Old 04-04-2017, 04:38 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,428

Rep: Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999
Most flash drives are reported to the OS as removable flash drives. Some along with almost all modern usb hard drives report differently so one can assign and read multiple partitions.

Think there is a program out there that can set the bit so that it reports as the hard drive and not flash drive. Flipbit ?? I think but there are other ways as I recall in windows to fix it.
 
Old 04-04-2017, 06:51 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,845

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
Quote:
t seems to me my home USB WD drive has 2 partitions on it and both my Windows 7 and my Windows 10 laptops can see both partitions.
Are you referring to an actual flash/pen drive or a WD (Western Digital) usb hard drive? If you have actually created a multi-partition flash drive with more than one windows partition recognized from windows that would surprise and make a lot of windows users happy. Particularly if you explain how you managed it. I'm not much of a windows user but would be interested in how it was achieved?

If you do an online search you will see many links, almost all of which are on windows forums and almost all coming to the same conclusion. It may be possible by hacking the registry or using specialized third party tools as I have seen that claim at some sites but it seems to be hit or miss and a convoluted process to do something so basic.

I've seen posts on the software referred to above (Flipbit) and it doesn't seem to work, at least for the posts I've seen.
 
Old 04-04-2017, 09:17 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,428

Rep: Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999Reputation: 2999
Because no two flash drives seem to have the same controller and the newer larger usb drives may not report the same. Yes, you can destroy a usb flash drive trying to write to it's controller.

Anyways, more on that whole deal here. https://www.tenforums.com/drivers-ha...ash-drive.html

Last edited by jefro; 04-04-2017 at 09:18 PM.
 
Old 04-05-2017, 08:12 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,820
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
The OP never said "flash" just "usb".

The size made me assume it wasn't a flash drive but rather a usb attached hard drive like the WD drives I've used on both Windows and Linux.

I've never tried to partition a "flash" drive but definitely have "usb attached hard drives".
 
Old 04-05-2017, 09:01 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,845

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
Quote:
The size made me assume it wasn't a flash drive but rather a usb attached hard drive
His output shows a 7.4GB drive which is why I found your original comment regarding "2TB" drives a bit confusing. The link posted by jefro above goes into some detail on it and I think that being seen as a "removable" drive has some impact on it for windows. I don't know enough about the hardware to know why this is a problem for windows but one can easily create and use multiple partitions on Linux regardless of the filesystem type and have them be accessilbe/usable.

Boot windows with a flash drive with multiple partitions and you should see all the partitions in Disk Management but will not be able to do anything with them, other than the first ntfs/vfat partition. You can't create a drive letter and all the other options other than delete are greyed.
 
Old 04-05-2017, 10:55 AM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,820
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
Quote:
Originally Posted by yancek View Post
His output shows a 7.4GB drive which is why I found your original comment regarding "2TB" drives a bit confusing.
D'oh! I misread the 3.4G on second partition as 3.4T somehow.
 
Old 04-05-2017, 05:47 PM   #11
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
It depends on how the Flash is set up.
Some flash have a single "partition" with no partition table and cannot be resized though they can be formatted to a different file format
Some have a partition table and cannot be changed without flipping the "fixed" bit - which may be protected.
Some have the fixed bit set which makes the behave like USB HARD drives which can be repartitioned.

The first thing I do with any flash is try to set the fixed bit so I can get control over it and the second is to enable write buffering so that writing is a reasonable speed - though that does mean having to take care when removing by EJECTING the drive from the OS.
 
Old 04-06-2017, 08:48 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,845

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
Quote:
Some flash have a single "partition" with no partition table and cannot be resized though they can be formatted to a different file format
Some have a partition table and cannot be changed without flipping the "fixed" bit - which may be protected.
Some have the fixed bit set which makes the behave like USB HARD drives which can be repartitioned.
Interesting information but I'm not sure of the relevance to this post which is why the same usb device can have multiple partitions with windows filesystems which are accessible/usable from Linux but only the first one is accessible/usable from windows. Based on the output in the initial post, the OP has two partitions but just can't access the second from windows. This has been my experience with multiple partition flash drives also and from the perspective of microsoft, it makes perfect sense.
 
Old 04-06-2017, 10:07 AM   #13
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
The relevance is that Windows will see all of them if the FIXED bit is set and will only see the first if it is not.
 
Old 04-06-2017, 03:52 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,845

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
Quote:
The relevance is that Windows will see all of them if the FIXED bit is set and will only see the first if it is not.
And does this make the second, third, etc. partitions not just viewable from windows but accessible/writeable?
I've never done this myself as I rarely use windows. On flash drives with multiple partitions, the partitions are accessible and writeable for me from Linux and are all seen from windows Disk Management but not writeable, other than the first partition.

I'm curious because the link to the tenforums posted above discusses this and whatever software the posters were using did not seem to work.

What is it about windows that requires this when Linux doesn't?

Last edited by yancek; 04-06-2017 at 04:01 PM.
 
Old 04-06-2017, 04:25 PM   #15
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
Of course they are Writable if that is how they are set up. As I said Windows treats them as Disks.

There are all sorts of combinations of features available and I doubt whether I have tried them ALL but with all the ones I have tried Linux treats them exactly the same way as Windows does and vice versa.

There are also many different ways the USB controllers in Flash drives work - and as far as I know no standard- so the things you can change varies from make to make and even within drives of the same make.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb distros,partitioning.... ott0disk Linux - General 2 05-12-2009 04:29 AM
USB Partitioning yitzle General 3 12-07-2006 12:43 PM
USB Flash Drive partitioning satimis Linux - Hardware 4 03-02-2006 03:56 AM
USB Pen Drive Partitioning esckey2004 Linux - General 1 12-10-2004 03:34 PM
Partitioning and booting an OS from an USB HD Kyral Retsam Linux - Newbie 2 07-29-2004 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration