This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lvm_luks [2023/07/25 12:35] – wigums | lvm_luks [2024/07/23 16:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 18: | Line 18: | ||
Boot the installer. Login as ''''' | Boot the installer. Login as ''''' | ||
- | cfdisk | + | < |
What you’re doing here is setting up the partitions. Essentially, | What you’re doing here is setting up the partitions. Essentially, | ||
Line 28: | Line 28: | ||
It's a good idea for you to rewrite the entire large partition with random data. This is so computer forensics folks cannot determine where encryption starts and stops, making it harder to find out a way to circumvent the encryption and stuff. To do this, run | It's a good idea for you to rewrite the entire large partition with random data. This is so computer forensics folks cannot determine where encryption starts and stops, making it harder to find out a way to circumvent the encryption and stuff. To do this, run | ||
- | dd if=/ | + | < |
- | ''' | + | __NOTE |
=====LVM / Luks Config===== | =====LVM / Luks Config===== | ||
Line 36: | Line 36: | ||
LVM or Logical Volume Manager is used here to configure volumes inside of the large partition set up earlier (sdx2). LVM makes it easy to separate things internally and keep it all encrypted as one partition. | LVM or Logical Volume Manager is used here to configure volumes inside of the large partition set up earlier (sdx2). LVM makes it easy to separate things internally and keep it all encrypted as one partition. | ||
- | cryptsetup -s 512 -y luksFormat /dev/sdx2 | + | < |
Type ''''' | Type ''''' | ||
Line 42: | Line 42: | ||
Basically this is setting up luks encryption on /dev/sdx2. | Basically this is setting up luks encryption on /dev/sdx2. | ||
- | cryptsetup luksOpen /dev/sdx2 slackcrypt | + | < |
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later. | pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later. | ||
- | pvcreate / | + | < |
This creates the volume group “cryptvg”. | This creates the volume group “cryptvg”. | ||
- | vgcreate cryptvg / | + | < |
Create three internal logical volumes, ''''' | Create three internal logical volumes, ''''' | ||
- | lvcreate -L 20G -n root cryptvg | + | < |
- | lvcreate -L 2G -n swap cryptvg | + | < |
- | lvcreate -l 100%FREE -n home cryptvg | + | < |
Line 65: | Line 65: | ||
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not | Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not | ||
- | vgscan --mknodes | + | < |
- | vgchange -ay | + | < |
make sure the slackware installer can detect the swap partition | make sure the slackware installer can detect the swap partition | ||
- | mkswap / | + | < |
- | ''' | + | =====Slack Setup and Installation===== |
Run the slackware installer | Run the slackware installer | ||
- | setup | + | < |
the installer will walk you through it from here. it should auto-detect the swap partition we designated | the installer will walk you through it from here. it should auto-detect the swap partition we designated | ||
Line 90: | Line 90: | ||
Now simply install slackware as you normally would until you get to | Now simply install slackware as you normally would until you get to | ||
- | ''' | + | =====Install LILO===== |
To install the bootloader Lilo select ''''' | To install the bootloader Lilo select ''''' | ||
Line 101: | Line 101: | ||
Eit the installer and select ''''' | Eit the installer and select ''''' | ||
- | ''' | + | =====Creating an initrd===== |
Now we have to fix lilo because of our encryption scheme. | Now we have to fix lilo because of our encryption scheme. | ||
- | chroot /mnt | + | < |
The simple explanation for this command is that you basically just entered the installed system, which is mounted at /mnt. Now you can work on things that are installed on the system. | The simple explanation for this command is that you basically just entered the installed system, which is mounted at /mnt. Now you can work on things that are installed on the system. | ||
Line 111: | Line 111: | ||
The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available. The initrd is bound to the kernel and loaded as part of the kernel boot procedure. to create an initrd run | The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available. The initrd is bound to the kernel and loaded as part of the kernel boot procedure. to create an initrd run | ||
- | / | + | < |
it will look similar to this | it will look similar to this | ||
Line 123: | Line 123: | ||
If you need to know what kernel you just installed try | If you need to know what kernel you just installed try | ||
- | uname -a | + | < |
- | ''' | + | =====Fixing LILO===== |
Next, you have to edit lilo’s configuration file and point it to the correct places so it knows what to boot with. Don’t forget the initrd line here. | Next, you have to edit lilo’s configuration file and point it to the correct places so it knows what to boot with. Don’t forget the initrd line here. | ||
(use your preferred editor) | (use your preferred editor) | ||
- | | + | < |
Edit the pertinent parts to look like this: | Edit the pertinent parts to look like this: | ||
- | image = / | + | < |
| | ||
root = / | root = / | ||
label = Slackware | label = Slackware | ||
- | | + | |
Above that, there’s an “append” line. Edit it to look something like this: | Above that, there’s an “append” line. Edit it to look something like this: | ||
Line 148: | Line 148: | ||
Run | Run | ||
- | lilo -v | + | < |
You may get an error or two from lilo, but you can usually ignore these. | You may get an error or two from lilo, but you can usually ignore these. | ||
type | type | ||
- | exit | + | < |
to leave the chroot and then | to leave the chroot and then | ||
- | reboot | + | < |
Line 160: | Line 160: | ||
- | cryptsetup luksOpen /dev/sdx2 slackcrypt | + | < |
| | ||
| | ||
Line 170: | Line 170: | ||
mount -o bind /sys /mnt/sys | mount -o bind /sys /mnt/sys | ||
mount -o bind /dev /mnt/dev | mount -o bind /dev /mnt/dev | ||
- | | + | |