Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
boot into linux on one of your systems
plug in the usb,
run the following, using /dev/sdb, the parted command is to make sure sdb is correct for the usb. Change accordingly if the usb is not /dev/sdb
Code:
user$ sudo parted -l
user$ sudo fdisk /dev/sdb
Command (m for help):o
Command (m for help): w
user$
The o will create a new dos partition table for the usb, it will give you info about it being encrypted and ask if your sure. After entering w fdisk will write the new empty partition table to the usb and exit. After that you should be able to re-partition the usb.
Last edited by colorpurple21859; 12-13-2020 at 10:00 PM.
boot into linux on one of your systems
plug in the usb,
run the following, using /dev/sdb, the parted command is to make sure sdb is correct for the usb. Change accordingly if the usb is not /dev/sdb
Code:
user$ sudo parted -l
user$ sudo fdisk /dev/sdb
Command (m for help):o
Command (m for help): w
user$
The o will create a new dos partition table for the usb, it will give you info about it being encrypted and ask if your sure. After entering w fdisk will write the new empty partition table to the usb and exit. After that you should be able to re-partition the usb.
Code:
user@Lenovo-ideapad-110-17IKB:~$ sudo parted -l
[sudo] password for user:
Model: ATA WDC WD10JPCX-24U (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI System Partition boot, esp
2 274MB 290MB 16,8MB Microsoft reserved partition msftres
3 290MB 331GB 330GB ntfs Basic data partition msftdata
5 331GB 332GB 1074MB ext4
4 332GB 333GB 1074MB ext4
10 333GB 650GB 317GB btrfs
9 650GB 957GB 307GB ext4
6 957GB 984GB 26,8GB ntfs Basic data partition msftdata
7 984GB 985GB 1049MB ntfs Basic data partition hidden, diag
8 985GB 999GB 14,2GB ntfs Basic data partition hidden, diag
Error: /dev/sdb: unrecognised disk label
Model: Intenso Ultra Line (scsi)
Disk /dev/sdb: 124GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
user@Lenovo-ideapad-110-17IKB:~$ sudo fdisk /dev/sdb
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
fdisk: cannot open /dev/sdb: Input/output error
user@Lenovo-ideapad-110-17IKB:~$ Command (m for help):o
bash: syntax error near unexpected token `m'
user@Lenovo-ideapad-110-17IKB:~$ Command :o
Command: command not found
user@Lenovo-ideapad-110-17IKB:~$ Command (m for help): w
bash: syntax error near unexpected token `m'
fdisk shut back down after the error. You don't have to type "Command (m for help):"when fdisk is open. Did a check in a vm, fedora install by default, doesn't encrypt the whole drive. You have something else going on here.
Last edited by colorpurple21859; 12-14-2020 at 05:49 AM.
fdisk shut back down after the error. You don't have to type "Command (m for help):"when fdisk is open. Did a check in a vm, fedora install by default, doesn't encrypt the whole drive. You have something else going on here.
again assuming it is /dev/sdb change accordingly if it isn't
Code:
user@Lenovo-ideapad-110-17IKB:~$ sudo dd if=/dev/null of=/dev/sdb conv=notrunc
[sudo] password for user:
0+0 records in
0+0 records out
0 bytes copied, 0,00020122 s, 0,0 kB/s
user@Lenovo-ideapad-110-17IKB:~$
At least you not getting a read-only error. Lets see if you can clear out the mbr.
Run
Code:
sudo parted -l
to make sure the usb is /still dev/sdb
Code:
sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1.
again assuming it is still /dev/sdb change accordingly if it isn't. Shutdown, pull out usb. You should be able to create a new partition table on the usb.
Last edited by colorpurple21859; 12-20-2020 at 06:05 PM.
At least you not getting a read-only error. Lets see if you can clear out the mbr.
Run
Code:
sudo parted -l
to make sure the usb is /still dev/sdb
Code:
sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1.
again assuming it is still /dev/sdb change accordingly if it isn't. Shutdown, pull out usb. You should be able to create a new partition table on the usb.
Code:
user@Lenovo-ideapad-110-17IKB:~$ sudo parted -l
[sudo] password for user:
Model: ATA WDC WD10JPCX-24U (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI System Partition boot, esp
2 274MB 290MB 16,8MB Microsoft reserved partition msftres
3 290MB 331GB 330GB ntfs Basic data partition msftdata
5 331GB 332GB 1074MB ext4
4 332GB 333GB 1074MB ext4
10 333GB 650GB 317GB btrfs
9 650GB 957GB 307GB ext4
6 957GB 984GB 26,8GB ntfs Basic data partition msftdata
7 984GB 985GB 1049MB ntfs Basic data partition hidden, diag
8 985GB 999GB 14,2GB ntfs Basic data partition hidden, diag
Error: /dev/sdb: unrecognised disk label
Model: Intenso Ultra Line (scsi)
Disk /dev/sdb: 124GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
user@Lenovo-ideapad-110-17IKB:~$ sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1.
dd: invalid number: ‘1.’
user@Lenovo-ideapad-110-17IKB:~$ sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1dd: error writing '/dev/sdb': Input/output error
1+0 records in
0+0 records out
0 bytes copied, 0,00124183 s, 0,0 kB/s
user@Lenovo-ideapad-110-17IKB:~$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.