User Tools

Site Tools


computing:slackware

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:slackware [2019/06/17 06:54] oemb1905computing:slackware [2021/10/27 23:16] (current) oemb1905
Line 7: Line 7:
 ------------------------------------------- -------------------------------------------
  
-First, let's install Slackware using full disk encryption using Luks, along with LVM.  This is based on the Grey Seeker tutorial, and is the officially supported full disk encryption as documented here [[http://slackware.cs.utah.edu/pub/slackware/slackware64-14.1/README_CRYPT.TXT|Slackware Encryption]].  First, lets create our partitions using gdisk:+First, let's install Slackware using full disk encryption using Luks, along with LVM.  This is my attempt to document and write out Grey Seeker'tutorial, and is the officially supported full disk encryption as documented here [[http://slackware.cs.utah.edu/pub/slackware/slackware64-14.1/README_CRYPT.TXT|Slackware Encryption]].  First, lets create our partitions using gdisk:
  
   gdisk /dev/sda   gdisk /dev/sda
Line 22: Line 22:
  
   <w, Y, enter>   <w, Y, enter>
-  +  450
 Now, it is time to create your crypt using ''cryptsetup'': Now, it is time to create your crypt using ''cryptsetup'':
  
Line 46: Line 46:
 Now, let's now begin the installation by running ''setup'' Now, use the installer and assign all of the proper partitions for the installer.  Begin by adding swap, as that will prompt you to find the others automatically (as opposed to using Target).  Once it adds swap, and adds the entry ''/etc/fstab'' it is now time, to individually select the lvs created above. First up, select ''/dev/slack/root'' for the root partition and then choose the file system ext4.  Now, next, let's select the boot partition which is ''/dev/sda2'' and format the file system as ext2 using ''/boot'' as the mount point.  Lastly, it is time to select the home partition, so in this case, using a fast journaling file system like xfs is preferable and then specify ''/home'' as the mount point.  Enter continue at the prompt now, and verify that you configured the partiions correctly by comparing the ''/etc/fstab'' entry that appears to this: Now, let's now begin the installation by running ''setup'' Now, use the installer and assign all of the proper partitions for the installer.  Begin by adding swap, as that will prompt you to find the others automatically (as opposed to using Target).  Once it adds swap, and adds the entry ''/etc/fstab'' it is now time, to individually select the lvs created above. First up, select ''/dev/slack/root'' for the root partition and then choose the file system ext4.  Now, next, let's select the boot partition which is ''/dev/sda2'' and format the file system as ext2 using ''/boot'' as the mount point.  Lastly, it is time to select the home partition, so in this case, using a fast journaling file system like xfs is preferable and then specify ''/home'' as the mount point.  Enter continue at the prompt now, and verify that you configured the partiions correctly by comparing the ''/etc/fstab'' entry that appears to this:
  
-{{ :computing:fstab.png?500 |}} +{{ :computing:fstab.png?450 |}} 
  
 As long as that all came out okay, now we can proceed with installing Slackware - enter whichever media you used to boot into the live slackware instance, in my case, it was USB.  Now, it is time to install packages.  I recommend the full installation so you have what you need and can start working.  Now, once the OS completes its installation, let's skip the USB bootstick option, and select the "simple" lilo install (it will not install properly, and we will fix it later).  Do not pass extra kernel arguments, do defaults on the rest, and then select "install to MBR" when you get to the option to choose where to install the lilo bootloader.  Go ahead and configure the network, choose your hostname, etc., and unless you are in need of binding to a domain, enter "local" on the domain entry.  Next, you can choose your network configuration.  I have found that Slackware's implementation of Network Manager is jenky and fails on many WPA2 networks, so I choose DHCP, and then I use the commands at the beginning of this tutorial for each network I visit with this workstation.  You will now be prompted to select services that start at boot, which I leave as default since any of these can be activate later, and unless you know you need one, the UNIX rule is to not run the service.  After you select the services, you get to choose the hardware clock time, the default DE.  I choose XFCE, and then lastly, you specify the root password, and then press enter to get back the ncurses installer, and lastly select ok, **but then do not reboot**.  You know need to specify a compatible kernel to use with luks and lvm, and then use ''mkinitrd'' to activate it, and then lastly edit your lilo.conf, and then unmount the partitions and reboot.  Here is how to do that: As long as that all came out okay, now we can proceed with installing Slackware - enter whichever media you used to boot into the live slackware instance, in my case, it was USB.  Now, it is time to install packages.  I recommend the full installation so you have what you need and can start working.  Now, once the OS completes its installation, let's skip the USB bootstick option, and select the "simple" lilo install (it will not install properly, and we will fix it later).  Do not pass extra kernel arguments, do defaults on the rest, and then select "install to MBR" when you get to the option to choose where to install the lilo bootloader.  Go ahead and configure the network, choose your hostname, etc., and unless you are in need of binding to a domain, enter "local" on the domain entry.  Next, you can choose your network configuration.  I have found that Slackware's implementation of Network Manager is jenky and fails on many WPA2 networks, so I choose DHCP, and then I use the commands at the beginning of this tutorial for each network I visit with this workstation.  You will now be prompted to select services that start at boot, which I leave as default since any of these can be activate later, and unless you know you need one, the UNIX rule is to not run the service.  After you select the services, you get to choose the hardware clock time, the default DE.  I choose XFCE, and then lastly, you specify the root password, and then press enter to get back the ncurses installer, and lastly select ok, **but then do not reboot**.  You know need to specify a compatible kernel to use with luks and lvm, and then use ''mkinitrd'' to activate it, and then lastly edit your lilo.conf, and then unmount the partitions and reboot.  Here is how to do that:
