write image to usb drive - 'permission denied'

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help

write image to usb drive - 'permission denied'

Postby HilltopsGM on Fri Dec 28, 2012 8:42 pm

I had a Live version of Linux Mint on this usb drive and I was trying to write an image of FreeNAS 8 to it using this command:

xzcat FreeNAS-8.2.0-RELEASE-p1-x64.GUI_Upgrade.xz | dd of=/dev/sdb1 bs=64k

For some reason I am getting this message:

dd: opening `/dev/sdb1': Permission denied

I am not that familiar with all the termainal code nuances. Can someone assist?
(dd commands - I know are notorious for getting people into trouble - I have been warned)
(I am using the blkid command prior to to id the device I am looking for)

Thanks
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Linux Mint is funded by ads and donations.
 

Re: write image to usb drive - 'permission denied'

Postby cwsnyder on Fri Dec 28, 2012 8:49 pm

The command you list has a problem, I believe it should be:
Code: Select all
xzcat FreeNAS-8.2.0-RELEASE-p1-x64.GUI_Upgrade.xz | dd of=/dev/sdb bs=64k


dd does not like to write to a partition on the device from an image file, it should start writing from the beginning.
LMDE Mate 64-bit, LM17 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 14.10 64-bit, Xubuntu 14.04 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1063
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Fri Dec 28, 2012 9:58 pm

I did try that as well, but that didn't seem to work either. I am not getting access to the usb drive at all ===> permission denied.

Thanks for the response though. Any other ideas?
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Re: write image to usb drive - 'permission denied'

Postby wazntme on Fri Dec 28, 2012 10:19 pm

Post the output of
Code: Select all
Sudo fdisk -l
User avatar
wazntme
Level 1
Level 1
 
Posts: 13
Joined: Tue Nov 13, 2012 8:39 pm

Re: write image to usb drive - 'permission denied'

Postby zerozero on Fri Dec 28, 2012 10:24 pm

are you starting dd as root? or with sudo (tho i can't see it in the output?)
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6492
Joined: Tue Jul 07, 2009 2:29 pm

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Fri Dec 28, 2012 10:44 pm

hmmmm, You know what . . . I didn't put the sudo in front.

I don't know what I was thinking.

I started off with
sudo blkid

to identify the devices.

I didn't think to put "sudo" infront of the command :oops:

That was probably it.

I'll try it again - thanks for that!
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Re: write image to usb drive - 'permission denied'

Postby wazntme on Fri Dec 28, 2012 10:58 pm

Sudo may not survive the pipe.....may have to su to root
User avatar
wazntme
Level 1
Level 1
 
Posts: 13
Joined: Tue Nov 13, 2012 8:39 pm

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Fri Dec 28, 2012 11:07 pm

nope, sudo didn't work.

wazntme, how do you su to root?
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Re: write image to usb drive - 'permission denied'

Postby zerozero on Fri Dec 28, 2012 11:17 pm

something like this
Code: Select all
zerozero@deb-kde ~ $ su

Code: Select all
Password:

Code: Select all
deb-kde zerozero #
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6492
Joined: Tue Jul 07, 2009 2:29 pm

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Fri Dec 28, 2012 11:27 pm

could you expand on each piece of what was written zerozero?

zerozero ====> that's your username
@deb-kde ====> I don't know what that is. I am running Linux Mint 12 cinnamon still at this moment, and not the kde version. What would it be for cinnamon?

~ $ su =====> this I take I would just copy as is.

The Password I would take to be my sudo password, no?

thanks for the help.
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Re: write image to usb drive - 'permission denied'

Postby zerozero on Fri Dec 28, 2012 11:33 pm

i guess i overcomplicated trying to make it easy :lol:
it's as simple as at the terminal prompt you do
Code: Select all
su

the rest is self-explanatory

above it's my username and the computer name (deb-kde)
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6492
Joined: Tue Jul 07, 2009 2:29 pm

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Fri Dec 28, 2012 11:43 pm

Thanks for that. I just went back to terminal and realized what it was you were getting at. Thanks

I'll give that a go. Again, thanks.
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Sat Dec 29, 2012 12:04 am

thanks zerozero - it worked like a charm!

By the way, after it finished:

Greg-LinuxMint greg # xzcat FreeNAS-8.3.0-RELEASE-p1-x64.img.xz | dd of=/dev/sdb1 bs=64k
552+238777 records in
552+238777 records out
2000000000 bytes (2.0 GB) copied, 378.382 s, 5.3 MB/s
Greg-LinuxMint greg #



and I went to close terminal i got this message:
There is still a process running in this terminal. Closing the terminal will kill it.


What the heck would that have been? Any idea?

All I did was su to root, ran blkid to make sure I had the correct device, burn the image to the usb and close termainal. Nothing else.
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Re: write image to usb drive - 'permission denied'

Postby cwsnyder on Sat Dec 29, 2012 1:36 pm

You had not exited su and it was complaining about it.

Also, using /dev/sdb1 wrote it to a partition and may not work to boot the image. You need to write to /dev/sdb for disk images.
LMDE Mate 64-bit, LM17 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 14.10 64-bit, Xubuntu 14.04 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1063
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Sat Dec 29, 2012 1:46 pm

Hi cwsnyder,

How do you "exit" from su once you are in it?

and you are right about the sdb comment - thanks.
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Re: write image to usb drive - 'permission denied'

Postby cwsnyder on Sat Dec 29, 2012 1:54 pm

You exit from su the normal way you exit from the terminal, ie., you type exit by itself at the # prompt or press and hold the Ctl button while pressing the D button.
LMDE Mate 64-bit, LM17 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 14.10 64-bit, Xubuntu 14.04 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1063
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: write image to usb drive - 'permission denied'

Postby HilltopsGM on Sat Dec 29, 2012 1:59 pm

Excellent. I didn't know that.

I love tinkering with Linux, but (obviously) don't know A LOT about terminal and command line code.
I know enough to be really dangerous to myself though :lol: ===> love what I can do with dd (a.k.a the data destroyer :lol: )

.... but that's how you learn guess.

Thanks for the help.
HilltopsGM
Level 3
Level 3
 
Posts: 134
Joined: Thu Mar 15, 2012 8:11 pm

Linux Mint is funded by ads and donations.
 

Return to Other topics

Who is online

Users browsing this forum: Neil Edmond and 6 guests