LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-21-2009, 01:19 PM   #1
Vale of Dallas Texas
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Rep: Reputation: 0
Cool 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.

Last edited by Vale of Dallas Texas; 10-21-2009 at 01:19 PM. Reason: os name was missing
 
Old 10-22-2009, 06:22 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
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.

Last edited by xeleema; 10-22-2009 at 06:27 AM.
 
Old 10-22-2009, 02:47 PM   #3
Vale of Dallas Texas
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
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.

Last edited by Vale of Dallas Texas; 10-22-2009 at 02:48 PM.
 
Old 10-22-2009, 03:00 PM   #4
Vale of Dallas Texas
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 10-23-2009, 02:49 AM   #5
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
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.
 
Old 10-23-2009, 11:29 AM   #6
Vale of Dallas Texas
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 10-23-2009, 12:39 PM   #7
Vale of Dallas Texas
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
As you can tell I had a suspicion, I tried, it worked.

Thanks again for your brain.
 
Old 10-23-2009, 02:17 PM   #8
Vale of Dallas Texas
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
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!
 
Old 10-24-2009, 12:34 AM   #9
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
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!
 
  


Reply

Tags
access, can, cryptsetup, luks, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cryptsetup luksFormat gives me segmentation fault carlitoco Slackware 2 09-17-2009 09:35 AM
cryptsetup won't open crypted fs on raid5 with known luks passphrase luboss Linux - Security 3 11-13-2008 01:55 PM
cryptsetup with passphrase file on USB stick titopoquito Slackware 7 10-30-2007 06:37 AM
cryptsetup and device-mapper problem avallach Linux - Software 5 03-08-2007 11:38 AM
How to access the nodes under the /dev directory to access the device? Nishant Desai Programming 2 11-18-2006 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration