https://www.slackwiki.com/api.php?action=feedcontributions&user=Wigums&feedformat=atomSlackWiki - User contributions [en]2024-03-29T12:57:14ZUser contributionsMediaWiki 1.40.0https://www.slackwiki.com/index.php?title=Jellyfin&diff=3288Jellyfin2022-01-01T15:35:29Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
<br />
''' jellyfin '''<br />
<br />
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support.<br />
<br />
<br />
''' Installation Process '''<br />
<br />
this wiki assumes you are logged in as root<br />
<br />
Create a directory in /opt for jellyfin and its files, and enter that directory.<br />
<br />
mkdir /opt/jellyfin<br />
<br />
cd /opt/jellyfin<br />
<br />
<br />
Download the latest generic Linux build from the release page. The generic Linux build ends with "linux-amd64.tar.gz". The rest of these instructions assume version 10.4.3 is being installed (i.e. jellyfin_10.4.3_linux-amd64.tar.gz). Download the generic build, then extract the archive:<br />
<br />
<br />
wget https://github.com/jellyfin/jellyfin/releases/download/v10.4.3/jellyfin_10.4.3_linux-amd64.tar.gz<br />
tar xvzf jellyfin_10.4.3_linux-amd64.tar.gz<br />
<br />
<br />
Create a symbolic link to the Jellyfin 10.4.3 directory. This allows an upgrade by repeating the above steps and enabling it by simply re-creating the symbolic link to the new version.<br />
<br />
<br />
ln -s jellyfin_10.4.3 jellyfin<br />
<br />
Create four sub-directories for Jellyfin data.<br />
<br />
<br />
mkdir data cache config log<br />
<br />
Due to the number of command line options that must be passed, it is easiest to create a small script to run Jellyfin.<br />
<br />
nano jellyfin.sh<br />
<br />
<br />
Then paste the following commands and modify as needed. (i didnt have to modify anything)<br />
<br />
#!/bin/bash<br />
JELLYFINDIR="/opt/jellyfin"<br />
FFMPEGDIR="/usr/share/jellyfin-ffmpeg"<br />
$JELLYFINDIR/jellyfin/jellyfin \<br />
-d $JELLYFINDIR/data \<br />
-C $JELLYFINDIR/cache \<br />
-c $JELLYFINDIR/config \<br />
-l $JELLYFINDIR/log \<br />
--ffmpeg $FFMPEGDIR/ffmpeg<br />
<br />
<br />
Assuming you desire Jellyfin to run as a non-root user, chmod all files and directories to your normal login user and group. Also make the startup script above executable. (i run it as root. if you choose to run it as root omit the chown command)<br />
<br />
chown -R user:group *<br />
chmod u+x jellyfin.sh<br />
<br />
<br />
Finally you can run it. You will see lots of log information when run, this is normal. Setup is as usual in the web browser.<br />
<br />
<br />
./jellyfin.sh &<br />
<br />
in your browser go to<br />
<br />
localhost:8096<br />
<br />
and set up as you wish</div>Wigumshttps://www.slackwiki.com/index.php?title=Jellyfin&diff=3287Jellyfin2022-01-01T15:34:02Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
<br />
''' jellyfin '''<br />
<br />
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support.<br />
<br />
<br />
''' Installation Process '''<br />
<br />
Create a directory in /opt for jellyfin and its files, and enter that directory.<br />
<br />
mkdir /opt/jellyfin<br />
<br />
cd /opt/jellyfin<br />
<br />
<br />
Download the latest generic Linux build from the release page. The generic Linux build ends with "linux-amd64.tar.gz". The rest of these instructions assume version 10.4.3 is being installed (i.e. jellyfin_10.4.3_linux-amd64.tar.gz). Download the generic build, then extract the archive:<br />
<br />
<br />
wget https://github.com/jellyfin/jellyfin/releases/download/v10.4.3/jellyfin_10.4.3_linux-amd64.tar.gz<br />
tar xvzf jellyfin_10.4.3_linux-amd64.tar.gz<br />
<br />
<br />
Create a symbolic link to the Jellyfin 10.4.3 directory. This allows an upgrade by repeating the above steps and enabling it by simply re-creating the symbolic link to the new version.<br />
<br />
<br />
ln -s jellyfin_10.4.3 jellyfin<br />
<br />
Create four sub-directories for Jellyfin data.<br />
<br />
<br />
mkdir data cache config log<br />
<br />
Due to the number of command line options that must be passed, it is easiest to create a small script to run Jellyfin.<br />
<br />
nano jellyfin.sh<br />
<br />
<br />
Then paste the following commands and modify as needed. (i didnt have to modify anything)<br />
<br />
#!/bin/bash<br />
JELLYFINDIR="/opt/jellyfin"<br />
FFMPEGDIR="/usr/share/jellyfin-ffmpeg"<br />
$JELLYFINDIR/jellyfin/jellyfin \<br />
-d $JELLYFINDIR/data \<br />
-C $JELLYFINDIR/cache \<br />
-c $JELLYFINDIR/config \<br />
-l $JELLYFINDIR/log \<br />
--ffmpeg $FFMPEGDIR/ffmpeg<br />
<br />
<br />
Assuming you desire Jellyfin to run as a non-root user, chmod all files and directories to your normal login user and group. Also make the startup script above executable. (i run it as root. if you choose to run it as root omit the chown command)<br />
<br />
chown -R user:group *<br />
chmod u+x jellyfin.sh<br />
<br />
<br />
Finally you can run it. You will see lots of log information when run, this is normal. Setup is as usual in the web browser.<br />
<br />
<br />
./jellyfin.sh &<br />
<br />
in your browser go to<br />
<br />
localhost:8096<br />
<br />
and set up as you wish</div>Wigumshttps://www.slackwiki.com/index.php?title=Jellyfin&diff=3286Jellyfin2022-01-01T15:30:42Z<p>Wigums: Created page with "''' jellyfin ''' Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. ''' Installation Process ''' Create a directory in /opt for jellyfin and its files, and en..."</p>
<hr />
<div>''' jellyfin '''<br />
<br />
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support.<br />
<br />
<br />
''' Installation Process '''<br />
<br />
Create a directory in /opt for jellyfin and its files, and enter that directory.<br />
<br />
mkdir /opt/jellyfin<br />
<br />
cd /opt/jellyfin<br />
<br />
<br />
Download the latest generic Linux build from the release page. The generic Linux build ends with "linux-amd64.tar.gz". The rest of these instructions assume version 10.4.3 is being installed (i.e. jellyfin_10.4.3_linux-amd64.tar.gz). Download the generic build, then extract the archive:<br />
<br />
<br />
wget https://github.com/jellyfin/jellyfin/releases/download/v10.4.3/jellyfin_10.4.3_linux-amd64.tar.gz<br />
tar xvzf jellyfin_10.4.3_linux-amd64.tar.gz<br />
<br />
<br />
Create a symbolic link to the Jellyfin 10.4.3 directory. This allows an upgrade by repeating the above steps and enabling it by simply re-creating the symbolic link to the new version.<br />
<br />
<br />
ln -s jellyfin_10.4.3 jellyfin<br />
<br />
Create four sub-directories for Jellyfin data.<br />
<br />
<br />
mkdir data cache config log<br />
<br />
Due to the number of command line options that must be passed, it is easiest to create a small script to run Jellyfin.<br />
<br />
nano jellyfin.sh<br />
<br />
<br />
Then paste the following commands and modify as needed. (i didnt have to modify anything)<br />
<br />
#!/bin/bash<br />
JELLYFINDIR="/opt/jellyfin"<br />
FFMPEGDIR="/usr/share/jellyfin-ffmpeg"<br />
$JELLYFINDIR/jellyfin/jellyfin \<br />
-d $JELLYFINDIR/data \<br />
-C $JELLYFINDIR/cache \<br />
-c $JELLYFINDIR/config \<br />
-l $JELLYFINDIR/log \<br />
--ffmpeg $FFMPEGDIR/ffmpeg<br />
<br />
<br />
Assuming you desire Jellyfin to run as a non-root user, chmod all files and directories to your normal login user and group. Also make the startup script above executable. (i run it as root. if you choose to run it as root omit the chown command)<br />
<br />
chown -R user:group *<br />
chmod u+x jellyfin.sh<br />
<br />
<br />
Finally you can run it. You will see lots of log information when run, this is normal. Setup is as usual in the web browser.<br />
<br />
<br />
./jellyfin.sh &<br />
<br />
in your browser go to<br />
<br />
localhost:8096<br />
<br />
and set up as you wish</div>Wigumshttps://www.slackwiki.com/index.php?title=Grub&diff=3282Grub2021-09-25T18:18:55Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
<br />
'''installing grub on sackware'''<br />
<br />
grub-install /dev/XXX<br />
<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
after updating kernel dont forget to run<br />
<br />
grub-mkconfig -o /boot/grub/grub.cfg</div>Wigumshttps://www.slackwiki.com/index.php?title=Grub&diff=3281Grub2021-09-25T18:13:26Z<p>Wigums: Created page with "'''installing grub on sackware''' grub-install /dev/XXX grub-mkconfig -o /boot/grub/grub.cfg after updating kernel dont forget to run grub-mkconfig -o /boot/grub/..."</p>
<hr />
<div>'''installing grub on sackware'''<br />
<br />
grub-install /dev/XXX<br />
<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
after updating kernel dont forget to run<br />
<br />
grub-mkconfig -o /boot/grub/grub.cfg</div>Wigumshttps://www.slackwiki.com/index.php?title=Icecream&diff=3219Icecream2020-02-09T16:10:59Z<p>Wigums: Created page with "Icecream was created by SUSE based on distcc. Like distcc, Icecream takes compile jobs from a build and distributes it among remote machines allowing a parallel build. But unl..."</p>
<hr />
<div>Icecream was created by SUSE based on distcc. Like distcc, Icecream takes compile jobs from a build and distributes it among remote machines allowing a parallel build. But unlike distcc, Icecream uses a central server that dynamically schedules the compile jobs to the fastest free server. This advantage pays off mostly for shared computers, if you're the only user on x machines, you have full control over them.<br />
<br />
<br />
icecream comes installed on slackware and is super easy to setup<br />
<br />
you need one master and atleast one slave but you may have many many slaves.<br />
also all your machines need to use the same domain such as .localdomain or i just use .org<br />
<br />
you need the rc.iceccd running on all machines even the master so<br />
<br />
chmod +x /etc/rc.d/rc.iceccd<br />
<br />
and make sure its running<br />
<br />
/etc.rc.d.rc.iceccd restart<br />
<br />
and on the master machine you need the scheduler running<br />
<br />
chmod +x /etc/rc.d/rc.icecc-scheduler<br />
<br />
and make sure the shceduler is running on the master machine<br />
<br />
/etc/rc.d/rc.icecc-scheduler restart<br />
<br />
<br />
now you need to set your make jobs. this is a big topic and wont be covered here. however as an example i use sbotools so in its sbotools.conf<br />
i set '''JOBS=N+1''' where N is the total number of cores across all machines. you may set MAKE -jN elsewhere<br />
<br />
thats it. now build something</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3206Reinstalling Lilo2018-11-16T14:06:08Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
'''Chroot method'''<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
''mount /dev/sdX1 /mnt'' (where /dev/sdx1 is your / partition)<br />
''mount -o bind /dev /mnt/dev''<br />
''mount -o bind /proc /mnt/proc''<br />
''mount -o bind /sys /mnt/sys''<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
''chroot /mnt /bin/bash''<br />
<br />
now simply run ''liloconfig'' and follow the prompts<br />
<br />
<br />
'''Booting your system from the installation media'''<br />
<br />
often times you can boot your system from the installation media as well<br />
simply boot the installation media and on the very first page are the following instructions<br />
<br />
<br />
In a pinch, you can boot your system from here with a command like:<br />
boot: huge.s root=/dev/sda1 rdinit= ro <br />
<br />
In the example above, /dev/sda1 is the / Linux partition.<br />
<br />
once booted run ''liloconfig''<br />
<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=LVM/Luks_Encryption&diff=3205LVM/Luks Encryption2018-11-14T20:24:22Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
'''LVM'''<br />
<br />
LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks.<br />
<br />
'''LUKS'''<br />
<br />
LUKS is the standard for Linux hard disk encryption. By providing a standard on-disk-format, it does not<br />
only facilitate compatibility among distributions, but also provides secure management of multiple user passwords.<br />
LUKS stores all necessary setup information in the partition header, enabling you to transport or migrate data seamlessly.<br />
<br />
This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/sda2) made in the first step. It also assumes you know your way around the slackware installer.<br />
Swap space setup is documented here but note its only needed if you plan to hibernate e.g. a laptop.<br />
<br />
'''Partitioning'''<br />
<br />
Boot the installer. Login as '''''root''''' and run <br />
<br />
cfdisk<br />
<br />
What you’re doing here is setting up the partitions. Essentially, we’re dividing up the hard drive into a few logical partitions so that certain things can run in certain places, and not be affected by others. In order to create a bootable encrypted drive there needs to be a small partition that is not encrypted, it’s unencrypted and readable, so the computer can use it to figure out how to start the operating system.<br />
<br />
The first partition to make is a boot partition. Delete every other existing partition (if there are any) and write (again, assuming this will be your only OS). Next, select new and create a primary partition that is relatively small, I usually do 1G (which is rather large but i often juggle multiple kernels). Select ''Beginning'', which puts the partition at the front of the disk. DO NOT forget to make the first partition bootable, otherwise the installation won’t know to use this partition to install the boot scripts and such.<br />
<br />
Next, create another partition with the remaining space. Follow the same steps, except do not make it bootable and use the rest of the available space. Just hit enter when it asks how much space to use. After you’ve done this, make sure you go down and select '''''write''''' to ensure the changes are made. Then exit cfdisk.<br />
<br />
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<br />
<br />
dd if=/dev/urandom of=/dev/sdx2<br />
<br />
'''NOTE***''' this can take quite some time.<br />
<br />
'''LVM / Luks Config'''<br />
<br />
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. <br />
<br />
cryptsetup -s 512 -y luksFormat /dev/sdx2<br />
<br />
Type '''''YES''''', then decide on a password and type it. Be careful, later on if you put stuff on the drive and you forget your password, it’s gone forever. Such is the nature of encryption. <br />
<br />
Basically this is setting up luks encryption on /dev/sdx2.<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
<br />
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later.<br />
<br />
pvcreate /dev/mapper/slackcrypt <br />
<br />
This creates the volume group “cryptvg”.<br />
<br />
vgcreate cryptvg /dev/mapper/slackcrypt<br />
<br />
Create three internal logical volumes, '''''root''''', '''''home''''', and '''''swap'''''. If you have a unique setup and prefer it a different way, just follow the same steps and size them how you want. the sizes used are example only<br />
<br />
lvcreate -L 20G -n root cryptvg<br />
<br />
lvcreate -L 2G -n swap cryptvg<br />
<br />
lvcreate -l 100%FREE -n home cryptvg<br />
<br />
<br />
These will be your '''''/root''''', '''''/home''''', and '''''/swap''''' “partitions”. You can adjust the sizes to whatever you want them to be. I use a pretty large amount of space in root because I have run out of space installing tons of programs before, but I’ve also used tiny root partitions on machines where I didn’t plan on installing much. It really depends, but if you have the extra space I’d do like 20+ just to be on the safe side. The home directory gets everything that’s not allocated to swap or root.<br />
<br />
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not<br />
<br />
vgscan --mknodes<br />
<br />
vgchange -ay<br />
<br />
make sure the slackware installer can detect the swap partition<br />
<br />
mkswap /dev/cryptvg/swap<br />
<br />
'''Slack Setup and Installation'''<br />
<br />
Run the slackware installer<br />
<br />
setup <br />
<br />
the installer will walk you through it from here. it should auto-detect the swap partition we designated<br />
<br />
Selecting '''''root''''' partition<br />
<br />
Make sure you select /dev/cryptvg/root here, because that’ll be your LVM root partition. Pick whichever file-system you like. After that it should bring you back to the same screen. It’s important to designate your other partitions here.<br />
<br />
Select /dev/cryptvg/home and format it.<br />
<br />
Next designate boot, which is essential, otherwise your machine will not work properly. Select '''''/dev/sdx1/''''' (probably /dev/sda1), format it, and type ''/boot''.<br />
Now simply install slackware as you normally would until you get to <br />
<br />
'''Install LILO'''<br />
<br />
To install the bootloader Lilo select '''''expert''''', then begin. Ignore the optional LILO Append, you probably don’t need to do anything with that.<br />
Select ''mbr'', hit confirm when it asks you to confirm /dev/sdx (probably /dev/sda), and keep going through the options until you’re back at the screen where you selected “begin”.<br />
<br />
Now you have to select '''''Linux: Add a linux partition'''''... and select /dev/cryptvg/root. (/dev/cryptvg/root, NOT /boot).<br />
<br />
Once that’s been selected, install lilo. . Continue with the installation until you reach a screen listing slackwares installation steps.<br />
<br />
Eit the installer and select '''''No''''' to get dropped to a command prompt.<br />
<br />
'''Creating an initrd'''<br />
<br />
Now we have to fix lilo because of our encryption scheme.<br />
<br />
chroot /mnt <br />
<br />
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. <br />
<br />
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<br />
<br />
/usr/share/mkinitrd/mkinitrd_command_generator.sh<br />
<br />
it will look similar to this<br />
<br />
mkinitrd -c -k 4.19.0 -f ext4 -r /dev/cryptvg/root -m usb-storage:xhci-<br />
hcd:usbhid:hid_generic:mbcache:jbd2:ext4 -C /dev/sda2 -h /dev/cryptvg/swap <br />
-L -u -o /boot/initrd.gz<br />
<br />
Run the resulting command (yours will surely be different from the example). This will write an image to /boot/initrd.gz in your system which we will use for booting. The '''''-h /dev/cryptvg/swap''''' has been added to enable hibernation. it was not part of the resulting mikinitrd_command_generator.sh command<br />
<br />
If you need to know what kernel you just installed try<br />
<br />
uname -a<br />
<br />
'''Fixing LILO'''<br />
<br />
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.<br />
(use your preferred editor)<br />
<br />
vim /etc/lilo.conf<br />
<br />
Edit the pertinent parts to look like this:<br />
<br />
image = /boot/vmlinuz-generic-4.19.0<br />
initrd = /boot/initrd.gz<br />
root = /dev/cryptvg/root<br />
label = Slackware<br />
read-only # Partitions should be mounted read-only for checking<br />
<br />
Above that, there’s an “append” line. Edit it to look something like this:<br />
<br />
append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"<br />
<br />
Of course, substituting your kernel where necessary. You can check what you need to put for “image = ” by going to /boot and checking which generic kernel you want to use to boot. Save your changes and exit.<br />
<br />
Run<br />
<br />
lilo -v<br />
<br />
You may get an error or two from lilo, but you can usually ignore these.<br />
type <br />
exit<br />
to leave the chroot and then<br />
reboot<br />
<br />
<br />
If something went wrong, you probably configured something incorrectly along the way. To get back into your system and repair lilo or some other part of the system, follow these steps to chroot from installation media<br />
<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
vgscan --mknodes<br />
vgchange -ay<br />
lvscan <br />
mount /dev/cryptvg/root /mnt<br />
mount /dev/cryptvg/home /mnt/home<br />
mount /dev/sdx1 /mnt/boot<br />
mount -o bind /proc /mnt/proc<br />
mount -o bind /sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt<br />
<br />
<br />
<br />
When you update your kernel all you have to do is make another initrd (run the same command mkinitrd_commaand_generator.sh gave you earlier with updated kernel info),<br />
edit /etc/lilo.conf to reflect the new kernel and run lilo</div>Wigumshttps://www.slackwiki.com/index.php?title=LVM/Luks_Encryption&diff=3204LVM/Luks Encryption2018-11-05T19:45:40Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
'''LVM'''<br />
<br />
LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks.<br />
<br />
'''LUKS'''<br />
<br />
LUKS is the standard for Linux hard disk encryption. By providing a standard on-disk-format, it does not<br />
only facilitate compatibility among distributions, but also provides secure management of multiple user passwords.<br />
LUKS stores all necessary setup information in the partition header, enabling you to transport or migrate data seamlessly.<br />
<br />
This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/sda2) made in the first step. It also assumes you know your way around the slackware installer.<br />
Swap space setup is documented here but note its only needed if you plan to hibernate e.g. a laptop.<br />
<br />
'''Partitioning'''<br />
<br />
Boot the installer. Login as '''''root''''' and run <br />
<br />
cfdisk<br />
<br />
What you’re doing here is setting up the partitions. Essentially, we’re dividing up the hard drive into a few logical partitions so that certain things can run in certain places, and not be affected by others. In order to create a bootable encrypted drive there needs to be a small partition that is not encrypted, it’s unencrypted and readable, so the computer can use it to figure out how to start the operating system.<br />
<br />
The first partition to make is a boot partition. Delete every other existing partition (if there are any) and write (again, assuming this will be your only OS). Next, select new and create a primary partition that is relatively small, I usually do 1G (which is rather large but i often juggle multiple kernels). Select ''Beginning'', which puts the partition at the front of the disk. DO NOT forget to make the first partition bootable, otherwise the installation won’t know to use this partition to install the boot scripts and such.<br />
<br />
Next, create another partition with the remaining space. Follow the same steps, except do not make it bootable and use the rest of the available space. Just hit enter when it asks how much space to use. After you’ve done this, make sure you go down and select '''''write''''' to ensure the changes are made. Then exit cfdisk.<br />
<br />
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<br />
<br />
dd if=/dev/urandom of=/dev/sdx2<br />
<br />
'''NOTE***''' this can take quite some time.<br />
<br />
'''LVM / Luks Config'''<br />
<br />
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. <br />
<br />
cryptsetup -s 512 -y luksFormat /dev/sdx2<br />
<br />
Type '''''YES''''', then decide on a password and type it. Be careful, later on if you put stuff on the drive and you forget your password, it’s gone forever. Such is the nature of encryption. <br />
<br />
Basically this is setting up luks encryption on /dev/sdx2.<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
<br />
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later.<br />
<br />
pvcreate /dev/mapper/slackcrypt <br />
<br />
This creates the volume group “cryptvg”.<br />
<br />
vgcreate cryptvg /dev/mapper/slackcrypt<br />
<br />
Create three internal logical volumes, '''''root''''', '''''home''''', and '''''swap'''''. If you have a unique setup and prefer it a different way, just follow the same steps and size them how you want. the sizes used are example only<br />
<br />
lvcreate -L 20G -n root cryptvg<br />
<br />
lvcreate -L 2G -n swap cryptvg<br />
<br />
lvcreate -l 100%FREE -n home cryptvg<br />
<br />
<br />
These will be your '''''/root''''', '''''/home''''', and '''''/swap''''' “partitions”. You can adjust the sizes to whatever you want them to be. I use a pretty large amount of space in root because I have run out of space installing tons of programs before, but I’ve also used tiny root partitions on machines where I didn’t plan on installing much. It really depends, but if you have the extra space I’d do like 20+ just to be on the safe side. The home directory gets everything that’s not allocated to swap or root.<br />
<br />
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not<br />
<br />
vgscan --mknodes<br />
<br />
vgchange -ay<br />
<br />
make sure the slackware installer can detect the swap partition<br />
<br />
mkswap /dev/cryptvg/swap<br />
<br />
'''Slack Setup and Installation'''<br />
<br />
Run the slackware installer<br />
<br />
setup <br />
<br />
the installer will walk you through it from here. it should auto-detect the swap partition we designated<br />
<br />
Selecting '''''root''''' partition<br />
<br />
Make sure you select /dev/cryptvg/root here, because that’ll be your LVM root partition. Pick whichever file-system you like. After that it should bring you back to the same screen. It’s important to designate your other partitions here.<br />
<br />
Select /dev/cryptvg/home and format it.<br />
<br />
Next designate boot, which is essential, otherwise your machine will not work properly. Select '''''/dev/sdx1/''''' (probably /dev/sda1), format it, and type ''/boot''.<br />
Now simply install slackware as you normally would until you get to <br />
<br />
'''Install LILO'''<br />
<br />
To install the bootloader Lilo select '''''expert''''', then begin. Ignore the optional LILO Append, you probably don’t need to do anything with that.<br />
Select ''mbr'', hit confirm when it asks you to confirm /dev/sdx (probably /dev/sda), and keep going through the options until you’re back at the screen where you selected “begin”.<br />
<br />
Now you have to select '''''Linux: Add a linux partition'''''... and select /dev/cryptvg/root. (/dev/cryptvg/root, NOT /boot).<br />
<br />
Once that’s been selected, install lilo. . Continue with the installation until you reach a screen listing slackwares installation steps.<br />
<br />
Eit the installer and select '''''No''''' to get dropped to a command prompt.<br />
<br />
'''Creating an initrd'''<br />
<br />
Now we have to fix lilo because of our encryption scheme.<br />
<br />
chroot /mnt <br />
<br />
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. <br />
<br />
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<br />
<br />
/usr/share/mkinitrd/mkinitrd_command_generator.sh<br />
<br />
it will look similar to this<br />
<br />
mkinitrd -c -k 4.19.0 -f ext4 -r /dev/cryptvg/root -m usb-storage:xhci-<br />
hcd:usbhid:hid_generic:mbcache:jbd2:ext4 -C /dev/sda2 -h /dev/cryptvg/swap <br />
-L -u -o /boot/initrd.gz<br />
<br />
Run the resulting command (yours will surely be different from the example). This will write an image to /boot/initrd.gz in your system which we will use for booting. The '''''-h /dev/cryptvg/swap''''' has been added to enable hibernation. it was not part of the resulting mikinitrd_command_generator.sh command<br />
<br />
If you need to know what kernel you just installed try<br />
<br />
uname -a<br />
<br />
'''Fixing LILO'''<br />
<br />
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.<br />
(use your preferred editor)<br />
<br />
vim /etc/lilo.conf<br />
<br />
Edit the pertinent parts to look like this:<br />
<br />
image = /boot/vmlinuz-generic-4.19.0<br />
initrd = /boot/initrd.gz<br />
root = /dev/cryptvg/root<br />
label = Slackware<br />
read-only # Partitions should be mounted read-only for checking<br />
<br />
Above that, there’s an “append” line. Edit it to look something like this:<br />
<br />
append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"<br />
<br />
Of course, substituting your kernel where necessary. You can check what you need to put for “image = ” by going to /boot and checking which generic kernel you want to use to boot. Save your changes and exit.<br />
<br />
Run<br />
<br />
lilo -v<br />
<br />
You may get an error or two from lilo, but you can usually ignore these.<br />
type <br />
exit<br />
to leave the chroot and then<br />
reboot<br />
<br />
<br />
If something went wrong, you probably configured something incorrectly along the way. To get back into your system and repair lilo or some other part of the system, follow these steps to chroot from installation media<br />
<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
vgscan --mknodes<br />
vgchange -ay<br />
lvscan <br />
mount /dev/cryptvg/root /mnt<br />
mount /dev/cryptvg/home /mnt/home<br />
mount /dev/sdx1 /mnt/boot<br />
mount -o bind /proc /mnt/proc<br />
mount -o bind /sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt</div>Wigumshttps://www.slackwiki.com/index.php?title=LVM/Luks_Encryption&diff=3203LVM/Luks Encryption2018-11-05T19:25:22Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
'''LVM'''<br />
<br />
LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks.<br />
<br />
'''LUKS'''<br />
<br />
LUKS is the standard for Linux hard disk encryption. By providing a standard on-disk-format, it does not<br />
only facilitate compatibility among distributions, but also provides secure management of multiple user passwords.<br />
LUKS stores all necessary setup information in the partition header, enabling you to transport or migrate data seamlessly.<br />
<br />
This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/sda2) made in the first step. It also assumes you know your way around the slackware installer.<br />
Swap space setup is documented here but note its only needed if you plan to hibernate e.g. a laptop.<br />
<br />
'''Partitioning'''<br />
<br />
Boot the installer. Login as '''''root''''' and run <br />
<br />
cfdisk<br />
<br />
What you’re doing here is setting up the partitions. Essentially, we’re dividing up the hard drive into a few logical partitions so that certain things can run in certain places, and not be affected by others. In order to create a bootable encrypted drive there needs to be a small partition that is not encrypted, it’s unencrypted and readable, so the computer can use it to figure out how to start the operating system.<br />
<br />
The first partition to make is a boot partition. Delete every other existing partition (if there are any) and write (again, assuming this will be your only OS). Next, select new and create a primary partition that is relatively small, I usually do 1G (which is rather large but i often juggle multiple kernels). Select ''Beginning'', which puts the partition at the front of the disk. DO NOT forget to make the first partition bootable, otherwise the installation won’t know to use this partition to install the boot scripts and such.<br />
<br />
Next, create another partition with the remaining space. Follow the same steps, except do not make it bootable and use the rest of the available space. Just hit enter when it asks how much space to use. After you’ve done this, make sure you go down and select '''''write''''' to ensure the changes are made. Then exit cfdisk.<br />
<br />
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<br />
<br />
dd if=/dev/urandom of=/dev/sdx2<br />
<br />
'''NOTE***''' this can take quite some time.<br />
<br />
'''LVM / Luks Config'''<br />
<br />
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. <br />
<br />
cryptsetup -s 512 -y luksFormat /dev/sdx2<br />
<br />
Type '''''YES''''', then decide on a password and type it. Be careful, later on if you put stuff on the drive and you forget your password, it’s gone forever. Such is the nature of encryption. <br />
<br />
Basically this is setting up luks encryption on /dev/sdx2.<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
<br />
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later.<br />
<br />
pvcreate /dev/mapper/slackcrypt <br />
<br />
This creates the volume group “cryptvg”.<br />
<br />
vgcreate cryptvg /dev/mapper/slackcrypt<br />
<br />
Create three internal logical volumes, '''''root''''', '''''home''''', and '''''swap'''''. If you have a unique setup and prefer it a different way, just follow the same steps and size them how you want. the sizes used are example only<br />
<br />
lvcreate -L 20G -n root cryptvg<br />
<br />
lvcreate -L 2G -n swap cryptvg<br />
<br />
lvcreate -l 100%FREE -n home cryptvg<br />
<br />
<br />
These will be your '''''/root''''', '''''/home''''', and '''''/swap''''' “partitions”. You can adjust the sizes to whatever you want them to be. I use a pretty large amount of space in root because I have run out of space installing tons of programs before, but I’ve also used tiny root partitions on machines where I didn’t plan on installing much. It really depends, but if you have the extra space I’d do like 20+ just to be on the safe side. The home directory gets everything that’s not allocated to swap or root.<br />
<br />
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not<br />
<br />
vgscan --mknodes<br />
<br />
vgchange -ay<br />
<br />
make sure the slackware installer can detect the swap partition<br />
<br />
mkswap /dev/cryptvg/swap<br />
<br />
'''Slack Setup and Installation'''<br />
<br />
Run the slackware installer<br />
<br />
setup <br />
<br />
the installer will walk you through it from here. it should auto-detect the swap partition we designated<br />
<br />
Selecting '''''root''''' partition<br />
<br />
Make sure you select /dev/cryptvg/root here, because that’ll be your LVM root partition. Pick whichever file-system you like. After that it should bring you back to the same screen. It’s important to designate your other partitions here.<br />
<br />
Select /dev/cryptvg/home and format it.<br />
<br />
Next designate boot, which is essential, otherwise your machine will not work properly. Select '''''/dev/sdx1/''''' (probably /dev/sda1), format it, and type ''/boot''.<br />
Now simply install slackware as you normally would until you get to <br />
<br />
'''Install LILO'''<br />
<br />
To install the bootloader Lilo select '''''expert''''', then begin. Ignore the optional LILO Append, you probably don’t need to do anything with that.<br />
Select ''mbr'', hit confirm when it asks you to confirm /dev/sdx (probably /dev/sda), and keep going through the options until you’re back at the screen where you selected “begin”.<br />
<br />
Now you have to select '''''Linux: Add a linux partition'''''... and select /dev/cryptvg/root. (/dev/cryptvg/root, NOT /boot).<br />
<br />
Once that’s been selected, install lilo. . Continue with the installation until you reach a screen listing slackwares installation steps.<br />
<br />
Eit the installer and select '''''No''''' to get dropped to a command prompt.<br />
<br />
'''Creating an initrd'''<br />
<br />
Now we have to fix lilo because of our encryption scheme.<br />
<br />
chroot /mnt <br />
<br />
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. <br />
<br />
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<br />
<br />
/usr/share/mkinitrd/mkinitrd_command_generator.sh<br />
<br />
it will look similar to this<br />
<br />
mkinitrd -c -k 4.19.0 -f ext4 -r /dev/cryptvg/root -m usb-storage:xhci-<br />
hcd:usbhid:hid_generic:mbcache:jbd2:ext4 -C /dev/sda2 -h /dev/cryptvg/swap <br />
-L -u -o /boot/initrd.gz<br />
<br />
Run the resulting command (yours will surely be different from the example). This will write an image to /boot/initrd.gz in your system which we will use for booting. The '''''-h /dev/cryptvg/swap''''' has been added to enable hibernation. it was not part of the resulting mikinitrd_command_generator.sh command<br />
<br />
If you need to know what kernel you just installed try<br />
<br />
uname -a<br />
<br />
'''Fixing LILO'''<br />
<br />
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.<br />
(use your preferred editor)<br />
<br />
vim /etc/lilo.conf<br />
<br />
Edit the pertinent parts to look like this:<br />
<br />
image = /boot/vmlinuz-generic-4.19.0<br />
initrd = /boot/initrd.gz<br />
root = /dev/cryptvg/root<br />
label = Slackware<br />
read-only # Partitions should be mounted read-only for checking<br />
<br />
Above that, there’s an “append” line. Edit it to look something like this:<br />
<br />
append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"<br />
<br />
Of course, substituting your kernel where necessary. You can check what you need to put for “image = ” by going to /boot and checking which generic kernel you want to use to boot. Save your changes and exit.<br />
<br />
Run<br />
<br />
lilo -v<br />
<br />
You may get an error or two from lilo, but you can usually ignore these.<br />
type <br />
exit<br />
to leave the chroot and then<br />
reboot<br />
<br />
<br />
If something went wrong, you probably configured something incorrectly along the way. To get back into your system and repair lilo or some other part of the system, follow these steps to chroot from installation media<br />
<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
vgscan --mknodes<br />
vgchange -ay<br />
lvscan <br />
mount /dev/cryptvg/root /mnt<br />
mount /dev/cryptvg/home /mnt/home<br />
mount /dev/sdx1 /mnt/boot<br />
mount -o bind /proc /mnt/proc<br />
mount -o bind /sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt</div>Wigumshttps://www.slackwiki.com/index.php?title=LVM/Luks_Encryption&diff=3202LVM/Luks Encryption2018-11-05T19:23:30Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
'''LVM'''<br />
<br />
LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks.<br />
<br />
'''LUKS'''<br />
<br />
LUKS is the standard for Linux hard disk encryption. By providing a standard on-disk-format, it does not<br />
only facilitate compatibility among distributions, but also provides secure management of multiple user passwords.<br />
LUKS stores all necessary setup information in the partition header, enabling to transport or migrate data seamlessly.<br />
<br />
This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/sda2) made in the first step. It also assumes you know your way around the slackware installer.<br />
Swap space setup is documented here but note its only needed if you plan to hibernate e.g. a laptop.<br />
<br />
'''Partitioning'''<br />
<br />
Boot the installer. Login as '''''root''''' and run <br />
<br />
cfdisk<br />
<br />
What you’re doing here is setting up the partitions. Essentially, we’re dividing up the hard drive into a few logical partitions so that certain things can run in certain places, and not be affected by others. In order to create a bootable encrypted drive there needs to be a small partition that is not encrypted, it’s unencrypted and readable, so the computer can use it to figure out how to start the operating system.<br />
<br />
The first partition to make is a boot partition. Delete every other existing partition (if there are any) and write (again, assuming this will be your only OS). Next, select new and create a primary partition that is relatively small, I usually do 1G (which is rather large but i often juggle multiple kernels). Select ''Beginning'', which puts the partition at the front of the disk. DO NOT forget to make the first partition bootable, otherwise the installation won’t know to use this partition to install the boot scripts and such.<br />
<br />
Next, create another partition with the remaining space. Follow the same steps, except do not make it bootable and use the rest of the available space. Just hit enter when it asks how much space to use. After you’ve done this, make sure you go down and select '''''write''''' to ensure the changes are made. Then exit cfdisk.<br />
<br />
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<br />
<br />
dd if=/dev/urandom of=/dev/sdx2<br />
<br />
'''NOTE***''' this can take quite some time.<br />
<br />
'''LVM / Luks Config'''<br />
<br />
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. <br />
<br />
cryptsetup -s 512 -y luksFormat /dev/sdx2<br />
<br />
Type '''''YES''''', then decide on a password and type it. Be careful, later on if you put stuff on the drive and you forget your password, it’s gone forever. Such is the nature of encryption. <br />
<br />
Basically this is setting up luks encryption on /dev/sdx2.<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
<br />
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later.<br />
<br />
pvcreate /dev/mapper/slackcrypt <br />
<br />
This creates the volume group “cryptvg”.<br />
<br />
vgcreate cryptvg /dev/mapper/slackcrypt<br />
<br />
Create three internal logical volumes, '''''root''''', '''''home''''', and '''''swap'''''. If you have a unique setup and prefer it a different way, just follow the same steps and size them how you want. the sizes used are example only<br />
<br />
lvcreate -L 20G -n root cryptvg<br />
<br />
lvcreate -L 2G -n swap cryptvg<br />
<br />
lvcreate -l 100%FREE -n home cryptvg<br />
<br />
<br />
These will be your '''''/root''''', '''''/home''''', and '''''/swap''''' “partitions”. You can adjust the sizes to whatever you want them to be. I use a pretty large amount of space in root because I have run out of space installing tons of programs before, but I’ve also used tiny root partitions on machines where I didn’t plan on installing much. It really depends, but if you have the extra space I’d do like 20+ just to be on the safe side. The home directory gets everything that’s not allocated to swap or root.<br />
<br />
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not<br />
<br />
vgscan --mknodes<br />
<br />
vgchange -ay<br />
<br />
make sure the slackware installer can detect the swap partition<br />
<br />
mkswap /dev/cryptvg/swap<br />
<br />
'''Slack Setup and Installation'''<br />
<br />
Run the slackware installer<br />
<br />
setup <br />
<br />
the installer will walk you through it from here. it should auto-detect the swap partition we designated<br />
<br />
Selecting '''''root''''' partition<br />
<br />
Make sure you select /dev/cryptvg/root here, because that’ll be your LVM root partition. Pick whichever file-system you like. After that it should bring you back to the same screen. It’s important to designate your other partitions here.<br />
<br />
Select /dev/cryptvg/home and format it.<br />
<br />
Next designate boot, which is essential, otherwise your machine will not work properly. Select '''''/dev/sdx1/''''' (probably /dev/sda1), format it, and type ''/boot''.<br />
Now simply install slackware as you normally would until you get to <br />
<br />
'''Install LILO'''<br />
<br />
To install the bootloader Lilo select '''''expert''''', then begin. Ignore the optional LILO Append, you probably don’t need to do anything with that.<br />
Select ''mbr'', hit confirm when it asks you to confirm /dev/sdx (probably /dev/sda), and keep going through the options until you’re back at the screen where you selected “begin”.<br />
<br />
Now you have to select '''''Linux: Add a linux partition'''''... and select /dev/cryptvg/root. (/dev/cryptvg/root, NOT /boot).<br />
<br />
Once that’s been selected, install lilo. . Continue with the installation until you reach a screen listing slackwares installation steps.<br />
<br />
Eit the installer and select '''''No''''' to get dropped to a command prompt.<br />
<br />
'''Creating an initrd'''<br />
<br />
Now we have to fix lilo because of our encryption scheme.<br />
<br />
chroot /mnt <br />
<br />
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. <br />
<br />
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<br />
<br />
/usr/share/mkinitrd/mkinitrd_command_generator.sh<br />
<br />
it will look similar to this<br />
<br />
mkinitrd -c -k 4.19.0 -f ext4 -r /dev/cryptvg/root -m usb-storage:xhci-<br />
hcd:usbhid:hid_generic:mbcache:jbd2:ext4 -C /dev/sda2 -h /dev/cryptvg/swap <br />
-L -u -o /boot/initrd.gz<br />
<br />
Run the resulting command (yours will surely be different from the example). This will write an image to /boot/initrd.gz in your system which we will use for booting. The '''''-h /dev/cryptvg/swap''''' has been added to enable hibernation. it was not part of the resulting mikinitrd_command_generator.sh command<br />
<br />
If you need to know what kernel you just installed try<br />
<br />
uname -a<br />
<br />
'''Fixing LILO'''<br />
<br />
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.<br />
(use your preferred editor)<br />
<br />
vim /etc/lilo.conf<br />
<br />
Edit the pertinent parts to look like this:<br />
<br />
image = /boot/vmlinuz-generic-4.19.0<br />
initrd = /boot/initrd.gz<br />
root = /dev/cryptvg/root<br />
label = Slackware<br />
read-only # Partitions should be mounted read-only for checking<br />
<br />
Above that, there’s an “append” line. Edit it to look something like this:<br />
<br />
append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"<br />
<br />
Of course, substituting your kernel where necessary. You can check what you need to put for “image = ” by going to /boot and checking which generic kernel you want to use to boot. Save your changes and exit.<br />
<br />
Run<br />
<br />
lilo -v<br />
<br />
You may get an error or two from lilo, but you can usually ignore these.<br />
type <br />
exit<br />
to leave the chroot and then<br />
reboot<br />
<br />
<br />
If something went wrong, you probably configured something incorrectly along the way. To get back into your system and repair lilo or some other part of the system, follow these steps to chroot from installation media<br />
<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
vgscan --mknodes<br />
vgchange -ay<br />
lvscan <br />
mount /dev/cryptvg/root /mnt<br />
mount /dev/cryptvg/home /mnt/home<br />
mount /dev/sdx1 /mnt/boot<br />
mount -o bind /proc /mnt/proc<br />
mount -o bind /sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt</div>Wigumshttps://www.slackwiki.com/index.php?title=LVM/Luks_Encryption&diff=3201LVM/Luks Encryption2018-11-05T19:23:10Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
'''LVM'''<br />
LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks.<br />
<br />
'''LUKS'''<br />
<br />
LUKS is the standard for Linux hard disk encryption. By providing a standard on-disk-format, it does not<br />
only facilitate compatibility among distributions, but also provides secure management of multiple user passwords.<br />
LUKS stores all necessary setup information in the partition header, enabling to transport or migrate data seamlessly.<br />
<br />
This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/sda2) made in the first step. It also assumes you know your way around the slackware installer.<br />
Swap space setup is documented here but note its only needed if you plan to hibernate e.g. a laptop.<br />
<br />
'''Partitioning'''<br />
<br />
Boot the installer. Login as '''''root''''' and run <br />
<br />
cfdisk<br />
<br />
What you’re doing here is setting up the partitions. Essentially, we’re dividing up the hard drive into a few logical partitions so that certain things can run in certain places, and not be affected by others. In order to create a bootable encrypted drive there needs to be a small partition that is not encrypted, it’s unencrypted and readable, so the computer can use it to figure out how to start the operating system.<br />
<br />
The first partition to make is a boot partition. Delete every other existing partition (if there are any) and write (again, assuming this will be your only OS). Next, select new and create a primary partition that is relatively small, I usually do 1G (which is rather large but i often juggle multiple kernels). Select ''Beginning'', which puts the partition at the front of the disk. DO NOT forget to make the first partition bootable, otherwise the installation won’t know to use this partition to install the boot scripts and such.<br />
<br />
Next, create another partition with the remaining space. Follow the same steps, except do not make it bootable and use the rest of the available space. Just hit enter when it asks how much space to use. After you’ve done this, make sure you go down and select '''''write''''' to ensure the changes are made. Then exit cfdisk.<br />
<br />
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<br />
<br />
dd if=/dev/urandom of=/dev/sdx2<br />
<br />
'''NOTE***''' this can take quite some time.<br />
<br />
'''LVM / Luks Config'''<br />
<br />
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. <br />
<br />
cryptsetup -s 512 -y luksFormat /dev/sdx2<br />
<br />
Type '''''YES''''', then decide on a password and type it. Be careful, later on if you put stuff on the drive and you forget your password, it’s gone forever. Such is the nature of encryption. <br />
<br />
Basically this is setting up luks encryption on /dev/sdx2.<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
<br />
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later.<br />
<br />
pvcreate /dev/mapper/slackcrypt <br />
<br />
This creates the volume group “cryptvg”.<br />
<br />
vgcreate cryptvg /dev/mapper/slackcrypt<br />
<br />
Create three internal logical volumes, '''''root''''', '''''home''''', and '''''swap'''''. If you have a unique setup and prefer it a different way, just follow the same steps and size them how you want. the sizes used are example only<br />
<br />
lvcreate -L 20G -n root cryptvg<br />
<br />
lvcreate -L 2G -n swap cryptvg<br />
<br />
lvcreate -l 100%FREE -n home cryptvg<br />
<br />
<br />
These will be your '''''/root''''', '''''/home''''', and '''''/swap''''' “partitions”. You can adjust the sizes to whatever you want them to be. I use a pretty large amount of space in root because I have run out of space installing tons of programs before, but I’ve also used tiny root partitions on machines where I didn’t plan on installing much. It really depends, but if you have the extra space I’d do like 20+ just to be on the safe side. The home directory gets everything that’s not allocated to swap or root.<br />
<br />
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not<br />
<br />
vgscan --mknodes<br />
<br />
vgchange -ay<br />
<br />
make sure the slackware installer can detect the swap partition<br />
<br />
mkswap /dev/cryptvg/swap<br />
<br />
'''Slack Setup and Installation'''<br />
<br />
Run the slackware installer<br />
<br />
setup <br />
<br />
the installer will walk you through it from here. it should auto-detect the swap partition we designated<br />
<br />
Selecting '''''root''''' partition<br />
<br />
Make sure you select /dev/cryptvg/root here, because that’ll be your LVM root partition. Pick whichever file-system you like. After that it should bring you back to the same screen. It’s important to designate your other partitions here.<br />
<br />
Select /dev/cryptvg/home and format it.<br />
<br />
Next designate boot, which is essential, otherwise your machine will not work properly. Select '''''/dev/sdx1/''''' (probably /dev/sda1), format it, and type ''/boot''.<br />
Now simply install slackware as you normally would until you get to <br />
<br />
'''Install LILO'''<br />
<br />
To install the bootloader Lilo select '''''expert''''', then begin. Ignore the optional LILO Append, you probably don’t need to do anything with that.<br />
Select ''mbr'', hit confirm when it asks you to confirm /dev/sdx (probably /dev/sda), and keep going through the options until you’re back at the screen where you selected “begin”.<br />
<br />
Now you have to select '''''Linux: Add a linux partition'''''... and select /dev/cryptvg/root. (/dev/cryptvg/root, NOT /boot).<br />
<br />
Once that’s been selected, install lilo. . Continue with the installation until you reach a screen listing slackwares installation steps.<br />
<br />
Eit the installer and select '''''No''''' to get dropped to a command prompt.<br />
<br />
'''Creating an initrd'''<br />
<br />
Now we have to fix lilo because of our encryption scheme.<br />
<br />
chroot /mnt <br />
<br />
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. <br />
<br />
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<br />
<br />
/usr/share/mkinitrd/mkinitrd_command_generator.sh<br />
<br />
it will look similar to this<br />
<br />
mkinitrd -c -k 4.19.0 -f ext4 -r /dev/cryptvg/root -m usb-storage:xhci-<br />
hcd:usbhid:hid_generic:mbcache:jbd2:ext4 -C /dev/sda2 -h /dev/cryptvg/swap <br />
-L -u -o /boot/initrd.gz<br />
<br />
Run the resulting command (yours will surely be different from the example). This will write an image to /boot/initrd.gz in your system which we will use for booting. The '''''-h /dev/cryptvg/swap''''' has been added to enable hibernation. it was not part of the resulting mikinitrd_command_generator.sh command<br />
<br />
If you need to know what kernel you just installed try<br />
<br />
uname -a<br />
<br />
'''Fixing LILO'''<br />
<br />
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.<br />
(use your preferred editor)<br />
<br />
vim /etc/lilo.conf<br />
<br />
Edit the pertinent parts to look like this:<br />
<br />
image = /boot/vmlinuz-generic-4.19.0<br />
initrd = /boot/initrd.gz<br />
root = /dev/cryptvg/root<br />
label = Slackware<br />
read-only # Partitions should be mounted read-only for checking<br />
<br />
Above that, there’s an “append” line. Edit it to look something like this:<br />
<br />
append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"<br />
<br />
Of course, substituting your kernel where necessary. You can check what you need to put for “image = ” by going to /boot and checking which generic kernel you want to use to boot. Save your changes and exit.<br />
<br />
Run<br />
<br />
lilo -v<br />
<br />
You may get an error or two from lilo, but you can usually ignore these.<br />
type <br />
exit<br />
to leave the chroot and then<br />
reboot<br />
<br />
<br />
If something went wrong, you probably configured something incorrectly along the way. To get back into your system and repair lilo or some other part of the system, follow these steps to chroot from installation media<br />
<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
vgscan --mknodes<br />
vgchange -ay<br />
lvscan <br />
mount /dev/cryptvg/root /mnt<br />
mount /dev/cryptvg/home /mnt/home<br />
mount /dev/sdx1 /mnt/boot<br />
mount -o bind /proc /mnt/proc<br />
mount -o bind /sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt</div>Wigumshttps://www.slackwiki.com/index.php?title=LVM/Luks_Encryption&diff=3200LVM/Luks Encryption2018-11-05T15:22:23Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
<br />
This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/sda2) made in the first step. It also assumes you know your way around the slackware installer.<br />
Swap space setup is documented here but note its only needed if you plan to hibernate e.g. a laptop.<br />
<br />
'''Partitioning'''<br />
<br />
Boot the installer. Login as '''''root''''' and run <br />
<br />
cfdisk<br />
<br />
What you’re doing here is setting up the partitions. Essentially, we’re dividing up the hard drive into a few logical partitions so that certain things can run in certain places, and not be affected by others. In order to create a bootable encrypted drive there needs to be a small partition that is not encrypted, it’s unencrypted and readable, so the computer can use it to figure out how to start the operating system.<br />
<br />
The first partition to make is a boot partition. Delete every other existing partition (if there are any) and write (again, assuming this will be your only OS). Next, select new and create a primary partition that is relatively small, I usually do 1G (which is rather large but i often juggle multiple kernels). Select ''Beginning'', which puts the partition at the front of the disk. DO NOT forget to make the first partition bootable, otherwise the installation won’t know to use this partition to install the boot scripts and such.<br />
<br />
Next, create another partition with the remaining space. Follow the same steps, except do not make it bootable and use the rest of the available space. Just hit enter when it asks how much space to use. After you’ve done this, make sure you go down and select '''''write''''' to ensure the changes are made. Then exit cfdisk.<br />
<br />
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<br />
<br />
dd if=/dev/urandom of=/dev/sdx2<br />
<br />
'''NOTE***''' this can take quite some time.<br />
<br />
'''LVM / Luks Config'''<br />
<br />
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. <br />
<br />
cryptsetup -s 512 -y luksFormat /dev/sdx2<br />
<br />
Type '''''YES''''', then decide on a password and type it. Be careful, later on if you put stuff on the drive and you forget your password, it’s gone forever. Such is the nature of encryption. <br />
<br />
Basically this is setting up luks encryption on /dev/sdx2.<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
<br />
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later.<br />
<br />
pvcreate /dev/mapper/slackcrypt <br />
<br />
This creates the volume group “cryptvg”.<br />
<br />
vgcreate cryptvg /dev/mapper/slackcrypt<br />
<br />
Create three internal logical volumes, '''''root''''', '''''home''''', and '''''swap'''''. If you have a unique setup and prefer it a different way, just follow the same steps and size them how you want. the sizes used are example only<br />
<br />
lvcreate -L 20G -n root cryptvg<br />
<br />
lvcreate -L 2G -n swap cryptvg<br />
<br />
lvcreate -l 100%FREE -n home cryptvg<br />
<br />
<br />
These will be your '''''/root''''', '''''/home''''', and '''''/swap''''' “partitions”. You can adjust the sizes to whatever you want them to be. I use a pretty large amount of space in root because I have run out of space installing tons of programs before, but I’ve also used tiny root partitions on machines where I didn’t plan on installing much. It really depends, but if you have the extra space I’d do like 20+ just to be on the safe side. The home directory gets everything that’s not allocated to swap or root.<br />
<br />
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not<br />
<br />
vgscan --mknodes<br />
<br />
vgchange -ay<br />
<br />
make sure the slackware installer can detect the swap partition<br />
<br />
mkswap /dev/cryptvg/swap<br />
<br />
'''Slack Setup and Installation'''<br />
<br />
Run the slackware installer<br />
<br />
setup <br />
<br />
the installer will walk you through it from here. it should auto-detect the swap partition we designated<br />
<br />
Selecting '''''root''''' partition<br />
<br />
Make sure you select /dev/cryptvg/root here, because that’ll be your LVM root partition. Pick whichever file-system you like. After that it should bring you back to the same screen. It’s important to designate your other partitions here.<br />
<br />
Select /dev/cryptvg/home and format it.<br />
<br />
Next designate boot, which is essential, otherwise your machine will not work properly. Select '''''/dev/sdx1/''''' (probably /dev/sda1), format it, and type ''/boot''.<br />
Now simply install slackware as you normally would until you get to <br />
<br />
'''Install LILO'''<br />
<br />
To install the bootloader Lilo select '''''expert''''', then begin. Ignore the optional LILO Append, you probably don’t need to do anything with that.<br />
Select ''mbr'', hit confirm when it asks you to confirm /dev/sdx (probably /dev/sda), and keep going through the options until you’re back at the screen where you selected “begin”.<br />
<br />
Now you have to select '''''Linux: Add a linux partition'''''... and select /dev/cryptvg/root. (/dev/cryptvg/root, NOT /boot).<br />
<br />
Once that’s been selected, install lilo. . Continue with the installation until you reach a screen listing slackwares installation steps.<br />
<br />
Eit the installer and select '''''No''''' to get dropped to a command prompt.<br />
<br />
'''Creating an initrd'''<br />
<br />
Now we have to fix lilo because of our encryption scheme.<br />
<br />
chroot /mnt <br />
<br />
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. <br />
<br />
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<br />
<br />
/usr/share/mkinitrd/mkinitrd_command_generator.sh<br />
<br />
it will look similar to this<br />
<br />
mkinitrd -c -k 4.19.0 -f ext4 -r /dev/cryptvg/root -m usb-storage:xhci-<br />
hcd:usbhid:hid_generic:mbcache:jbd2:ext4 -C /dev/sda2 -h /dev/cryptvg/swap <br />
-L -u -o /boot/initrd.gz<br />
<br />
Run the resulting command (yours will surely be different from the example). This will write an image to /boot/initrd.gz in your system which we will use for booting. The '''''-h /dev/cryptvg/swap''''' has been added to enable hibernation. it was not part of the resulting mikinitrd_command_generator.sh command<br />
<br />
If you need to know what kernel you just installed try<br />
<br />
uname -a<br />
<br />
'''Fixing LILO'''<br />
<br />
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.<br />
(use your preferred editor)<br />
<br />
vim /etc/lilo.conf<br />
<br />
Edit the pertinent parts to look like this:<br />
<br />
image = /boot/vmlinuz-generic-4.19.0<br />
initrd = /boot/initrd.gz<br />
root = /dev/cryptvg/root<br />
label = Slackware<br />
read-only # Partitions should be mounted read-only for checking<br />
<br />
Above that, there’s an “append” line. Edit it to look something like this:<br />
<br />
append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"<br />
<br />
Of course, substituting your kernel where necessary. You can check what you need to put for “image = ” by going to /boot and checking which generic kernel you want to use to boot. Save your changes and exit.<br />
<br />
Run<br />
<br />
lilo -v<br />
<br />
You may get an error or two from lilo, but you can usually ignore these.<br />
type <br />
exit<br />
to leave the chroot and then<br />
reboot<br />
<br />
<br />
If something went wrong, you probably configured something incorrectly along the way. To get back into your system and repair lilo or some other part of the system, follow these steps to chroot from installation media<br />
<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
vgscan --mknodes<br />
vgchange -ay<br />
lvscan <br />
mount /dev/cryptvg/root /mnt<br />
mount /dev/cryptvg/home /mnt/home<br />
mount /dev/sdx1 /mnt/boot<br />
mount -o bind /proc /mnt/proc<br />
mount -o bind /sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt</div>Wigumshttps://www.slackwiki.com/index.php?title=LVM/Luks_Encryption&diff=3199LVM/Luks Encryption2018-11-05T15:20:43Z<p>Wigums: Created page with "This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/s..."</p>
<hr />
<div>This article assumes that this will be the only operating system installed. Also wherever you see '''''sdx2''''' it is referring to the single large partition (probably /dev/sda2) made in the first step. It also assumes you know your way around the slackware installer.<br />
Swap space setup is documented here but note its only needed if you plan to hibernate e.g. a laptop.<br />
<br />
'''Partitioning'''<br />
<br />
Boot the installer. Login as '''''root''''' and run <br />
<br />
cfdisk<br />
<br />
What you’re doing here is setting up the partitions. Essentially, we’re dividing up the hard drive into a few logical partitions so that certain things can run in certain places, and not be affected by others. In order to create a bootable encrypted drive there needs to be a small partition that is not encrypted, it’s unencrypted and readable, so the computer can use it to figure out how to start the operating system.<br />
<br />
The first partition to make is a boot partition. Delete every other existing partition (if there are any) and write (again, assuming this will be your only OS). Next, select new and create a primary partition that is relatively small, I usually do 1G (which is rather large but i often juggle multiple kernels). Select ''Beginning'', which puts the partition at the front of the disk. DO NOT forget to make the first partition bootable, otherwise the installation won’t know to use this partition to install the boot scripts and such.<br />
<br />
Next, create another partition with the remaining space. Follow the same steps, except do not make it bootable and use the rest of the available space. Just hit enter when it asks how much space to use. After you’ve done this, make sure you go down and select '''''write''''' to ensure the changes are made. Then exit cfdisk.<br />
<br />
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<br />
<br />
dd if=/dev/urandom of=/dev/sdx2<br />
<br />
'''NOTE***''' this can take quite some time.<br />
<br />
'''LVM / Luks Config'''<br />
<br />
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. <br />
<br />
cryptsetup -s 512 -y luksFormat /dev/sdx2<br />
<br />
Type '''''YES''''', then decide on a password and type it. Be careful, later on if you put stuff on the drive and you forget your password, it’s gone forever. Such is the nature of encryption. <br />
<br />
Basically this is setting up luks encryption on /dev/sdx2.<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
<br />
pvcreate is a linux command used to initialize physical volumes for use by logical volume management (lvm) later.<br />
<br />
pvcreate /dev/mapper/slackcrypt <br />
<br />
This creates the volume group “cryptvg”.<br />
<br />
vgcreate cryptvg /dev/mapper/slackcrypt<br />
<br />
Create three internal logical volumes, '''''root''''', '''''home''''', and '''''swap'''''. If you have a unique setup and prefer it a different way, just follow the same steps and size them how you want. the sizes used are example only<br />
<br />
lvcreate -L 20G -n root cryptvg<br />
<br />
lvcreate -L 2G -n swap cryptvg<br />
<br />
lvcreate -l 100%FREE -n home cryptvg<br />
<br />
<br />
These will be your '''''/root''''', '''''/home''''', and '''''/swap''''' “partitions”. You can adjust the sizes to whatever you want them to be. I use a pretty large amount of space in root because I have run out of space installing tons of programs before, but I’ve also used tiny root partitions on machines where I didn’t plan on installing much. It really depends, but if you have the extra space I’d do like 20+ just to be on the safe side. The home directory gets everything that’s not allocated to swap or root.<br />
<br />
Next thing we’ve got to do is make sure some nodes get set so everything knows where things are and what not<br />
<br />
vgscan --mknodes<br />
<br />
vgchange -ay<br />
<br />
make sure the slackware installer can detect the swap partition<br />
<br />
mkswap /dev/cryptvg/swap<br />
<br />
'''Slack Setup and Installation'''<br />
<br />
Run the slackware installer<br />
<br />
setup <br />
<br />
the installer will walk you through it from here. it should auto-detect the swap partition we designated<br />
<br />
Selecting '''''root''''' partition<br />
<br />
Make sure you select /dev/cryptvg/root here, because that’ll be your LVM root partition. Pick whichever file-system you like. After that it should bring you back to the same screen. It’s important to designate your other partitions here.<br />
<br />
Select /dev/cryptvg/home and format it.<br />
<br />
Next designate boot, which is essential, otherwise your machine will not work properly. Select '''''/dev/sdx1/''''' (probably /dev/sda1), format it, and type ''/boot''.<br />
Now simply install slackware as you normally would until you get to <br />
<br />
'''Install LILO'''<br />
<br />
To install the bootloader Lilo select '''''expert''''', then begin. Ignore the optional LILO Append, you probably don’t need to do anything with that.<br />
Select ''mbr'', hit confirm when it asks you to confirm /dev/sdx (probably /dev/sda), and keep going through the options until you’re back at the screen where you selected “begin”.<br />
<br />
Now you have to select '''''Linux: Add a linux partition'''''... and select /dev/cryptvg/root. (/dev/cryptvg/root, NOT /boot).<br />
<br />
Once that’s been selected, install lilo. . Continue with the installation until you reach a screen listing slackwares installation steps.<br />
<br />
Eit the installer and select '''''No''''' to get dropped to a command prompt.<br />
<br />
'''Creating an initrd'''<br />
<br />
Now we have to fix lilo because of our encryption scheme.<br />
<br />
chroot /mnt <br />
<br />
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. <br />
<br />
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<br />
<br />
/usr/share/mkinitrd/mkinitrd_command_generator.sh<br />
<br />
it will look similar to this<br />
<br />
mkinitrd -c -k 4.19.0 -f ext4 -r /dev/cryptvg/root -m usb-storage:xhci-<br />
hcd:usbhid:hid_generic:mbcache:jbd2:ext4 -C /dev/sda2 -h /dev/cryptvg/swap <br />
-L -u -o /boot/initrd.gz<br />
<br />
Run the resulting command (yours will surely be different from the example). This will write an image to /boot/initrd.gz in your system which we will use for booting. The '''''-h /dev/cryptvg/swap''''' has been added to enable hibernation. it was not part of the resulting mikinitrd_command_generator.sh command<br />
<br />
If you need to know what kernel you just installed try<br />
<br />
uname -a<br />
<br />
'''Fixing LILO'''<br />
<br />
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.<br />
(use your preferred editor)<br />
<br />
vim /etc/lilo.conf<br />
<br />
Edit the pertinent parts to look like this:<br />
<br />
image = /boot/vmlinuz-generic-4.19.0<br />
initrd = /boot/initrd.gz<br />
root = /dev/cryptvg/root<br />
label = Slackware<br />
read-only # Partitions should be mounted read-only for checking<br />
<br />
Above that, there’s an “append” line. Edit it to look something like this:<br />
<br />
append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"<br />
<br />
Of course, substituting your kernel where necessary. You can check what you need to put for “image = ” by going to /boot and checking which generic kernel you want to use to boot. Save your changes and exit.<br />
<br />
Run<br />
<br />
lilo -v<br />
<br />
You may get an error or two from lilo, but you can usually ignore these.<br />
type <br />
exit<br />
to leave the chroot and then<br />
reboot<br />
<br />
<br />
If something went wrong, you probably configured something incorrectly along the way. To get back into your system and repair lilo or some other part of the system, follow these steps to chroot from installation media<br />
<br />
<br />
cryptsetup luksOpen /dev/sdx2 slackcrypt<br />
vgscan --mknodes<br />
vgchange -ay<br />
lvscan <br />
mount /dev/cryptvg/root /mnt<br />
mount /dev/cryptvg/home /mnt/home<br />
mount /dev/sdx1 /mnt/boot<br />
mount -o bind /proc /mnt/proc<br />
mount -o bind /sys /mnt/sys<br />
mount -o bind /dev /mnt/dev<br />
chroot /mnt</div>Wigumshttps://www.slackwiki.com/index.php?title=CPU_Frequency_Scaling&diff=3198CPU Frequency Scaling2018-10-29T13:31:02Z<p>Wigums: </p>
<hr />
<div>The CPU frequency scaling feature present in modern computers allows lowering and increasing the processor speed dynamically in runtime so as to save energy while having the possibility of increasing the performance and power consumption if needed. Activating CPU frequency scaling under Slackware is very easy, and requires loading a minimum of two kernel modules and running a simple command. On the one hand, you need to load a specific CPU driver that will activate the frequency scaling feature in your platform. Second, you need to choose a CPU frequency scaling governor, a module that will decide how and when to change the internal processor speed. There are governors to always run at full speed, governors to always run at low speed, governors to increase and decrease the speed based on the CPU load, etc.<br />
<br />
<br />
<br />
= Find available governors =<br />
<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors <br />
<br />
<br />
= Setting a governor =<br />
<br />
edit ''/etc/default/cpufreq''<br />
<br />
= Applying the governor =<br />
<br />
''/etc/rc.d/rc.cpufreq'' should already be executable<br />
make sure its running <br />
''/etc.rc.d/rc.cpufreq restart''<br />
<br />
<br />
= Governor types = <br />
<br />
'''Performance'''<br />
<br />
The CPUfreq governor "performance" sets the CPU statically to the<br />
highest frequency within the borders of scaling_min_freq and<br />
scaling_max_freq.<br />
<br />
<br />
'''Powersave'''<br />
<br />
The CPUfreq governor "powersave" sets the CPU statically to the<br />
lowest frequency within the borders of scaling_min_freq and<br />
scaling_max_freq.<br />
<br />
<br />
'''Userspace'''<br />
<br />
The CPUfreq governor "userspace" allows the user, or any userspace<br />
program running with UID "root", to set the CPU to a specific frequency<br />
by making a sysfs file "scaling_setspeed" available in the CPU-device<br />
directory.<br />
<br />
<br />
'''Ondemand'''<br />
<br />
The CPUfreq governor "ondemand" sets the CPU frequency depending on the<br />
current system load. Load estimation is triggered by the scheduler<br />
through the update_util_data->func hook; when triggered, cpufreq checks<br />
the CPU-usage statistics over the last period and the governor sets the<br />
CPU accordingly. The CPU must have the capability to switch the<br />
frequency very quickly.<br />
<br />
<br />
'''Conservative'''<br />
<br />
The CPUfreq governor "conservative", much like the "ondemand"<br />
governor, sets the CPU frequency depending on the current usage. It<br />
differs in behaviour in that it gracefully increases and decreases the<br />
CPU speed rather than jumping to max speed the moment there is any load<br />
on the CPU. This behaviour is more suitable in a battery powered<br />
environment.<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=CPU_Frequency_Scaling&diff=3197CPU Frequency Scaling2018-10-29T13:11:32Z<p>Wigums: </p>
<hr />
<div>The CPU frequency scaling feature present in modern computers allows lowering and increasing the processor speed dynamically in runtime so as to save energy while having the possibility of increasing the performance and power consumption if needed. Activating CPU frequency scaling under Slackware is very easy, and requires loading a minimum of two kernel modules and running a simple command. On the one hand, you need to load a specific CPU driver that will activate the frequency scaling feature in your platform. Second, you need to choose a CPU frequency scaling governor, a module that will decide how and when to change the internal processor speed. There are governors to always run at full speed, governors to always run at low speed, governors to increase and decrease the speed based on the CPU load, etc.<br />
<br />
<br />
<br />
= Find available governors =<br />
<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors <br />
<br />
<br />
= Setting a governor =<br />
<br />
edit ''/etc/default/cpufreq''<br />
<br />
= Applying the governor =<br />
<br />
''/etc/rc.d/rc.cpufreq'' should already be executable<br />
make sure its running <br />
''/etc.rc.d/rc.cpufreq restart''<br />
<br />
<br />
= Governor types = <br />
<br />
'''Performance'''<br />
<br />
The CPUfreq governor "performance" sets the CPU statically to the<br />
highest frequency within the borders of scaling_min_freq and<br />
scaling_max_freq.<br />
<br />
<br />
'''Powersave'''<br />
<br />
The CPUfreq governor "powersave" sets the CPU statically to the<br />
lowest frequency within the borders of scaling_min_freq and<br />
scaling_max_freq.<br />
<br />
<br />
'''Userspace'''<br />
<br />
<br />
The CPUfreq governor "userspace" allows the user, or any userspace<br />
program running with UID "root", to set the CPU to a specific frequency<br />
by making a sysfs file "scaling_setspeed" available in the CPU-device<br />
directory.<br />
<br />
<br />
'''Ondemand'''<br />
<br />
<br />
The CPUfreq governor "ondemand" sets the CPU frequency depending on the<br />
current system load. Load estimation is triggered by the scheduler<br />
through the update_util_data->func hook; when triggered, cpufreq checks<br />
the CPU-usage statistics over the last period and the governor sets the<br />
CPU accordingly. The CPU must have the capability to switch the<br />
frequency very quickly.<br />
<br />
<br />
'''Conservative'''<br />
<br />
<br />
The CPUfreq governor "conservative", much like the "ondemand"<br />
governor, sets the CPU frequency depending on the current usage. It<br />
differs in behaviour in that it gracefully increases and decreases the<br />
CPU speed rather than jumping to max speed the moment there is any load<br />
on the CPU. This behaviour is more suitable in a battery powered<br />
environment.<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3196Reinstalling Lilo2018-10-28T23:22:14Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
'''Chroot method'''<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
''mount /dev/sdX1 /mnt'' (where /dev/sdx1 is your / partition)<br />
''mount -o bind /dev /mnt/dev''<br />
''mount -o bind /proc /mnt/proc''<br />
''mount -o bind /sys /mnt/sys''<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
''chroot /mnt /bin/bash''<br />
<br />
now simply run ''liloconfig'' and follow the prompts<br />
<br />
<br />
'''Booting your system from the installation media'''<br />
<br />
often times you can boot your system from the installation media as well<br />
simply boot the installation media and on the very first page are the following instructions<br />
<br />
<br />
In a pinch, you can boot your system from here with a command like:<br />
boot: huge.s root=/dev/sda1 rdinit= ro <br />
In the example above, /dev/sda1 is the / Linux partition.<br />
<br />
once booted run ''liloconfig''<br />
<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3195Reinstalling Lilo2018-10-28T23:21:24Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
'''Chrooting'''<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
''mount /dev/sdX1 /mnt'' (where /dev/sdx1 is your / partition)<br />
''mount -o bind /dev /mnt/dev''<br />
''mount -o bind /proc /mnt/proc''<br />
''mount -o bind /sys /mnt/sys''<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
''chroot /mnt /bin/bash''<br />
<br />
now simply run ''liloconfig'' and follow the prompts<br />
<br />
<br />
'''Booting your system from the installation media'''<br />
<br />
often times you can boot your system from the installation media as well<br />
simply boot the installation media and on the very first page are the following instructions<br />
<br />
<br />
In a pinch, you can boot your system from here with a command like:<br />
boot: huge.s root=/dev/sda1 rdinit= ro <br />
In the example above, /dev/sda1 is the / Linux partition.<br />
<br />
once booted run ''liloconfig''<br />
<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3194Reinstalling Lilo2018-10-28T22:58:16Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
''mount /dev/sdX1 /mnt'' (where /dev/sdx1 is your / partition)<br />
''mount -o bind /dev /mnt/dev''<br />
''mount -o bind /proc /mnt/proc''<br />
''mount -o bind /sys /mnt/sys''<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
''chroot /mnt /bin/bash''<br />
<br />
now simply run ''liloconfig'' and follow the prompts<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3193Reinstalling Lilo2018-10-28T22:57:36Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
''mount /dev/sdX1 /mnt'' (where /dev/sdx1 is your / partition)<br />
<br />
''mount -o bind /dev /mnt/dev''<br />
<br />
''mount -o bind /proc /mnt/proc''<br />
<br />
''mount -o bind /sys /mnt/sys''<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
''chroot /mnt /bin/bash''<br />
<br />
now simply run ''liloconfig'' and follow the prompts<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3192Reinstalling Lilo2018-10-28T22:22:28Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
''mount /dev/sdX1 /mnt'' (where /dev/sdx1 is your / partition)<br />
<br />
''mount -o bind /dev /mnt/dev''<br />
<br />
''mount -o bind /proc /mnt/proc''<br />
<br />
''mount -o bind /sys /mnt/sys''<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
''chroot /mnt /bin/bash''<br />
<br />
now simply run ''liloconfig'' and follow the prompts<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=CPU_Frequency_Scaling&diff=3191CPU Frequency Scaling2018-10-28T22:10:03Z<p>Wigums: </p>
<hr />
<div>The CPU frequency scaling feature present in modern computers allows lowering and increasing the processor speed dynamically in runtime so as to save energy while having the possibility of increasing the performance and power consumption if needed. Activating CPU frequency scaling under Slackware is very easy, and requires loading a minimum of two kernel modules and running a simple command. On the one hand, you need to load a specific CPU driver that will activate the frequency scaling feature in your platform. Second, you need to choose a CPU frequency scaling governor, a module that will decide how and when to change the internal processor speed. There are governors to always run at full speed, governors to always run at low speed, governors to increase and decrease the speed based on the CPU load, etc.<br />
<br />
<br />
<br />
= Find available governors =<br />
<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors <br />
<br />
<br />
= Setting a governor =<br />
<br />
edit ''/etc/default/cpufreq''<br />
<br />
= Applying the governor =<br />
<br />
''/etc/rc.d/rc.cpufreq'' should already be executable<br />
make sure its running <br />
''/etc.rc.d/rc.cpufreq restart''<br />
<br />
<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3190Reinstalling Lilo2018-10-28T13:45:00Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
''mount /dev/sdX1 /mnt'' (where /dev/sdx1 is your / partition)<br />
<br />
''mount -o bind /dev /mnt/dev''<br />
<br />
''mount -o bind /proc /mnt/proc''<br />
<br />
''mount -o bind /sys /mnt/sys''<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
''chroot /mnt /bin/bash''<br />
<br />
now simply run ''liloconfig'' and follow the prompts</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3189Reinstalling Lilo2018-10-28T13:41:59Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
mount /dev/sdX1 /mnt (where /dev/sdx1 is your / partition)<br />
<br />
mount -o bind /dev /mnt/dev<br />
<br />
mount -o bind /proc /mnt/proc<br />
<br />
mount -o bind /sys /mnt/sys<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
chroot /mnt /bin/bash<br />
<br />
now simply run "liloconfig" and follow the prompts</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3188Reinstalling Lilo2018-10-28T13:40:50Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
mount /dev/sdX1 /mnt<br />
<br />
mount -o bind /dev /mnt/dev<br />
<br />
mount -o bind /proc /mnt/proc<br />
<br />
mount -o bind /sys /mnt/sys<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
chroot /mnt /bin/bash<br />
<br />
now simply run "liloconfig" and follow the prompts</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3187Reinstalling Lilo2018-10-28T13:28:40Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
mount /dev/sda1 /mnt<br />
<br />
mount -o bind /dev /mnt/dev<br />
<br />
mount -o bind /proc /mnt/proc<br />
<br />
mount -o bind /sys /mnt/sys<br />
<br />
'''Chrooting'''<br />
<br />
Once everything is mounted, we can chroot to it:<br />
<br />
chroot /mnt /bin/bash<br />
<br />
now simply run "liloconfig" and follow the prompts</div>Wigumshttps://www.slackwiki.com/index.php?title=Reinstalling_Lilo&diff=3186Reinstalling Lilo2018-10-28T13:27:25Z<p>Wigums: </p>
<hr />
<div>this covers straight unencrypted installs. just a simple installation with everything <br />
installed under / mounted under /dev/sda1. No LVM or additional drives. if you're encrypted <br />
or have an otherwise fancy install this wiki expects that you understand the intricacies of <br />
your own system. for a more in depth look at how to chroot your installation <br />
media (which can be extremely useful for more that just lilo)<br />
see [https://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media here]<br />
<br />
insert and boot your installation media<br />
<br />
login as root when prompted but do not run setup<br />
<br />
'''Mounting'''<br />
<br />
mount /dev/sda1 /mnt<br />
<br />
mount -o bind /dev /mnt/dev<br />
<br />
mount -o bind /proc /mnt/proc<br />
<br />
mount -o bind /sys /mnt/sys<br />
<br />
'''Chrooting'''<br />
<br />
Once the partition is mounted, we can chroot to it:<br />
<br />
chroot /mnt /bin/bash<br />
<br />
now simply run "liloconfig" and follow the prompts</div>Wigumshttps://www.slackwiki.com/index.php?title=Third_Party_Package_Managers&diff=3185Third Party Package Managers2018-10-28T00:45:38Z<p>Wigums: </p>
<hr />
<div>= Purpose =<br />
<br />
The mere mention of third party package managers (such as [http://software.jaos.org/#slapt-get slapt-get] and [http://swaret.sourceforge.net/ swaret]) often results in a quick admonishment from Slackware users, and unfortunately, the only reason given in most cases is something along the lines of "they'll break your system." This leaves users in a state of confusion, as the respective web sites of these third party tools tout them as an improvement. The purpose of this page is to explain why and how these tools will often result in system breakage.<br />
<br />
= Overview of Slackware's Native Package Tools =<br />
<br />
Slackware's native package management utilities (<tt>pkgtool(8)</tt>, <tt>installpkg(8)</tt>, <tt>removepkg(8)</tt>, and <tt>upgradepkg(8)</tt>) do not support any form of dependency checking. A Slackware package is essentially a compressed tarball of the files associated with an application, a file containing a short description of the application (<tt>./install/slack-desc</tt>), and a script that performs some essential post-installation tasks (<tt>./install/doinst.sh</tt>). Installing a Slackware package simply copies those files to the filesystem and then executes the post-install script, while removing the package removes the files and reverses the post-install script. As result, there is no guarantee that libraries and other files needed by a particular package are already present on the system when that particular package is installed.<br />
<br />
= Overview of Selected Third Party Tools =<br />
<br />
As stated above, Slackware's native package management suite neither has nor supports dependency resolution. Because the third-party add-ons all use Slackware's native package tools, they are bound by this same limitation, at least to some extent, but some of them try to mitigate this in various ways; the following is an overview.<br />
<br />
<br />
== swaret ==<br />
<br />
no longer a viable package management solution<br />
<br />
== slapt-get ==<br />
<br />
=== Overview ===<br />
<br />
Slapt-get makes use of additional files (<tt>slack-required</tt>, <tt>slack-suggests</tt>, <tt>slack-conflicts</tt>) inside a Slackware package. Essentially, if a package is listed in <tt>slack-required</tt>, then slapt-get will install or upgrade it first; if a package is listed in <tt>slack-conflicts</tt>, then slapt-get will remove it first; if a package is listed in <tt>slack-suggests</tt>, then slapt-get will offer to install it in addition to the packages noted in <tt>slack-required</tt>.<br />
<br />
=== Potential Problems ===<br />
<br />
Since official Slackware packages do not have the <tt>slack-required</tt> and other files needed for slapt-get to determine dependencies, it is not able to resolve dependencies for them. Therefore, slapt-get's perceived usefulness is in keeping unofficial third-party packages (or at least those which do contain the necessary files) up to date. See the discussion below for more information on unofficial third-party packages.<br />
Also, slapt-get, like swaret, will not "downgrade" a package to a previous version if it occurs in the upstream Slackware tree.<br />
<br />
== sbopkg ==<br />
<br />
=== Overview ===<br />
<br />
[http://www.sbopkg.org/ SBopkg] is a tool for automating the download, compile and package build for SBo projects hosted in the [http://www.slackbuilds.org SlackBuilds.org ] repository. SBo packages are reviewed by team members for completeness as well as applicability to each Slackware release. SBo package documentation includes information regarding dependencies.<br />
<br />
== sbotools ==<br />
<br />
=== Overview ===<br />
<br />
<br />
[https://pink-mist.github.io/sbotools/ sbotools] provides a ports-like interface to SlackBuilds.org. It consists of several commands, and a configuration file. It is written entirely in Perl and bundles a copy of the Sort::Versions module with itself for its own usage; this will not interfere with copies installed via the CPAN or SlackBuilds.org.<br />
<br />
<br />
<br />
<br />
= Third Party (Unofficial) Packages =<br />
<br />
This subject can elicit opinions just as strong as the topic of third-party package managers, and there are knowledgeable people on both sides of the issue. Third party packages can obviously present a security risk, as there's no way to know what's really in them, but for the average user, there are (amazingly enough) bigger concerns. On one hand, the user wants a package of some application that's not included with Slackware, but he doesn't want it to create other problems. Oftentimes, third party packages are not built on "clean" systems -- that is, the computer on which they're built has quite a few other non-official packages installed -- so the resulting package needs those other things to work properly. If the packager doesn't make note of all the different packages that this one depends on, the user installs it only to find that it still doesn't work. Even worse, those other dependencies are often not even necessary if the package is built on a clean system - if the other package had not been present, the new one obviously wouldn't have linked against it. <br />
Installing third party packages from two different packagers can cause problems. Package A might depend on Package B, which depends on Package C and optionally Package D. If the person who built Package B only linked it against Package C (not D), but the Package A expects Package B to have both Package C and Package D dependencies, then Package A may not work, even though you (think you) have everything it needs installed.<br />
Another frequent problem with third party packages is encountered by replacing stock (official) packages with unofficial ones. In addition to the library version issues mentioned in the swaret discussion, newer package versions often require newer versions of other packages, which might require newer versions of still other packages, and before you know it, you have replaced a sizable portion of the official Slackware packages. If/when something breaks, you will find it very difficult to find someone willing to help you, as there's no way to know how much effect the unofficial packages are having.<br />
<br />
<br />
= Slackware -current =<br />
<br />
Slackware -current is *not* a stable release of Slackware. It is intended for advanced users who are familiar with how Slackware works to test (and report success/failure, find and fix bugs, etcetera) the new packages leading to the next stable release of Slackware. Packages are constantly being added, removed, split up, merged, and otherwise mangled, and third party package managers (swaret/slapt-get/et al) should not be expected to know how to deal with this. If you use one of those tools while trying to run Slackware -current and you don't understand how they work and their limitations, you *will* break your system and you will *not* have much luck finding someone who is sympathetic. You have been warned.<br />
<br />
You may be wondering why these tools have trouble with -current. I won't even attempt to detail all of the potential issues, but here are a couple:<br />
1. When upgrading to -current with one of these tools, the package sets are upgraded in alphabetical order (and the packages therein also in alphabetical order). This means that a/bash will be upgraded before a/glibc-solibs. If bash has been recompiled against newer glibc, and you upgrade to that new version, it will promptly stop working due to the fact that the needed version of glibc has not been upgraded yet; at that point, you are stuck with a "chicken and egg" problem.<br />
2. Third party package tools will not install *new* packages that have been added in Slackware -current. This is not a bug - it's a feature; if you purposefully didn't install something, then you don't want your automatic package updater reinstalling it. However, when a package depends on something else that has been added or split out of an existing package, and your add-on package manager upgrades the existing package but doesn't install the added one, then the (upgraded) existing package will not work any more.<br />
<br />
<br />
= Solutions and Suggestions =<br />
<br />
For upgrading to Slackware -current, there is only *one* supported method: <tt>UPGRADE.TXT</tt> -- you can find this file on any Slackware mirror. Note that this is also the only supported method to upgrade from one stable release of Slackware to another.<br />
<br />
For keeping up to date on post-release patches added to a stable release of Slackware, you will *usually* be okay to use one of the third party package managers. You should still read the <tt>ChangeLog.txt</tt> before doing any upgrades, though, as new packages are occasionally added in /patches when circumstances require it.<br />
<br />
For software not included in official Slackware, consider building it yourself or using a SlackBuild script from one of the projects which provides them.<br />
<br />
One of the regular Slackware contributors, PiterPUNK, wrote and maintains a third-party package manager that minimizes all of the risks mentioned above. [http://slackpkg.org Slackpkg] does not support downloading or installing unofficial packages, and it has provisions to install any added packages and uninstall any removed packages as well as the normal install/upgrade/remove routines.<br />
<br />
Another third party package manager that promotes good practices is [http://slackroll.sourceforge.net/ SlackRoll] (see [[SlackRoll Tutorial|tutorial]]). Its philosophy is similar to that of Slackpkg but it is not included as part of Slackware. Programmed in Python, it is faster, has more features and detects more events from Slackware -current. However, the initial setup and workflow are a bit more complex.<br />
<br />
= See Also =<br />
<br />
* <tt>pkgtool(8)</tt> -- man 8 pkgtool<br />
* <tt>installpkg(8)</tt> -- man 8 installpkg<br />
* <tt>removepkg(8)</tt> -- man 8 removepkg<br />
* <tt>upgradepkg(8)</tt> -- man 8 upgradepkg<br />
* <tt>makepkg(8)</tt> -- man 8 makepkg<br />
* <tt>explodepkg(8)</tt> -- man 8 explodepkg<br />
<br />
<br />
= TODO =<br />
<br />
* Add links to other wiki pages that are related to this topic (add to "See Also" above)<br />
* Add hyperlinks to slapt-get, swaret, and other projects mentioned on this page<br />
* Others?<br />
<br />
[[Category:Information]]<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Third_Party_Package_Managers&diff=3184Third Party Package Managers2018-10-28T00:22:22Z<p>Wigums: /* swaret */</p>
<hr />
<div>= Purpose =<br />
<br />
The mere mention of third party package managers (such as [http://software.jaos.org/#slapt-get slapt-get] and [http://swaret.sourceforge.net/ swaret]) often results in a quick admonishment from Slackware users, and unfortunately, the only reason given in most cases is something along the lines of "they'll break your system." This leaves users in a state of confusion, as the respective web sites of these third party tools tout them as an improvement. The purpose of this page is to explain why and how these tools will often result in system breakage.<br />
<br />
= Overview of Slackware's Native Package Tools =<br />
<br />
Slackware's native package management utilities (<tt>pkgtool(8)</tt>, <tt>installpkg(8)</tt>, <tt>removepkg(8)</tt>, and <tt>upgradepkg(8)</tt>) do not support any form of dependency checking. A Slackware package is essentially a compressed tarball of the files associated with an application, a file containing a short description of the application (<tt>./install/slack-desc</tt>), and a script that performs some essential post-installation tasks (<tt>./install/doinst.sh</tt>). Installing a Slackware package simply copies those files to the filesystem and then executes the post-install script, while removing the package removes the files and reverses the post-install script. As result, there is no guarantee that libraries and other files needed by a particular package are already present on the system when that particular package is installed.<br />
<br />
= Overview of Selected Third Party Tools =<br />
<br />
As stated above, Slackware's native package management suite neither has nor supports dependency resolution. Because the third-party add-ons all use Slackware's native package tools, they are bound by this same limitation, at least to some extent, but some of them try to mitigate this in various ways; the following is an overview.<br />
<br />
<br />
== swaret ==<br />
<br />
no longer a viable package management solution<br />
<br />
== slapt-get ==<br />
<br />
=== Overview ===<br />
<br />
Slapt-get makes use of additional files (<tt>slack-required</tt>, <tt>slack-suggests</tt>, <tt>slack-conflicts</tt>) inside a Slackware package. Essentially, if a package is listed in <tt>slack-required</tt>, then slapt-get will install or upgrade it first; if a package is listed in <tt>slack-conflicts</tt>, then slapt-get will remove it first; if a package is listed in <tt>slack-suggests</tt>, then slapt-get will offer to install it in addition to the packages noted in <tt>slack-required</tt>.<br />
<br />
=== Potential Problems ===<br />
<br />
Since official Slackware packages do not have the <tt>slack-required</tt> and other files needed for slapt-get to determine dependencies, it is not able to resolve dependencies for them. Therefore, slapt-get's perceived usefulness is in keeping unofficial third-party packages (or at least those which do contain the necessary files) up to date. See the discussion below for more information on unofficial third-party packages.<br />
Also, slapt-get, like swaret, will not "downgrade" a package to a previous version if it occurs in the upstream Slackware tree.<br />
<br />
== sbopkg ==<br />
<br />
=== Overview ===<br />
<br />
[http://www.sbopkg.org/ SBopkg] is a tool for automating the download, compile and package build for SBo projects hosted in the [http://www.slackbuilds.org SlackBuilds.org ] repository. SBo packages are reviewed by team members for completeness as well as applicability to each Slackware release. SBo package documentation includes information regarding dependencies.<br />
<br />
= Third Party (Unofficial) Packages =<br />
<br />
This subject can elicit opinions just as strong as the topic of third-party package managers, and there are knowledgeable people on both sides of the issue. Third party packages can obviously present a security risk, as there's no way to know what's really in them, but for the average user, there are (amazingly enough) bigger concerns. On one hand, the user wants a package of some application that's not included with Slackware, but he doesn't want it to create other problems. Oftentimes, third party packages are not built on "clean" systems -- that is, the computer on which they're built has quite a few other non-official packages installed -- so the resulting package needs those other things to work properly. If the packager doesn't make note of all the different packages that this one depends on, the user installs it only to find that it still doesn't work. Even worse, those other dependencies are often not even necessary if the package is built on a clean system - if the other package had not been present, the new one obviously wouldn't have linked against it. <br />
Installing third party packages from two different packagers can cause problems. Package A might depend on Package B, which depends on Package C and optionally Package D. If the person who built Package B only linked it against Package C (not D), but the Package A expects Package B to have both Package C and Package D dependencies, then Package A may not work, even though you (think you) have everything it needs installed.<br />
Another frequent problem with third party packages is encountered by replacing stock (official) packages with unofficial ones. In addition to the library version issues mentioned in the swaret discussion, newer package versions often require newer versions of other packages, which might require newer versions of still other packages, and before you know it, you have replaced a sizable portion of the official Slackware packages. If/when something breaks, you will find it very difficult to find someone willing to help you, as there's no way to know how much effect the unofficial packages are having.<br />
<br />
<br />
= Slackware -current =<br />
<br />
Slackware -current is *not* a stable release of Slackware. It is intended for advanced users who are familiar with how Slackware works to test (and report success/failure, find and fix bugs, etcetera) the new packages leading to the next stable release of Slackware. Packages are constantly being added, removed, split up, merged, and otherwise mangled, and third party package managers (swaret/slapt-get/et al) should not be expected to know how to deal with this. If you use one of those tools while trying to run Slackware -current and you don't understand how they work and their limitations, you *will* break your system and you will *not* have much luck finding someone who is sympathetic. You have been warned.<br />
<br />
You may be wondering why these tools have trouble with -current. I won't even attempt to detail all of the potential issues, but here are a couple:<br />
1. When upgrading to -current with one of these tools, the package sets are upgraded in alphabetical order (and the packages therein also in alphabetical order). This means that a/bash will be upgraded before a/glibc-solibs. If bash has been recompiled against newer glibc, and you upgrade to that new version, it will promptly stop working due to the fact that the needed version of glibc has not been upgraded yet; at that point, you are stuck with a "chicken and egg" problem.<br />
2. Third party package tools will not install *new* packages that have been added in Slackware -current. This is not a bug - it's a feature; if you purposefully didn't install something, then you don't want your automatic package updater reinstalling it. However, when a package depends on something else that has been added or split out of an existing package, and your add-on package manager upgrades the existing package but doesn't install the added one, then the (upgraded) existing package will not work any more.<br />
<br />
<br />
= Solutions and Suggestions =<br />
<br />
For upgrading to Slackware -current, there is only *one* supported method: <tt>UPGRADE.TXT</tt> -- you can find this file on any Slackware mirror. Note that this is also the only supported method to upgrade from one stable release of Slackware to another.<br />
<br />
For keeping up to date on post-release patches added to a stable release of Slackware, you will *usually* be okay to use one of the third party package managers. You should still read the <tt>ChangeLog.txt</tt> before doing any upgrades, though, as new packages are occasionally added in /patches when circumstances require it.<br />
<br />
For software not included in official Slackware, consider building it yourself or using a SlackBuild script from one of the projects which provides them.<br />
<br />
One of the regular Slackware contributors, PiterPUNK, wrote and maintains a third-party package manager that minimizes all of the risks mentioned above. [http://slackpkg.org Slackpkg] does not support downloading or installing unofficial packages, and it has provisions to install any added packages and uninstall any removed packages as well as the normal install/upgrade/remove routines.<br />
<br />
Another third party package manager that promotes good practices is [http://slackroll.sourceforge.net/ SlackRoll] (see [[SlackRoll Tutorial|tutorial]]). Its philosophy is similar to that of Slackpkg but it is not included as part of Slackware. Programmed in Python, it is faster, has more features and detects more events from Slackware -current. However, the initial setup and workflow are a bit more complex.<br />
<br />
= See Also =<br />
<br />
* <tt>pkgtool(8)</tt> -- man 8 pkgtool<br />
* <tt>installpkg(8)</tt> -- man 8 installpkg<br />
* <tt>removepkg(8)</tt> -- man 8 removepkg<br />
* <tt>upgradepkg(8)</tt> -- man 8 upgradepkg<br />
* <tt>makepkg(8)</tt> -- man 8 makepkg<br />
* <tt>explodepkg(8)</tt> -- man 8 explodepkg<br />
<br />
<br />
= TODO =<br />
<br />
* Add links to other wiki pages that are related to this topic (add to "See Also" above)<br />
* Add hyperlinks to slapt-get, swaret, and other projects mentioned on this page<br />
* Others?<br />
<br />
[[Category:Information]]<br />
[[Category:Tutorials]]</div>Wigumshttps://www.slackwiki.com/index.php?title=Install_Slackware_Using_A_USB_Flash_Drive&diff=3183Install Slackware Using A USB Flash Drive2018-10-27T21:47:22Z<p>Wigums: /* Installation */</p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
Installing Slackware using a USB flash drive is very easy.<br />
<br />
Slackware includes a usbboot.img in the usb-and-pxe-installers directory of the official installation media, which is a minimal image very handy for FTP or other kinds of network installations.<br />
<br />
In the same directory one can also find usbimg2disk.sh, a script that will dump the usbboot.img image to a flash drive, useful in case the above image does not work for you out of the box.<br />
<br />
Additionally, AlienBOB has written two articles in his blog on how to install Slackware using a USB flash drive from either<br />
<br />
[http://alien.slackbook.org/blog/welcome-windows-user/ Microsoft Windows] or [http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/ Linux].<br />
<br />
This document describes yet another way of creating an image capable of booting from USB, containing all of the packages neeeded for an installation, using [http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE Isohybrid].<br />
<br />
== Prerequisites ==<br />
<br />
A USB flash drive that can fit the ISO image (4GB or larger)<br />
<br />
Additionally you should either have:<br />
<br />
a) official Slackware installation media, preferably the DVD ISO available on any Slackware mirror<br />
<br />
or<br />
<br />
b) a local copy of the Slackware tree.<br />
<br />
That may be the tree of a stable release, or even the tree of the Slackware current development cycle.<br />
<br />
If you choose to use a local copy of the tree you should be able to create your own ISO image using a script such as:<br />
<br />
Pat's [http://slackware.osuosl.org/slackware/isolinux/README.TXT DVD script], AlienBOB's [http://www.slackware.com/~alien/tools/mirror-slackware-current.sh mirror-slackware-current script] or even a custom one of your own.<br />
<br />
== Copy the ISO to the USB flash drive ==<br />
<br />
All that is left to do now is copy the ISO to the USB flash drive.<br />
<br />
This can be done using the [http://linux.die.net/man/1/dd dd] command as the root user.<br />
<br />
to identify the designation of your usb stick/drive use <br />
<br />
fdisk -l<br />
<br />
dd will write the iso to whatever drive you tell it to so make double sure <br />
you have the right drive designation in the following command<br />
<br />
<br />
<br />
The following command will overwrite all the files currently present on the USB drive with a bootable iso<br />
<br />
dd if=/path/to/iso of=/path/to/usb (example of=/dev/sdX)<br />
<br />
PS1. dd expects the name of a device, not a partition, so you should use eg. /dev/sdb instead of /dev/sdb1.<br />
<br />
PS2. the USB drive should NOT be mounted during dd invocation.<br />
<br />
== Installation ==<br />
<br />
Boot the machine using the USB drive.<br />
<br />
When installing, choose "Install from a slackware USB stick". follow the steps. setup your keyboard<br />
add swap space (if used) and select your target drive. when selecting source select <br />
<br />
Install from a Slackware USB stick<br />
<br />
and follow the prompts<br />
<br />
== Install with Unetbootin ==<br />
<br />
It is possible to install with unetbootin. Download the Slackware iso image of your choice and then install to a USB drive using unetbootin. Tutorials for unetbootin are everywhere. Then, when you get to the SOURCE option in setup use the drive you are installing slackware from (usually it is /dev/sdb1). When it asks where the packages are, enter /slackware for 32 bit or /slackware64 for 64 bit. This was tested using the Slackware 14.0 64-bit x86_64 iso.</div>Wigumshttps://www.slackwiki.com/index.php?title=Install_Slackware_Using_A_USB_Flash_Drive&diff=3182Install Slackware Using A USB Flash Drive2018-10-27T19:44:17Z<p>Wigums: /* Copy the ISO to the USB flash drive */</p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
Installing Slackware using a USB flash drive is very easy.<br />
<br />
Slackware includes a usbboot.img in the usb-and-pxe-installers directory of the official installation media, which is a minimal image very handy for FTP or other kinds of network installations.<br />
<br />
In the same directory one can also find usbimg2disk.sh, a script that will dump the usbboot.img image to a flash drive, useful in case the above image does not work for you out of the box.<br />
<br />
Additionally, AlienBOB has written two articles in his blog on how to install Slackware using a USB flash drive from either<br />
<br />
[http://alien.slackbook.org/blog/welcome-windows-user/ Microsoft Windows] or [http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/ Linux].<br />
<br />
This document describes yet another way of creating an image capable of booting from USB, containing all of the packages neeeded for an installation, using [http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE Isohybrid].<br />
<br />
== Prerequisites ==<br />
<br />
A USB flash drive that can fit the ISO image (4GB or larger)<br />
<br />
Additionally you should either have:<br />
<br />
a) official Slackware installation media, preferably the DVD ISO available on any Slackware mirror<br />
<br />
or<br />
<br />
b) a local copy of the Slackware tree.<br />
<br />
That may be the tree of a stable release, or even the tree of the Slackware current development cycle.<br />
<br />
If you choose to use a local copy of the tree you should be able to create your own ISO image using a script such as:<br />
<br />
Pat's [http://slackware.osuosl.org/slackware/isolinux/README.TXT DVD script], AlienBOB's [http://www.slackware.com/~alien/tools/mirror-slackware-current.sh mirror-slackware-current script] or even a custom one of your own.<br />
<br />
== Copy the ISO to the USB flash drive ==<br />
<br />
All that is left to do now is copy the ISO to the USB flash drive.<br />
<br />
This can be done using the [http://linux.die.net/man/1/dd dd] command as the root user.<br />
<br />
to identify the designation of your usb stick/drive use <br />
<br />
fdisk -l<br />
<br />
dd will write the iso to whatever drive you tell it to so make double sure <br />
you have the right drive designation in the following command<br />
<br />
<br />
<br />
The following command will overwrite all the files currently present on the USB drive with a bootable iso<br />
<br />
dd if=/path/to/iso of=/path/to/usb (example of=/dev/sdX)<br />
<br />
PS1. dd expects the name of a device, not a partition, so you should use eg. /dev/sdb instead of /dev/sdb1.<br />
<br />
PS2. the USB drive should NOT be mounted during dd invocation.<br />
<br />
== Installation ==<br />
<br />
Boot the machine using the USB drive.<br />
<br />
Before running '''setup''', look up (with '''fdisk -l''') which device your USB drive is. When installing, choose "Install from a Slackware CD or DVD". Then select the "manual" option, then the "custom" option.<br />
Enter /dev/sdX1 (as shown by "fdisk -l") and installation will proceed as when installing from a DVD.<br />
<br />
== Install with Unetbootin ==<br />
<br />
It is possible to install with unetbootin. Download the Slackware iso image of your choice and then install to a USB drive using unetbootin. Tutorials for unetbootin are everywhere. Then, when you get to the SOURCE option in setup use the drive you are installing slackware from (usually it is /dev/sdb1). When it asks where the packages are, enter /slackware for 32 bit or /slackware64 for 64 bit. This was tested using the Slackware 14.0 64-bit x86_64 iso.</div>Wigumshttps://www.slackwiki.com/index.php?title=Install_Slackware_Using_A_USB_Flash_Drive&diff=3181Install Slackware Using A USB Flash Drive2018-10-27T19:39:48Z<p>Wigums: /* Prerequisites */</p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
Installing Slackware using a USB flash drive is very easy.<br />
<br />
Slackware includes a usbboot.img in the usb-and-pxe-installers directory of the official installation media, which is a minimal image very handy for FTP or other kinds of network installations.<br />
<br />
In the same directory one can also find usbimg2disk.sh, a script that will dump the usbboot.img image to a flash drive, useful in case the above image does not work for you out of the box.<br />
<br />
Additionally, AlienBOB has written two articles in his blog on how to install Slackware using a USB flash drive from either<br />
<br />
[http://alien.slackbook.org/blog/welcome-windows-user/ Microsoft Windows] or [http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/ Linux].<br />
<br />
This document describes yet another way of creating an image capable of booting from USB, containing all of the packages neeeded for an installation, using [http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE Isohybrid].<br />
<br />
== Prerequisites ==<br />
<br />
A USB flash drive that can fit the ISO image (4GB or larger)<br />
<br />
Additionally you should either have:<br />
<br />
a) official Slackware installation media, preferably the DVD ISO available on any Slackware mirror<br />
<br />
or<br />
<br />
b) a local copy of the Slackware tree.<br />
<br />
That may be the tree of a stable release, or even the tree of the Slackware current development cycle.<br />
<br />
If you choose to use a local copy of the tree you should be able to create your own ISO image using a script such as:<br />
<br />
Pat's [http://slackware.osuosl.org/slackware/isolinux/README.TXT DVD script], AlienBOB's [http://www.slackware.com/~alien/tools/mirror-slackware-current.sh mirror-slackware-current script] or even a custom one of your own.<br />
<br />
== Copy the ISO to the USB flash drive ==<br />
<br />
All that is left to do now is copy the ISO to the USB flash drive.<br />
<br />
This can be done using the [http://linux.die.net/man/1/dd dd] command as the root user.<br />
<br />
to identify the designation of your usb stick/drive use <br />
<br />
fdisk -l<br />
<br />
dd will write the iso to whatever drive you tell it to so make double sure <br />
you have the right drive designation in the following command<br />
<br />
<br />
<br />
The following command will overwrite all the files currently present on the USB drive with a bootable iso<br />
<br />
dd if=slackware-14.2-install-dvd.iso of=/path/to/usb (example of=/dev/sdX)<br />
<br />
PS1. dd expects the name of a device, not a partition, so you should use eg. /dev/sdb instead of /dev/sdb1.<br />
<br />
PS2. the USB drive should NOT be mounted during dd invocation.<br />
<br />
== Installation ==<br />
<br />
Boot the machine using the USB drive.<br />
<br />
Before running '''setup''', look up (with '''fdisk -l''') which device your USB drive is. When installing, choose "Install from a Slackware CD or DVD". Then select the "manual" option, then the "custom" option.<br />
Enter /dev/sdX1 (as shown by "fdisk -l") and installation will proceed as when installing from a DVD.<br />
<br />
== Install with Unetbootin ==<br />
<br />
It is possible to install with unetbootin. Download the Slackware iso image of your choice and then install to a USB drive using unetbootin. Tutorials for unetbootin are everywhere. Then, when you get to the SOURCE option in setup use the drive you are installing slackware from (usually it is /dev/sdb1). When it asks where the packages are, enter /slackware for 32 bit or /slackware64 for 64 bit. This was tested using the Slackware 14.0 64-bit x86_64 iso.</div>Wigumshttps://www.slackwiki.com/index.php?title=Install_Slackware_Using_A_USB_Flash_Drive&diff=3180Install Slackware Using A USB Flash Drive2018-10-27T19:39:05Z<p>Wigums: /* Prerequisites */</p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
Installing Slackware using a USB flash drive is very easy.<br />
<br />
Slackware includes a usbboot.img in the usb-and-pxe-installers directory of the official installation media, which is a minimal image very handy for FTP or other kinds of network installations.<br />
<br />
In the same directory one can also find usbimg2disk.sh, a script that will dump the usbboot.img image to a flash drive, useful in case the above image does not work for you out of the box.<br />
<br />
Additionally, AlienBOB has written two articles in his blog on how to install Slackware using a USB flash drive from either<br />
<br />
[http://alien.slackbook.org/blog/welcome-windows-user/ Microsoft Windows] or [http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/ Linux].<br />
<br />
This document describes yet another way of creating an image capable of booting from USB, containing all of the packages neeeded for an installation, using [http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE Isohybrid].<br />
<br />
== Prerequisites ==<br />
<br />
A USB flash drive that can fit the ISO image<br />
<br />
Additionally you should either have:<br />
<br />
a) official Slackware installation media, preferably the DVD ISO available on any Slackware mirror<br />
<br />
or<br />
<br />
b) a local copy of the Slackware tree.<br />
<br />
That may be the tree of a stable release, or even the tree of the Slackware current development cycle.<br />
<br />
If you choose to use a local copy of the tree you should be able to create your own ISO image using a script such as:<br />
<br />
Pat's [http://slackware.osuosl.org/slackware/isolinux/README.TXT DVD script], AlienBOB's [http://www.slackware.com/~alien/tools/mirror-slackware-current.sh mirror-slackware-current script] or even a custom one of your own.<br />
<br />
== Copy the ISO to the USB flash drive ==<br />
<br />
All that is left to do now is copy the ISO to the USB flash drive.<br />
<br />
This can be done using the [http://linux.die.net/man/1/dd dd] command as the root user.<br />
<br />
to identify the designation of your usb stick/drive use <br />
<br />
fdisk -l<br />
<br />
dd will write the iso to whatever drive you tell it to so make double sure <br />
you have the right drive designation in the following command<br />
<br />
<br />
<br />
The following command will overwrite all the files currently present on the USB drive with a bootable iso<br />
<br />
dd if=slackware-14.2-install-dvd.iso of=/path/to/usb (example of=/dev/sdX)<br />
<br />
PS1. dd expects the name of a device, not a partition, so you should use eg. /dev/sdb instead of /dev/sdb1.<br />
<br />
PS2. the USB drive should NOT be mounted during dd invocation.<br />
<br />
== Installation ==<br />
<br />
Boot the machine using the USB drive.<br />
<br />
Before running '''setup''', look up (with '''fdisk -l''') which device your USB drive is. When installing, choose "Install from a Slackware CD or DVD". Then select the "manual" option, then the "custom" option.<br />
Enter /dev/sdX1 (as shown by "fdisk -l") and installation will proceed as when installing from a DVD.<br />
<br />
== Install with Unetbootin ==<br />
<br />
It is possible to install with unetbootin. Download the Slackware iso image of your choice and then install to a USB drive using unetbootin. Tutorials for unetbootin are everywhere. Then, when you get to the SOURCE option in setup use the drive you are installing slackware from (usually it is /dev/sdb1). When it asks where the packages are, enter /slackware for 32 bit or /slackware64 for 64 bit. This was tested using the Slackware 14.0 64-bit x86_64 iso.</div>Wigumshttps://www.slackwiki.com/index.php?title=Install_Slackware_Using_A_USB_Flash_Drive&diff=3179Install Slackware Using A USB Flash Drive2018-10-27T19:37:57Z<p>Wigums: /* Prerequisites */</p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
Installing Slackware using a USB flash drive is very easy.<br />
<br />
Slackware includes a usbboot.img in the usb-and-pxe-installers directory of the official installation media, which is a minimal image very handy for FTP or other kinds of network installations.<br />
<br />
In the same directory one can also find usbimg2disk.sh, a script that will dump the usbboot.img image to a flash drive, useful in case the above image does not work for you out of the box.<br />
<br />
Additionally, AlienBOB has written two articles in his blog on how to install Slackware using a USB flash drive from either<br />
<br />
[http://alien.slackbook.org/blog/welcome-windows-user/ Microsoft Windows] or [http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/ Linux].<br />
<br />
This document describes yet another way of creating an image capable of booting from USB, containing all of the packages neeeded for an installation, using [http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE Isohybrid].<br />
<br />
== Prerequisites ==<br />
<br />
A USB flash drive that can fit the ISO image<br />
<br />
Additionally you should either have:<br />
<br />
a) official Slackware installation media, preferably the DVD ISO one, available on any Slackware mirror<br />
<br />
or<br />
<br />
b) a local copy of the Slackware tree.<br />
<br />
That may be the tree of a stable release, or even the tree of the Slackware current development cycle.<br />
<br />
If you choose to use a local copy of the tree you should be able to create your own ISO image using a script such as:<br />
<br />
Pat's [http://slackware.osuosl.org/slackware/isolinux/README.TXT DVD script], AlienBOB's [http://www.slackware.com/~alien/tools/mirror-slackware-current.sh mirror-slackware-current script] or even a custom one of your own.<br />
<br />
== Copy the ISO to the USB flash drive ==<br />
<br />
All that is left to do now is copy the ISO to the USB flash drive.<br />
<br />
This can be done using the [http://linux.die.net/man/1/dd dd] command as the root user.<br />
<br />
to identify the designation of your usb stick/drive use <br />
<br />
fdisk -l<br />
<br />
dd will write the iso to whatever drive you tell it to so make double sure <br />
you have the right drive designation in the following command<br />
<br />
<br />
<br />
The following command will overwrite all the files currently present on the USB drive with a bootable iso<br />
<br />
dd if=slackware-14.2-install-dvd.iso of=/path/to/usb (example of=/dev/sdX)<br />
<br />
PS1. dd expects the name of a device, not a partition, so you should use eg. /dev/sdb instead of /dev/sdb1.<br />
<br />
PS2. the USB drive should NOT be mounted during dd invocation.<br />
<br />
== Installation ==<br />
<br />
Boot the machine using the USB drive.<br />
<br />
Before running '''setup''', look up (with '''fdisk -l''') which device your USB drive is. When installing, choose "Install from a Slackware CD or DVD". Then select the "manual" option, then the "custom" option.<br />
Enter /dev/sdX1 (as shown by "fdisk -l") and installation will proceed as when installing from a DVD.<br />
<br />
== Install with Unetbootin ==<br />
<br />
It is possible to install with unetbootin. Download the Slackware iso image of your choice and then install to a USB drive using unetbootin. Tutorials for unetbootin are everywhere. Then, when you get to the SOURCE option in setup use the drive you are installing slackware from (usually it is /dev/sdb1). When it asks where the packages are, enter /slackware for 32 bit or /slackware64 for 64 bit. This was tested using the Slackware 14.0 64-bit x86_64 iso.</div>Wigumshttps://www.slackwiki.com/index.php?title=Install_Slackware_Using_A_USB_Flash_Drive&diff=3178Install Slackware Using A USB Flash Drive2018-10-27T19:36:39Z<p>Wigums: /* Copy the ISO to the USB flash drive */</p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
Installing Slackware using a USB flash drive is very easy.<br />
<br />
Slackware includes a usbboot.img in the usb-and-pxe-installers directory of the official installation media, which is a minimal image very handy for FTP or other kinds of network installations.<br />
<br />
In the same directory one can also find usbimg2disk.sh, a script that will dump the usbboot.img image to a flash drive, useful in case the above image does not work for you out of the box.<br />
<br />
Additionally, AlienBOB has written two articles in his blog on how to install Slackware using a USB flash drive from either<br />
<br />
[http://alien.slackbook.org/blog/welcome-windows-user/ Microsoft Windows] or [http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/ Linux].<br />
<br />
This document describes yet another way of creating an image capable of booting from USB, containing all of the packages neeeded for an installation, using [http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE Isohybrid].<br />
<br />
== Prerequisites ==<br />
<br />
A USB flash drive that can fit the ISO image<br />
<br />
Syslinux >= 3.72<br />
<br />
Additionally you should either have:<br />
<br />
a) official Slackware installation media, preferably the DVD ISO one, available on any Slackware mirror<br />
<br />
or<br />
<br />
b) a local copy of the Slackware tree.<br />
<br />
That may be the tree of a stable release, or even the tree of the Slackware current development cycle.<br />
<br />
If you choose to use a local copy of the tree you should be able to create your own ISO image using a script such as:<br />
<br />
Pat's [http://slackware.osuosl.org/slackware/isolinux/README.TXT DVD script], AlienBOB's [http://www.slackware.com/~alien/tools/mirror-slackware-current.sh mirror-slackware-current script] or even a custom one of your own.<br />
<br />
== Copy the ISO to the USB flash drive ==<br />
<br />
All that is left to do now is copy the ISO to the USB flash drive.<br />
<br />
This can be done using the [http://linux.die.net/man/1/dd dd] command as the root user.<br />
<br />
to identify the designation of your usb stick/drive use <br />
<br />
fdisk -l<br />
<br />
dd will write the iso to whatever drive you tell it to so make double sure <br />
you have the right drive designation in the following command<br />
<br />
<br />
<br />
The following command will overwrite all the files currently present on the USB drive with a bootable iso<br />
<br />
dd if=slackware-14.2-install-dvd.iso of=/path/to/usb (example of=/dev/sdX)<br />
<br />
PS1. dd expects the name of a device, not a partition, so you should use eg. /dev/sdb instead of /dev/sdb1.<br />
<br />
PS2. the USB drive should NOT be mounted during dd invocation.<br />
<br />
== Installation ==<br />
<br />
Boot the machine using the USB drive.<br />
<br />
Before running '''setup''', look up (with '''fdisk -l''') which device your USB drive is. When installing, choose "Install from a Slackware CD or DVD". Then select the "manual" option, then the "custom" option.<br />
Enter /dev/sdX1 (as shown by "fdisk -l") and installation will proceed as when installing from a DVD.<br />
<br />
== Install with Unetbootin ==<br />
<br />
It is possible to install with unetbootin. Download the Slackware iso image of your choice and then install to a USB drive using unetbootin. Tutorials for unetbootin are everywhere. Then, when you get to the SOURCE option in setup use the drive you are installing slackware from (usually it is /dev/sdb1). When it asks where the packages are, enter /slackware for 32 bit or /slackware64 for 64 bit. This was tested using the Slackware 14.0 64-bit x86_64 iso.</div>Wigumshttps://www.slackwiki.com/index.php?title=Install_Slackware_Using_A_USB_Flash_Drive&diff=3177Install Slackware Using A USB Flash Drive2018-10-27T19:19:44Z<p>Wigums: </p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
Installing Slackware using a USB flash drive is very easy.<br />
<br />
Slackware includes a usbboot.img in the usb-and-pxe-installers directory of the official installation media, which is a minimal image very handy for FTP or other kinds of network installations.<br />
<br />
In the same directory one can also find usbimg2disk.sh, a script that will dump the usbboot.img image to a flash drive, useful in case the above image does not work for you out of the box.<br />
<br />
Additionally, AlienBOB has written two articles in his blog on how to install Slackware using a USB flash drive from either<br />
<br />
[http://alien.slackbook.org/blog/welcome-windows-user/ Microsoft Windows] or [http://alien.slackbook.org/blog/installing-slackware-using-usb-thumb-drive/ Linux].<br />
<br />
This document describes yet another way of creating an image capable of booting from USB, containing all of the packages neeeded for an installation, using [http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE Isohybrid].<br />
<br />
== Prerequisites ==<br />
<br />
A USB flash drive that can fit the ISO image<br />
<br />
Syslinux >= 3.72<br />
<br />
Additionally you should either have:<br />
<br />
a) official Slackware installation media, preferably the DVD ISO one, available on any Slackware mirror<br />
<br />
or<br />
<br />
b) a local copy of the Slackware tree.<br />
<br />
That may be the tree of a stable release, or even the tree of the Slackware current development cycle.<br />
<br />
If you choose to use a local copy of the tree you should be able to create your own ISO image using a script such as:<br />
<br />
Pat's [http://slackware.osuosl.org/slackware/isolinux/README.TXT DVD script], AlienBOB's [http://www.slackware.com/~alien/tools/mirror-slackware-current.sh mirror-slackware-current script] or even a custom one of your own.<br />
<br />
== Copy the ISO to the USB flash drive ==<br />
<br />
All that is left to do now is copy the ISO to the USB flash drive.<br />
<br />
This can be done using the [http://linux.die.net/man/1/dd dd] command as the root user.<br />
<br />
The following command will overwrite all the files currently present on the USB drive so prior backups are highly advisable:<br />
<br />
dd if=slackware-13.1-install-dvd.iso of=/dev/sdX<br />
<br />
PS1. dd expects the name of a device, not a partition, so you should use eg. /dev/sdb instead of /dev/sdb1.<br />
<br />
PS2. the USB drive should NOT be mounted during dd invocation.<br />
<br />
== Installation ==<br />
<br />
Boot the machine using the USB drive.<br />
<br />
Before running '''setup''', look up (with '''fdisk -l''') which device your USB drive is. When installing, choose "Install from a Slackware CD or DVD". Then select the "manual" option, then the "custom" option.<br />
Enter /dev/sdX1 (as shown by "fdisk -l") and installation will proceed as when installing from a DVD.<br />
<br />
== Install with Unetbootin ==<br />
<br />
It is possible to install with unetbootin. Download the Slackware iso image of your choice and then install to a USB drive using unetbootin. Tutorials for unetbootin are everywhere. Then, when you get to the SOURCE option in setup use the drive you are installing slackware from (usually it is /dev/sdb1). When it asks where the packages are, enter /slackware for 32 bit or /slackware64 for 64 bit. This was tested using the Slackware 14.0 64-bit x86_64 iso.</div>Wigums