Page 1 of 1
write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 8:42 pm
by HilltopsGM
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
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 8:49 pm
by cwsnyder
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.
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 9:58 pm
by HilltopsGM
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?
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 10:19 pm
by wazntme
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 10:24 pm
by zerozero
are you starting dd as root? or with sudo (tho i can't see it in the output?)
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 10:44 pm
by HilltopsGM
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
That was probably it.
I'll try it again - thanks for that!
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 10:58 pm
by wazntme
Sudo may not survive the pipe.....may have to su to root
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 11:07 pm
by HilltopsGM
nope, sudo didn't work.
wazntme, how do you su to root?
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 11:17 pm
by zerozero
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 11:27 pm
by HilltopsGM
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.
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 11:33 pm
by zerozero
i guess i overcomplicated trying to make it easy
it's as simple as at the terminal prompt you do
the rest is self-explanatory
above it's my username and the computer name (deb-kde)
Re: write image to usb drive - 'permission denied'
Posted: Fri Dec 28, 2012 11:43 pm
by HilltopsGM
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.
Re: write image to usb drive - 'permission denied'
Posted: Sat Dec 29, 2012 12:04 am
by HilltopsGM
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.
Re: write image to usb drive - 'permission denied'
Posted: Sat Dec 29, 2012 1:36 pm
by cwsnyder
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.
Re: write image to usb drive - 'permission denied'
Posted: Sat Dec 29, 2012 1:46 pm
by HilltopsGM
Hi cwsnyder,
How do you "exit" from su once you are in it?
and you are right about the sdb comment - thanks.
Re: write image to usb drive - 'permission denied'
Posted: Sat Dec 29, 2012 1:54 pm
by cwsnyder
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.
Re: write image to usb drive - 'permission denied'
Posted: Sat Dec 29, 2012 1:59 pm
by HilltopsGM
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
===> love what I can do with dd (a.k.a the data destroyer
)
.... but that's how you learn guess.
Thanks for the help.