You are not logged in.

#1 2017-01-22 15:09:21

theAviator
Member
Registered: 2017-01-22
Posts: 8

Restore the USB drive as an empty drive after using dd [SOLVED]

Ive recently been using the dd command to create bootable usb sticks however i have been struggling to fix them to normal use after I use the command.  I have been struggling to remount after trying to reformat the drive,  i get this error: mount: can't find /dev/sdb in /etc/fstab.

Can any help me? I appreciate the help if provided.

Thank You!

Last edited by theAviator (2017-01-24 09:45:05)

Offline

#2 2017-01-22 15:25:15

the-bird-is-the-word
Member
Registered: 2014-08-26
Posts: 4

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

sdb is not a partition but a device.  A partition would be sdb1 or sdb2, and so on.  If you have no partition you will need to create one: here are the tools you can choose from https://wiki.archlinux.org/index.php/Pa … ning_tools

After creating a partition you will need to make a file system on it https://wiki.archlinux.org/index.php/Fi … ile_system

Then you can mount the drive.  *** Partitioning and creating a file system on the drive will destroy any data on the drive! ***

Offline

#3 2017-01-22 15:54:04

theAviator
Member
Registered: 2017-01-22
Posts: 8

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

Taking action on your reply, I wanted to use fdisk to create a new partition however i get this error: fdisk: cannot open /dev/sdb: No medium found

Offline

#4 2017-01-22 15:59:40

the-bird-is-the-word
Member
Registered: 2014-08-26
Posts: 4

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

Are you sure sdb is the thumb drive?  With the thumb drive plugged in what is the output of

lsblk

Last edited by the-bird-is-the-word (2017-01-22 16:00:11)

Offline

#5 2017-01-22 16:12:15

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

You might want to try unplugging the usb stick, waiting a bit, and then replugging it back in before you try the lsblk command the-bird-is-the-word suggested.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#6 2017-01-22 16:20:38

theAviator
Member
Registered: 2017-01-22
Posts: 8

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

I believe the drive was ejected, (my error), fdisk has know worked, what is the correct way to create the partition using fdisk?

Offline

#7 2017-01-22 16:23:53

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

Just follow the link the-bird-is-the word gave you earlier.  Archers like you to do some of the work yourself.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#8 2017-01-22 16:26:58

theAviator
Member
Registered: 2017-01-22
Posts: 8

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

yea Ive been doing the work myself for 2 hours, i believe in trying to succeed on your own if you cant ask for help whats wrong with that isnt that what this newbie corner is about!

Offline

#9 2017-01-22 16:31:01

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

There is certainly nothing wrong with asking if you absolutely have tried, like you say, but you will  find that for simple things covered by the wonderful arch wiki articles, they don't do too much hand holding around here.  Sorry if you don't like my answer.  If the fdisk command doesn't work for you tell us what you did.
Edit: wrong command

Last edited by bgc1954 (2017-01-22 16:39:59)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#10 2017-01-22 16:34:34

the-bird-is-the-word
Member
Registered: 2014-08-26
Posts: 4

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

The first link that leads to partitioning tools has links to the individual programs wiki.  Fdisk is here https://wiki.archlinux.org/index.php/Fd … partitions  This explains how to use it.

There is nothing wrong with asking for help, but one of the principles of Arch is learning how to manage Linux.  The wiki is a very good source of information, and is what I used when I first started.  I found it was easier for me to remember the process if I worked through it with the wiki as a guide, rather than just having the answer provided for me.

That is why I am only providing the links rather than step by step instructions.  I am not trying to be difficult, or put you off of Arch, or the forums.  This is a good distro, and you will enjoy it greatly if you have the time to invest in learning.  smile

Offline

#11 2017-01-22 18:06:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

tl;dr : You will want to partition the thumbdrive using a tool like fdisk.  Be very careful you partition the correct disk -- don't mess up your main disk.
Then, format each partition you created according to your needs -- vfat, NTFS, ext, whatever.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#12 2017-01-22 22:51:16

theAviator
Member
Registered: 2017-01-22
Posts: 8

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

Sadly after creating the partition, I tried to mount the file system however it failed. Used the command 'dmesg | tail' to bring up some useful information about the drive.
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
[watchfulmadcap@arch ~]$ dmesg | tail
[ 8549.002493] hp_wmi: Unknown event_id - 0 - 0x0
[ 9092.330359] usb 1-1.2: USB disconnect, device number 5
[ 9093.817163] usb 1-1.2: new high-speed USB device number 6 using ehci-pci
[ 9093.951397] uvcvideo: Found UVC 1.00 device HP TrueVision HD (064e:d281)
[ 9093.954462] uvcvideo 1-1.2:1.0: Entity type for entity Processing 2 was not initialized!
[ 9093.954474] uvcvideo 1-1.2:1.0: Entity type for entity Extension 6 was not initialized!
[ 9093.954481] uvcvideo 1-1.2:1.0: Entity type for entity Camera 1 was not initialized!
[ 9093.954901] input: HP TrueVision HD as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input16
[12649.722640] perf: interrupt took too long (3167 > 3166), lowering kernel.perf_event_max_sample_rate to 63000
[31577.775135]  sdb: sdb1

Offline

#13 2017-01-22 23:08:04

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

Please use code tags for commands plus their output.
You mention creating the partition, then there is no mention of formatting the partition.
Attempting to mount an unformatted partition should fail which is the output you have produced although it would be preferable to post the command used to generate it along with the output.

Offline

#14 2017-01-22 23:22:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: Restore the USB drive as an empty drive after using dd [SOLVED]

theAviator wrote:

Sadly after creating the partition, I tried to mount the file system however it failed.

ewaller wrote:

You will want to partition the thumbdrive using a tool like fdisk.  ...
Then, format each partition you created according to your needs -- vfat, NTFS, ext, whatever.

emphasis added

Then, and only then, try to mount it


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB