Syntax for the dd command [SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
carolynmcm
Level 1
Level 1
Posts: 30
Joined: Thu May 17, 2012 7:48 am

Syntax for the dd command [SOLVED]

Post by carolynmcm »

Hello, I am about to root my Nook e-reader because the vendors, Barnes & Noble, have ceased to support it in the UK. There is a program to do the job, but I'm advised to
Unzip the file you downloaded and write the NookManager.img file to an empty SD card. On Windows, you can use disk imager. Linux and mac users can use dd.
I've looked up dd, but cannot make sense of the information I've found.

I'd be very grateful if someone could give me the probably very simple line of code I need. I'm using Mint 17 and will be writing to a microSD reader.
Carolynmcm
Last edited by carolynmcm on Sun Jan 06, 2019 2:39 pm, edited 1 time in total.

deepakdeshp
Level 16
Level 16
Posts: 6445
Joined: Sun Aug 09, 2015 10:00 am

Re: Syntax for the dd command

Post by deepakdeshp »

dd if=file1 of=file2 bs=1024000

Above command indicates file1 is input file2 is output file and 1024000 is the block size meaning in one go 1 Mbytes will be read and written from input and outpit file.

http://linoxide.com/linux-command/linux ... -1gb-file/

Code: Select all

man dd
in terminal will give various options.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

deepakdeshp
Level 16
Level 16
Posts: 6445
Joined: Sun Aug 09, 2015 10:00 am

Re: Syntax for the dd command

Post by deepakdeshp »

dd if=file1 of=file2 bs=1024000

Above command indicates file1 is input file2 is output file and 1024000 is the block size meaning in one go 1 Mbytes will be read and written from input and outpit file.

http://linoxide.com/linux-command/linux ... -1gb-file/

Code: Select all

man dd
in terminal will give various options.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

rene
Level 13
Level 13
Posts: 4887
Joined: Sun Mar 27, 2016 6:58 pm

Re: Syntax for the dd command

Post by rene »

And if the problem more is what to specify exactly as file1 and file2; when you insert your SD card it may be automatically mounted if it already contains a filesystem. If so you will find it under the "Devices" section in the left hand side column in the file manager; right-click it, chose Properties and from the "Basic" tab note its name and location. Something like respectively 22F7-4323 and /media/carolynmcm.

In a terminal note in the output of the command "mount" its device; it will for example be listed as

Code: Select all

/dev/sdz1 on /media/carolynmcm/22F7-4323 type vfat (...)
in which "z" will no doubt be an alphabetically significantly earlier letter. First unmount it:

Code: Select all

umount /dev/sdz1
and note /dev/sdz (without the 1) to be the "of=" parameter that you will need.

If the SD card did not yet contain a filesystem it wasn't automatically mounted; in that case the output of

Code: Select all

dmesg | tail
directly after inserting the card will betray what device specifier Linux assigned to it. Again, it will be "sdz" for some low value of "z".

Making once again sure that you have unmounted it if was mounted you now use dd in the form of, say,

Code: Select all

sudo dd if=NookManager.img of=/dev/sdz bs=1M
You can leave out the "bs=1M" if you want. Be very careful to have the correct device specifier before doing this. Type

Code: Select all

sudo eject sdz
when done to if your reader is capable of such actually eject the card or at least sync up everything so that you can remove it safely manually.

[EDIT] Note, edited in two "sudo" instances after initial post.

Mute Ant
Level 14
Level 14
Posts: 5134
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Syntax for the dd command

Post by Mute Ant »

--sigh-- Or you could use the USB Image Writer and leave dd for another day.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

rene
Level 13
Level 13
Posts: 4887
Joined: Sun Mar 27, 2016 6:58 pm

Re: Syntax for the dd command

Post by rene »

Fair enough :)

carolynmcm
Level 1
Level 1
Posts: 30
Joined: Thu May 17, 2012 7:48 am

Re: Syntax for the dd command

Post by carolynmcm »

Many thanks for all the advice, folks. Should be able to work it out from all that - tomorrow. Re the USB Image Writer - I presume it works with SD cards as well as USB sticks?

rene
Level 13
Level 13
Posts: 4887
Joined: Sun Mar 27, 2016 6:58 pm

Re: Syntax for the dd command

Post by rene »

Needing to presume anything of that kind is why I prefer basic tools such as dd -- but that wouldn't be to say that I had even thought of the USB Image Writer thing. Sure, it'll work fine with an SD card as well.

0ddity
Level 3
Level 3
Posts: 140
Joined: Wed Jul 15, 2009 6:19 pm

Re: Syntax for the dd command

Post by 0ddity »

It will work with SD cards in a USB card reader. In my experience, you can't boot from an SD card in a built in card reader.

rene
Level 13
Level 13
Posts: 4887
Joined: Sun Mar 27, 2016 6:58 pm

Re: Syntax for the dd command

Post by rene »

She's doing this: http://forum.xda-developers.com/showthr ... ?t=2040351. That is, needs the Nook to boot from the card; not a general PC, as I expect you are assuming? Supposedly those instructions will work.

[EDIT] But yes, it does seem that that USB Image Writer thing takes the USB part in fact seriously; it does not allow me to write to a disk partition for example. I personally only have a USB card reader, but poster: if your card does not show up as a possible target in the USB Image Writer, just revert to the dd method.

carolynmcm
Level 1
Level 1
Posts: 30
Joined: Thu May 17, 2012 7:48 am

Re: Syntax for the dd command

Post by carolynmcm »

Yes, I have to boot the Nook from the mini-SD card. I also have to get my laptop to mount the card, so the coding advice is invaluable. I'll have a go with this and the dd command (as soon as I have time) and report back. Many thanks for all the help.

carolynmcm
Level 1
Level 1
Posts: 30
Joined: Thu May 17, 2012 7:48 am

Re: Syntax for the dd command

Post by carolynmcm »

I've got the device specifier, sdc, but I just want to check that, after mounting the SD card I do need to unmount it before using dd. This seems a bit surprising.

User avatar
WharfRat
Level 21
Level 21
Posts: 13500
Joined: Thu Apr 07, 2011 8:15 pm

Re: Syntax for the dd command

Post by WharfRat »

carolynmcm wrote:I've got the device specifier, sdc, but I just want to check that, after mounting the SD card I do need to unmount it before using dd. This seems a bit surprising.
Yes, umount sdc...
ImageImage

rene
Level 13
Level 13
Posts: 4887
Joined: Sun Mar 27, 2016 6:58 pm

Re: Syntax for the dd command

Post by rene »

If (a partition of) it is mounted now definitely you should. Said so explicitly above. If /dev/sdc or /dev/sdcN for a numerical value of N features in the output of mount, unmount it before using dd.

carolynmcm
Level 1
Level 1
Posts: 30
Joined: Thu May 17, 2012 7:48 am

Re: Syntax for the dd command (SOLVED)

Post by carolynmcm »

Rene's advice was exactly what I needed. Many thanks for taking all the trouble, Rene. The Nook is now rooted and all went well apart from a problem with a faulty microSD card. Thanks also to the other contributors.

Post Reply

Return to “Newbie Questions”