Line 64: Line 64:
 If you did not run this correctly, you will get quick output that obviously looks wrong.  If you did it correctly, you will get this output: If you did not run this correctly, you will get quick output that obviously looks wrong.  If you did it correctly, you will get this output:
  
-{{ :computing:mkinitrd.png?200 |}}+{{ :computing:mkinitrd.png?600 |}}
  
 Now, let's maually verify that the command you just ran in fact created the initrd.gz as follows: Now, let's maually verify that the command you just ran in fact created the initrd.gz as follows:
Line 77: Line 77:
 You may optionally uncomment ''#compact ...'' to speed up the boot time by bypassing the bios check, but the main parts you need to change are the boot configuration at the bottom of the file.  Here is how the configuration originally looks: You may optionally uncomment ''#compact ...'' to speed up the boot time by bypassing the bios check, but the main parts you need to change are the boot configuration at the bottom of the file.  Here is how the configuration originally looks:
  
-{{ :computing:liloog.png?200 |}}+{{ :computing:liloog.png?175 |}}
  
 Here is how it should look after you have adjusted the configuration to reflect the changes you made with mkinitrd.  Slackware's luks and lvm requires the generic kernel (not the so-called huge ones), and you also need to introduce the initrd.  Now, change the label, as long as it is unique and different from the previous one, giving us something like: Here is how it should look after you have adjusted the configuration to reflect the changes you made with mkinitrd.  Slackware's luks and lvm requires the generic kernel (not the so-called huge ones), and you also need to introduce the initrd.  Now, change the label, as long as it is unique and different from the previous one, giving us something like:
Line 126: Line 126:
 To get your psk key, run: To get your psk key, run:
  
-  wpa_passphrase ssid 'passphrase'+  wpa_passphrase <ssidname> 'passphrase'
  
 Then, edit the /etc/rc.d/rc.inet1.conf as follows: Then, edit the /etc/rc.d/rc.inet1.conf as follows:
  
-  IFNAME[1]="ath0"+  IFNAME[1]="wlan0"
   IPADDR[1]=""   IPADDR[1]=""
   NETMASK[1]=""   NETMASK[1]=""
Line 173: Line 173:
   slackpkg clean-system   slackpkg clean-system
      
-Set up a crypt for sensitive data:+Set up a crypt for sensitive d200ata:
  
   cryptsetup luksFormat /dev/sdaX   cryptsetup luksFormat /dev/sdaX
Line 187: Line 187:
   mount /dev/mapper/vault /mnt/vault     mount /dev/mapper/vault /mnt/vault  
  
 +Or, install pam mount and let it handle mounting like so:
 +
 +  sudo nano /etc/security/pam_mount.conf.xml
 +  
 +Under volume definitions, enter the same volume, but use the block ID instead of the device lettering (which can change):
  
- --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2019/06/16 23:48//+  <volume user="user" fstype="crypt" path="/dev/disk/by-uuid/97627555-91xd-4293-a5vg-6xc211gd9945" mountpoint="/mnt/vault" options="noatime,exec,fsck,nodev,nosuid"/>
  
 + --- //[[jonathan@haacksnetworking.com|oemb1905]] 2021/10/27 17:13//
computing/slackware.1560754451.txt.gz · Last modified: 2019/06/17 06:54 by oemb1905