LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-29-2005, 02:48 AM   #1
dragoncity99
Member
 
Registered: Dec 2004
Location: Malaysia
Distribution: Redhat/Fedora Core, Slackware, Ubuntu, Knoppix, Gentoo, SUSE, Ubuntu
Posts: 40

Rep: Reputation: 15
Encrypted Root Filesystem (dm-crypt/loopAES +ext3fs) - Problem


Hi everyone,

I'm trying to install an encrypted root filesystem originally using loopAES with the following tools:

1. Slackware 10.1
2. Kernel 2.6.12.3
3. util-linux-2.12q.tar.bz2
4. loop-AES-v3.0d.tar.bz2

However, i found that, it reboots when my ramdisk trying to run "init" command:


If i run the program manually myself on the console:
exec /usr/bin/chroot current-parition new-partition

i.e. : exec /usr/bin/chroot . loader

It shows error:
/usr/bin/chroot: cannot run command 'loader/': Permission denied


When i switched to the next screen. The error shows:
-sh: /dev/null: Read-only file system
stderr is not a tty - where are you?

The ramdisk im using busybox 1.0


I believe that it could be a bug in loopAES, therefore, i reimplement this encrypted root file system with dm-crypt which is readily available in kernel 2.6.12.3 with the following tools:

1. cryptsetup-0.1.tar.bz2
2. device-mapper.1.01.03.tgz
3. hashalot-0.3.tar.gz
4. busybox 1.0

Any thing that i could have missed out?

New update:
==========
It seems like the problem lies int the /sbin/init belonging to my real root filesystem. Once it's executed, it seems to do some processing 4 a while and KAPOOF-->
My system restarts AFTER MOUNTING /dev/loop0 to /mnt directory.

Kind regards,
dragoncity99

Last edited by dragoncity99; 07-29-2005 at 05:56 AM.
 
Old 07-29-2005, 08:33 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
It just reboots with no error messages during ramdisk execution?
 
Old 07-31-2005, 07:27 AM   #3
dragoncity99
Member
 
Registered: Dec 2004
Location: Malaysia
Distribution: Redhat/Fedora Core, Slackware, Ubuntu, Knoppix, Gentoo, SUSE, Ubuntu
Posts: 40

Original Poster
Rep: Reputation: 15
Yes , it just reboots.

Guys, i think this is obviously the patch(loop-AES-v3.0d.tar.bz2) i tried out is problematic on kernel 2.6.12.3

I tested the loop-AES-v3.0b.tar.bz2 with Kernel 2.6.10. These works perfectly fine. No a scratch of problem at all. Hmm, how am i gonna deal wiff this kernel 2.6.12.3 encryption....

Last edited by dragoncity99; 07-31-2005 at 10:20 PM.
 
Old 07-31-2005, 11:29 PM   #4
dragoncity99
Member
 
Registered: Dec 2004
Location: Malaysia
Distribution: Redhat/Fedora Core, Slackware, Ubuntu, Knoppix, Gentoo, SUSE, Ubuntu
Posts: 40

Original Poster
Rep: Reputation: 15
Hahaha, boys and girls, ladies and gents,


I found the answer the problem. The problem actually lies in the encrypted root filesystems' /dev directory.

When i run cp -avx / /mnt/efs

This command copys all the files except the block devices files. That's why it reboots. This is becoz the kernel can't file the block devices to load. How stupid of me.

Now Kernel 2.4.29, 2.6.10, 2.6.12. 2.6.12.3 is all capable of doing loopAES as well as dm-crypt + LVM2.

Awesome man....
 
Old 07-31-2005, 11:39 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Very nicely done. cp doesn't handle devs well. Of course, one really ought to be using udev anyway, so the only real devs you need are /dev/null and /dev/console (needed for initial kernel boot before udevd is started)
 
Old 08-01-2005, 12:07 AM   #6
dragoncity99
Member
 
Registered: Dec 2004
Location: Malaysia
Distribution: Redhat/Fedora Core, Slackware, Ubuntu, Knoppix, Gentoo, SUSE, Ubuntu
Posts: 40

Original Poster
Rep: Reputation: 15
Please tell me more bout this udev Matir. Im interested

Kind Regards,
dragoncity99
 
Old 08-01-2005, 12:14 AM   #7
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Heh. udev is awesome. I have udev setup so that each of my jumpdrives ALWAYS gets the same symlink in /dev. For example, my blue jumpdrive can ALWAYS be called /dev/jumpdrives/blue. This makes it much easier to mount them in predictable places, and keep fstab simple. Check out http://www.kernel.org/pub/linux/util...tplug/udev-FAQ for more info.
 
  


Reply



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
dm-crypt: Moving Encrypted Filesystem hamish Linux - Security 2 07-21-2005 02:57 AM
encrypted filesystem done -now what? randomx Linux - Security 1 04-27-2005 06:13 AM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
dm-crypt encrypted filesystem on a CD-ROM qwijibow Linux - General 0 09-14-2004 02:11 PM
8.1 install: encrypted root ext3 filesystem Snailer Slackware 1 10-01-2002 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:18 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