Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 01-07-2010, 12:22 PM   #1
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
Senior Member
Registered: May 2008
Posts: 4,032
Blog Entries: 1

Rep: Reputation: 1444Reputation: 1444Reputation: 1444Reputation: 1444Reputation: 1444Reputation: 1444Reputation: 1444Reputation: 1444Reputation: 1444Reputation: 1444
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: 6,314

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

2 members found this post helpful.
Old 01-10-2010, 11:41 PM   #4
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.


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 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

All times are GMT -5. The time now is 10:11 AM.

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