LinuxQuestions.org
Help answer threads with 0 replies.
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 01-07-2010, 12:22 PM   #1
Do7AN
LQ Newbie
 
Registered: Nov 2006
Location: philadelphia, PA
Distribution: Slackware current
Posts: 27

Rep: Reputation: 15
Need to encrypt entire hard drive


Work as decided that all laptops must be encrypted. Most laptop have Windows installed and I would venture to say that I'm the only linux user in the company. Work has a solution for Windows but if I want to continue to run Slackware I need to find an encryption solution.

So, I looking to find out what my options are for encryption and I want to make sure that I know all the options. I have read the encryption information in README_CRYPT.TXT, but I already have Slackware installed. Is there any easy way to encrypt the entire drive with Slackware already installed? Can I backup or create an image my entire hard drive and then encrypt and reload the backup image after encryption?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-07-2010, 12:37 PM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
If you've got some unallocated space on your disk that you can create an encrypted partition on alongside your existing one you could potentially copy things over, but it's going to be a lot of messing. IMO, you're better off just backing up your user data (/home etc.) and then doing a fresh install following the advice in the README_CRYPT.TXT file.

I don't believe there are any easy options.
 
Old 01-07-2010, 03:42 PM   #3
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
I think this would work with a little creativity (did not actually try this):

Attach a second disk to your laptop, boot the Slackware DVD or CD,

Copy the complete content of the original disk to the external disk (use "cp -a"... or "tar" if you know how... just make sure the same filesystem is used for the external disk),

Repartition the internal disk, creating a small partition to be used for an unencrypted /boot

Create a filesystem (ext2 is best) on the small partition you'll be using for /boot

Encrypt your new root partition using cryptsetup (read the README_CRYPT.TXT),

Unlock the encrypted volume, and mount it under /mnt

Create directory /mnt/boot

Mount the small boot partition under /mnt/boot

Copy your data back to the intermal disk

Update /mnt/etc/fstab so that the device used for '/' is the actual mapped device name for the encrypted partition (usually /dev/mapper/something)

Create an initrd: first chroot into your Slackware installation
Code:
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
chroot /mnt
Once you've chrooted into the Slackware filesystem, run
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
which will show you what command you'll have to run to create your initrd (you may want to add additional kernel modules if you have a USB keyboard, see CHANGES_AND_HINTS.TXT on the Slackware DVD) as well as the lines you have to add to /etc/lilo.conf

After you have created the initrd and modified /etc/lilo.conf you will have to run "lilo" while still inside the chroot

Lilo will show some warnings, ignore them. Errors would be bad.

Exit the chroot (type "exit") and then reboot (Ctrl-Alt-Delete)

Your encrypted Slackware should boot now.

Eric
 
2 members found this post helpful.
Old 01-10-2010, 11:41 PM   #4
Do7AN
LQ Newbie
 
Registered: Nov 2006
Location: philadelphia, PA
Distribution: Slackware current
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for the feedback. I think I will backup my data and do a fresh install, but before I do I may try your suggestion, Alien Bob.
 
  


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
Copy entire hard drive SuperDude123 Linux - Newbie 5 09-01-2009 04:05 AM
Need some advice on backing up entire hard drive. Zombie13 Linux - General 2 04-07-2008 02:11 PM
Wiped Entire Hard Drive and Want To Install Slackware Midnyt Slackware 3 09-04-2006 05:58 PM
Windows XP hogs entire 40 GB Hard Drive with one Partition jedi_zach Linux - General 2 02-09-2004 12:29 AM
Mirroring entire Hard drive guanyu Linux - General 7 03-04-2003 08:39 PM

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

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