LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-12-2008, 08:35 PM   #1
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
Setting up an encrypted fs


Hi all,
I was reading the post about encrypting a file system and since i had just recently killed my poor pipe smoking penguin i decided to try it. following the instructions on http://slackware.osuosl.org/slackwar...ADME_CRYPT.TXT i found my self booting into nothing but this "L 99 99 99 99 99 99 99 99... for about 50 more" i'm not quite sure where i went wrong, the only thing i can think of is that i have a bad disc and lilo is the part that got corrupted. any ideas? I was encrypting the whole root fs.

/dev/hda1 = /boot approx 250meg
/dev/hda2 = / 59.5gb
/dev/hda3 = swap approx 250meg

Thanks in advance.
 
Old 02-13-2008, 03:21 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
There are two things that need to be corrected, and you will find them in the URL mentioned at the bottom of that file, located here.

I've set this up several times, with and without LVM, if you need more help.

Last edited by Bruce Hill; 02-13-2008 at 03:28 AM.
 
Old 02-13-2008, 06:32 AM   #3
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
Ah i will give it a try. Thanks!
 
Old 02-14-2008, 10:22 AM   #4
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
Well it still doesn't work, using the new install method with the extra bit at the end i am still getting the error on boot "L 99 99 99 99 99 99..." I am starting to think that this is a corrupted Lilo. just incase however this is what i did.
1. boot huge.s (i've had problems with the smp)
2. cfdisk
3. make a 100mb linux partition /dev/hda1
4. make a 59.5gb Linux partition /dev/hda2
5. make a 400mb Swap parition /dev/hda3
6. write the partition table
7. cryptsetup -s 256 -y luksFormat /dev/hda2
8. cryptsetup luksDump /dev/hda2 (this is mainly to confirm the info)
9. cryptsetup luksOpen /dev/hda2 cryptroot
10. setup
11. Set my root to /dev/mapper/cryptroot ext3
12. set my /boot to /dev/hda1 ext3
13. install slackware
14. make my lilo.conf file
15. install to the root of /dev/mapper/cryptroot
14. mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt
15. mkinitrd -c -k 2.6.21.5 -m ext3 -f ext3 -r cryptroot -C /dev/hda2 -L
16. edit the lilo.conf file
17. point the boot to /dev/hda1
18. add the initrd = initrd.gz to the linux part
19. run 'lilo'
20. reboot
 
Old 02-14-2008, 12:19 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Your mistake is probably that you do not have any OS installed in the MBR of your computer.
The README_CRYPT.TXT is not complete in it's coverage of installation instructions for LILO. MOre information is found on the 'errata' page - you can find its URL on the bottom of the README_CRYPT.TXT.

Eric
 
Old 02-14-2008, 01:33 PM   #6
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
I've been having trouble with this myself,
these are the steps that finally worked.

cfdisk:
hda1 100MB, hda2 29 GB, hda3 approx. 1 GB for swap.
# cryptsetup -s 256 -y luksFormat /dev/hda2
# cryptsetup luksOpen /dev/hda2 cryptroot
# setup
select / = /dev/mapper/cryptroot (formatted to ext3)
select /boot = /dev/hda1 (also ext3)
install Slackware.

lilo:
No chainloading going on,
so lilo will be installed to the MBR:
boot = /dev/hda (NOT /dev/hda1)
root = /dev/mapper/cryptroot

finish install.

# echo "cryptroot /dev/hda2" > /mnt/etc/crypttab
(edit: You don't need this. By the time /etc/crypttab is available,
the root partition is already being decrypted.
If other partitions need decrypting, the passphrase (or path to a key-file)
can be placed in /etc/crypttab. Keeps you from entering multiple passwords.
Unless you think this compromises security.)


# mount -o bind /proc /mnt/proc
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev
error here, so: # cp -a /dev/mapper /mnt/dev
# chroot /mnt

# mkinitrd -c -k 2.6.21.5-smp -m ext3 -f ext3 -r cryptroot -C /dev/hda2 -L

# vim /etc/lilo.conf
add initrd = /boot/initrd.gz
This is the only change to make!

save, exit.
# lilo
reboot.

Last edited by wadsworth; 02-15-2008 at 08:44 PM.
 
Old 02-14-2008, 03:22 PM   #7
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
ok thanks for the walkthrough wadsworth, i will give it a try and report back.
 
Old 02-14-2008, 10:07 PM   #8
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
Aha it works! Thank you very much wadsworth!
 
Old 02-15-2008, 08:59 PM   #9
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
Glad its working. But one of those commands wasn't necessary.
You won't need an /etc/crypttab if only the root partition is encrypted.
Doesn't do any harm though.
I stuck a note in post #6.
 
  


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
Setting up encrypted root partition yukon65 Slackware 3 07-18-2007 08:51 AM
encrypted fs hussam Linux - Security 3 05-14-2006 12:49 AM
Setting up encrypted filesystem zahoo Linux - Software 2 06-27-2005 01:17 PM
encrypted IM? jbeiter Linux - Software 2 12-01-2004 02:41 PM
Encrypted FS? linuxtesting2 Linux - Security 4 04-05-2004 04:08 PM

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

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