WARNING!
BE VERY VERY CAREFUL! YOU CAN DESTROY YOUR SYSTEM!
so better use a system that is not production important/not a live server.
use a laptop that has NOTHING ATTACHED TO IT!
(unplug all USB Sticks and external USB Drives)
because if you pick the wrong drive (sdb instead of sdc) you are SCREWED!
you can also use gparted for gui if you are not comfortable with the terminal black and white or green.
# consult dmesg # and mount what device letter the stick has # (immediately after plug in run dmesg) dmesg # example output [ 213.977385] sdb: sdb1 [ 252.952216] sdb: sdb1 [ 282.761170] sdb: sdb1 [ 282.765067] sdb: sdb1 [ 443.135235] usb 3-1: USB disconnect, device number 2 [ 445.469887] usb 3-1: new SuperSpeed USB device number 3 using xhci_hcd [ 445.491072] usb 3-1: New USB device found, idVendor=0951, idProduct=1666 [ 445.491077] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 445.491079] usb 3-1: Product: DataTraveler 3.0 [ 445.491082] usb 3-1: Manufacturer: Kingston [ 445.491084] usb 3-1: SerialNumber: 1C1B0D4B4AFDB231290C6BD2 [ 445.492044] usb-storage 3-1:1.0: USB Mass Storage device detected [ 445.492148] scsi host4: usb-storage 3-1:1.0 [ 446.507899] scsi 4:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6 [ 446.508378] sd 4:0:0:0: Attached scsi generic sg1 type 0 [ 446.509205] sd 4:0:0:0: [sdc] 60555264 512-byte logical blocks: (31.0 GB/28.9 GiB) [ 446.509724] sd 4:0:0:0: [sdc] Write Protect is off [ 446.509727] sd 4:0:0:0: [sdc] Mode Sense: 45 00 00 00 [ 446.510247] sd 4:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 446.610002] sdc: sdc1 [ 446.612326] sd 4:0:0:0: [sdc] Attached SCSI removable disk [ 446.776672] fuse init (API version 7.26) # lsblk is also good to see "what is there" lsblk -fs NAME FSTYPE LABEL UUID MOUNTPOINT sda1 ext4 root e288ef83-962a-47f2-93de-893edde84d48 / └─sda sda2 └─sda sda5 swap 410f0b20-edca-4db2-a8f6-3e82d29602e7 [SWAP] └─sda sdc1 ntfs 32GBSTICK 57F661650F30249E /media/canoodle/32GBSTICK └─sdc # start fdisk on device sdc fdisk /dev/sdc Welcome to fdisk (util-linux 2.29.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. # print all existing partitions Command (m for help): p Disk /dev/sdc: 28.9 GiB, 31004295168 bytes, 60555264 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: 0xa39737bf Device Boot Start End Sectors Size Id Type /dev/sdc1 2048 60555263 60553216 28.9G 7 HPFS/NTFS/exFAT # delete partition d # enter # create new partition n Command (m for help): n # chose primary if you are going to create only one partition on the stick p Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p # hit enter 3x times to accept default partition number and size Partition number (1-4, default 1): First sector (2048-60555263, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-60555263, default 60555263): Created a new partition 1 of type 'Linux' and of size 28.9 GiB. Partition #1 contains a ntfs signature. # Type Y or Yes Do you want to remove the signature? [Y]es/[N]o: Yes The signature will be removed by a write command. # even when it says: Created a new partition 1 of type 'Linux' and of size 28.9 GiB. # you can now change the partition type to NTFS by hitting t and 7 Command (m for help): t Selected partition 1 Partition type (type L to list all types): 7 Changed type of partition 'Linux' to 'HPFS/NTFS/exFAT'. # type w to write changes Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: Device or resource busy The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8). # now you should # quick format and label LABEL mkfs.ntfs -f -L "LABEL" /dev/sdc1 sync; umount /dev/sdc1 # re plugin and you ready you are
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!