write image to usb drive - 'permission denied'
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
write image to usb drive - 'permission denied'
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
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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: write image to usb drive - 'permission denied'
The command you list has a problem, I believe it should be:
dd does not like to write to a partition on the device from an image file, it should start writing from the beginning.
Code: Select all
xzcat FreeNAS-8.2.0-RELEASE-p1-x64.GUI_Upgrade.xz | dd of=/dev/sdb bs=64k
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
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?
Thanks for the response though. Any other ideas?
Re: write image to usb drive - 'permission denied'
Post the output of
Code: Select all
Sudo fdisk -l
Re: write image to usb drive - 'permission denied'
are you starting dd as root? or with sudo (tho i can't see it in the output?)
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
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!
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'
Sudo may not survive the pipe.....may have to su to root
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
nope, sudo didn't work.
wazntme, how do you su to root?
wazntme, how do you su to root?
Re: write image to usb drive - 'permission denied'
something like this
Code: Select all
zerozero@deb-kde ~ $ su
Code: Select all
Password:
Code: Select all
deb-kde zerozero #
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
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.
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'
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)
it's as simple as at the terminal prompt you do
Code: Select all
su
above it's my username and the computer name (deb-kde)
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
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.
I'll give that a go. Again, thanks.
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
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:
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.
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:
What the heck would that have been? Any idea?There is still a process running in this terminal. Closing the terminal will kill it.
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'
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.
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.
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
Hi cwsnyder,
How do you "exit" from su once you are in it?
and you are right about the sdb comment - thanks.
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'
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.
-
- Level 4
- Posts: 231
- Joined: Thu Mar 15, 2012 8:11 pm
Re: write image to usb drive - 'permission denied'
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.
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.