LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-22-2022, 08:40 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,616

Rep: Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618
USB disks & formatting


Some rearrangement of fdisk & gdisk formats has gone on in my mental absence from such things. The range of disk type formatting options has been expanded vastly. In fact you can't see the wood for the trees anymore. All these historical, theoretical, optional, reserved, hypothetical & other-dimensional formats hide the half dozen or so that actually get used.

I wanted a windows compatible usb disk. So I gave a new 32G disk to my son and asked him to format it. I then threw this 32G disk in a slot and examined it with fdisk and gdisk.
Code:
Welcome to fdisk (util-linux 2.37.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The device contains 'vfat' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

Command (m for help): p

Disk /dev/sdc: 29.3 GiB, 31457280000 bytes, 61440000 sectors
Disk model: USB DISK        
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: 0x500a0dff

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdc1       1948285285 3650263507 1701978223 811.6G 6e unknown
/dev/sdc2                0          0          0     0B 74 unknown
/dev/sdc4         28049408   28049848        441 220.5K  0 Empty

Partition table entries are not in disk order.

Command (m for help): q
Gdisk seems no better
Code:
bash-5.1$ gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

Exact type match not found for type code 6E00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 7400; assigning type code for
'Linux filesystem'
Warning! Main partition table overlaps the first partition by 34 blocks!
You will need to delete this partition or resize it in another utility.

Warning! Secondary partition table overlaps the last partition by
3588823541 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): p
Disk /dev/sdc: 61440000 sectors, 29.3 GiB
Model: USB DISK        
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): CB98FFF4-3128-41D2-8A7F-BA9F69E15962
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 61439966
Partitions will be aligned on 1-sector boundaries
Total free space is 61439933 sectors (29.3 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1      1948285285      3650263507   811.6 GiB   8300  Linux filesystem

Command (? for help):
I can only conclude Windows 10 hasn't a clue either. It's not comforting to know that Windows 10 thinks my 32G disk is good for 811.6G, and I can't mount any of those partitions in linux.

Can someone point me at a shortlist of frequently used formats?
 
Old 04-22-2022, 09:37 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,801

Rep: Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333
The compatible formats are:
NTFS
FAT
FAT32
exFAT

I have found that typically USB drives are already formatted using legacy MBR and for sizes <=32GB as FAT32. The partition ID is 07h. Very odd that Windows would of messed it up that bad...
 
Old 04-22-2022, 11:19 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,616

Original Poster
Rep: Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618
Thanks for the reply.

Agreed, that was bad even for windows. I resorted in the end to 'wipefs -af' as there was no other way to delete partition 2 and it found quite a bit of stuff. Windows might have done better if I had done that before. But of course, windows thinks it's the only one there, whereas linux accomodates variety.Now it looks a little healthier.
Code:
Welcome to fdisk (util-linux 2.37.3).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdc: 29.3 GiB, 31457280000 bytes, 61440000 sectors
Disk model: USB DISK        
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: 0xa29548b1

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 61439999 61437952 29.3G  7 HPFS/NTFS/exFAT
and gdisk:
Code:
Disk /dev/sdc: 61440000 sectors, 29.3 GiB
Model: USB DISK        
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 677D7A14-698F-46A5-AD4A-58BF2FC5FE27
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 61439966
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048        61439999   29.3 GiB    0700  Microsoft basic data
 
Old 04-22-2022, 04:58 PM   #4
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,829
Blog Entries: 7

Rep: Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904Reputation: 2904
USB disks & formatting

Does your son use BitLocker?
 
Old 04-23-2022, 04:05 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,616

Original Poster
Rep: Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618Reputation: 2618
Quote:
Originally Posted by rkelsen View Post
Does your son use BitLocker?
No. He's not one bit of a software geek, with little patience. Format was probably a click or three from the file manager.
 
  


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
formatting removable disks adluri LinuxQuestions.org Member Intro 1 10-17-2008 04:37 AM
AOL UK && BT Voyager 100 && Slackware 10.2 && RP-PPPoE pitt0071 Linux - Networking 3 01-17-2006 06:10 AM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
Gotta love those &#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM
Formatting disks again . . . Dave Campbell Linux - Software 5 03-07-2002 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:39 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
Open Source Consulting | Domain Registration