LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   cryptsetup --verbose --verify-passphrase luksFormat /dev/xxxX Cannot Access Device!!? (http://www.linuxquestions.org/questions/linux-hardware-18/cryptsetup-verbose-verify-passphrase-luksformat-dev-xxxx-cannot-access-device-763493/)

Vale of Dallas Texas 10-21-2009 01:19 PM

cryptsetup --verbose --verify-passphrase luksFormat /dev/xxxX Cannot Access Device!!?
 
When doing luksFormat I choose YES and I get a

Command failed: Can not access device

What?

So this device in question is 250GB external connected via USB.

The OS is Ubuntu9.04

I have used,via root

chown xxxxxx:xxxxxx /dev/sdb1
and
chown xxxxxx:xxxxxx /dev/sdb

to change permissions but strange enough that doesn't work?
Thinking this would be the fix, but nope.

A bit of help would be grand.

xeleema 10-22-2009 06:22 AM

Hail fellow Texan!

First off, you have to be root. You got that part correct, props.
Secondly, don't go off and change the ownership and group settings of devices (those crazy files in /dev will *really* ruin your day if you do).

Third, would the whole command you're trying to use look something like this?
cryptsetup -c aes-cbc-essiv:sha256 luksFormat /dev/sdb1
We really like it when people post the whole command, like you did in the subject.
However, a chunk of the output would go a long way, too.

By chance are you using LVM2? Or is this strictly partitions (hda1, hda2, hda3 etc) we're dealing with here?

P.S: I'm a professional nite owl, so my responses will typically be within the wee hours of the morning.

Vale of Dallas Texas 10-22-2009 02:47 PM

A Proud Hails to you sir,

What we have,

Output:

--------------------------------------------------------------------------
root@laptop03:/home/kbrock# cryptsetup -c aes-cbc-essiv:sha256 luksFormat /dev/sdb1

WARNING!

========
This will overwrite data on /dev/sdb1 irrevocably.

Are you sure? (Type uppercase yes): YES
Command failed: Can not access device
root@laptop03:/home/kbrock#

---------------------------------------------------------------------

Partition only. The whole disk.

Vale of Dallas Texas 10-22-2009 03:00 PM

If needed,.....

fdisk -l Output:

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/tracks, 30401 cylinders
Units + cylinders of 16065 * 512 + 8225280 bytes
Disk identifier: 0x0008a569

Device Boot Start End Blocks Id System
/dev/sdb1 1 30401 244196001 83 Linux

xeleema 10-23-2009 02:49 AM

By chance is /dev/sdb1 already mounted up as a filesystem?

"mount | grep sdb" should tell you what partitions are mounted up from /dev/sdb.

Maybe a "fuser -cu /dev/sdb1", too.

Vale of Dallas Texas 10-23-2009 11:29 AM

Yup I had already created a partition for dev/sdb = dev/sdb1

I almost get the feeling your asking because luksFormat needs to be ran on a drive that has no formatting previously done.

Because this device is empty I am going to kill the current partition and attempt luksFormat from that angle in turn creating a new partition via luks.

Vale of Dallas Texas 10-23-2009 12:39 PM

As you can tell I had a suspicion, I tried, it worked.

Thanks again for your brain.

Vale of Dallas Texas 10-23-2009 02:17 PM

To add my friend, I am really new to all of this. My boss's kinda threw me in the arena and said, "Find a weapon boy, the wolves are on their way in!",....sheeesh.

But I must say I thank them for it, because I am enjoying myself.

I found a good how/to ..... it's a bit fuzzy at the end, but you can tell the human really tried to create good documentation.

http://www.mattmckimmy.com/blog/2009...on-usb-drives/


It sorta breaks some rules and hearts to not use CLI 100% of the time but, it gets the job done, and I have actually ended up learning more than one way to go about things.
Which is useful when you find yourself in a maze.

Until the next hunt..., Watch out for those damn bats man!

xeleema 10-24-2009 12:34 AM

That's awesome! So you were able to get it to work?
Well, have a great time, and I'm sure you'll find out us penguins aren't too bad!

Stop by the SATLUG if you're ever in S.A!


All times are GMT -5. The time now is 04:04 PM.