LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-30-2004, 06:55 AM   #1
bungalowbill
LQ Newbie
 
Registered: Apr 2004
Distribution: gentoo
Posts: 3

Rep: Reputation: 0
fscking an encrypted partition


Hi all,

I have set up a while back an encrypted reiserfs /home partition which is running just fine using cryptoloop. My only problem is that I am unable to fsck this partition, even if I remount it read-only. Reiserfsck complains that it cannot find the reiserfs superblock. I can understand why this would happen when the partition isn't mounted, but why doesn't it work when the password has been entered either?

I would really like to be able to check the partition, because my computer tends to freeze occasionally (buggy ati driver...)

Thanks for your time!
 
Old 04-30-2004, 08:15 AM   #2
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
You could try unmounting your /home partition and then use losetup manually to bring it up. When you have /home mounted normally you can use losetup to find out what encryption is being used. Try something like:

# losetup /dev/loopN

For my setup for example the output looks like:

# losetup /dev/loop0
/dev/loop0: [0006]:452 (/dev/hda6) offset 0, AES128 encryption

The loop device may be different for your configuration. I do the following to check my /home:

# losetup -e AES128 /dev/loop0 /dev/hda6
Password:
# fsck.ext3 -f /dev/loop0

I don't mount the loop device on /home because fsck seems to complain when you do that even if it's read-only. Since you're using reiserfs then you'd use "reiserfsck" instead of "fsck.ext3". After you check the filesystem remember to detach the loop device with something like:

# losetup -d /dev/loop0

In my case the reason that "fsck" and even "dump" get confused is because of a trick that my system (Mandrake) uses when it mounts an encrypted filesystem. I found that the information written to /etc/mtab wasn't strictly correct and that filesystem tools seemed to be using that instead of /proc/mounts.

EDIT:
Fixed fsck line to be /dev/loop0.

Last edited by hazza; 04-30-2004 at 09:03 AM.
 
Old 04-30-2004, 08:46 AM   #3
bungalowbill
LQ Newbie
 
Registered: Apr 2004
Distribution: gentoo
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your quick reply.

It worked without a hitch (with the tiny exception that I had to fsck /dev/loop0 not /dev/hda5 or it wouldn't find the superblock there either).

Thanks!
 
Old 04-30-2004, 09:04 AM   #4
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
I meant to write "fsck.ext3 -f /dev/loop0" but wrote the partition device instead by mistake. I've fixed it now for future reference.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypted ReiserFS partition corrupted... What now? nitroid Linux - General 1 07-31-2005 03:51 PM
Encrypted partition does not mount on boot applewax Suse/Novell 2 01-06-2005 11:31 AM
Step by step newbie guide for encrypted /home partition? eldergod Slackware 2 11-12-2004 06:49 PM
Encrypted FS Partition Scheme? DJ Cacophony Linux - Newbie 1 10-01-2004 04:52 PM
Encrypted partition? hjles Slackware 1 01-25-2003 03:49 PM


All times are GMT -5. The time now is 08:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration