External HDD: couldn't open device. Permission denied.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
External HDD: couldn't open device. Permission denied.
I have an old LaCie 2TB Thunderbolt2 device which had been used by someone else in a RAID configuration. The original 2.5"HDD was removed from the RAID, partitioned and reformatted as HFS and working well in the LaCie enclosure. I removed it and replaced the HDD with a 2.5" SSD which is working well.
I am trying to connect the removed HDD as an external drive to my Linux laptop for backups etc. I have been trying (with my limited knowledge of Linux) to partition it and reformat it to Ext4 but the format continually fails.
Terminal readout from relative portion of parted command:
donmac@donmac-Inspiron-linux:~$ sudo parted -l
[sudo] password for donmac:
Model: ST2000LM 003 HN-M201RAD (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 2000GB 2000GB primary
------
Terminal readout from fdisk command:
donmac@donmac-Inspiron-linux:~$ fdisk /dev/sdb
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. w
fdisk: cannot open /dev/sdb: Permission denied
------
An internet page on formatting suggested using "blockdev".
Readout of suggested blockdev command:
donmac@donmac-Inspiron-linux:~$ sudo blockdev -v --setrw /dev/sdb
[sudo] password for donmac:
blockdev: cannot open /dev/sdb: No such file or directory
------
Every attempt to open the device indicates that it cannot be opened. Can anyone assist me with a command or series of commands that will enable the disk to be erased, partitioned and formatted as ext4?
This is a shot in the dark, but is the drive mounted? You cannot partition a mounted drive.
Also, please surround terminal output with "code" tags, which become available when you click the "Go Advanced" button beneath the compose/edit post window. It makes terminal output much easier to read.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.