#########################################################################################################################
Introducing Slackerware -current + Linux-Live Kit + Aufs patched Generic Kernel
About- This is my attempt at making a Slackware based Live distro that is able to be persistent off usb or hard drive, installable to hard drive in "frugal" mode or full install to hard drive or play live in either default or toram mode with/without persistence and without mounting or changing any hard drive partitions, etc.
General Info:
Install to USB/USB-HDD or frugal install to HDD-
You can use /boot/bootinst.bat (windows) to install to usb but you must edit them for paths. Or use a utility like Unetbootin, available through sboui, or do it manually as I'll show you here-
You must be booted from a slackware/debian/ubuntu system or livecd/usb to do this, preferably a 14.2/-current distro.
In whatever linux system you're in, mount the Slacker iso anywhere you want, copy the files/folders to your usb or hard drive for frugal mode (straight hard drive install explained below), then install syslinux (fat32), extlinux (usb/usb-hdd), or grub (usb-hdd/hdd), then reboot and boot from new Slacker.
Frugal install means it runs as a livecd/usb with or without persistence, such as Slax, etc. You can install it in a already installed system such as Linux or Windows without touching, changing or harming the other systems.
In frugal mode you can boot from any fat32/ntfs or ext2/3/4 filesystem on usb/usb-hdd or hdd.
Also, for both EFI and Legacy bios booting, it is best to make a usb with 2 partitions, one fat32 partition and one ext4 partition. The fat32 partition (here sdc1) holds the boot and EFI folders, the ext4 partition (here sdc2) holds the Slackerc folder. You can also just make a single ext4 formatted partition and put all folders from iso on there and install extlinux.
Examples:
Manual frugal install to fat32/ext2/3/4 usb/usb-hdd/hdd
First partition your usb as mentioned above, then mount your usb as root or if you have permission as your user, then mount the Slacker iso, then copy the contents of iso to usb/usb-hdd/hdd, then install the bootloader (syslinux/extlinux/grub/lilo), then reboot into your new system.
In this example, your usb/usb-hdd or hdd partition you're going to install Slacker to is /dev/sda1, please note in your system your usb may be sdb1, sdc1, etc. Please use fdisk -l as root in terminal to find out device name for your usb/hdd partition/drive.
You may edit the below text and copy/paste it into terminal for ease. example supposes your mounting the burned DVD or iso on hard drive, that iso was downloaded to /home/live/Downloads.
As root, in terminal, for DVD mounted from file manager in slackware as /dev/sr0, may be /dev/cdrom in others.
mkdir /mnt/usb1
mkdir /mnt/usb2
mkdir /mnt/iso
mount -o loop /dev/sr0 /mnt/iso
mount /dev/sdc1 /mnt/usb1
mount /dev/sdc2 /mnt/usb2
cp -r /mnt/iso/boot /mnt/usb1
cp -r /mnt/iso/EFI /mnt/usb1
cp -r /mnt/iso/Slackerc /mnt/usb2
from downloaded iso
mkdir /mnt/usb1
mkdir /mnt/usb2
mkdir /mnt/iso
mount -o loop /home/live/Downloads/Slackerc-050719-x86_64.iso /mnt/iso
mount /dev/sdc1 /mnt/usb1
mount /dev/sdc2 /mnt/usb2
cp -r /mnt/iso/boot /mnt/usb1
cp -r /mnt/iso/EFI /mnt/usb1
cp -r /mnt/iso/Slackerc /mnt/usb2
After it finishes copying install syslinux, extlinux, or grub
For fat32 usb/usb-hdd
syslinux -sf /dev/sda1
For ext2, ext3 or ext4 usb/usb-hdd
extlinux -i /mnt/usb
If install grub2 to usb/usb-hdd/hdd
grub-install --force --removable boot-directory=/mnt/usb1 /dev/sdc
##grub-mkconfig -grub-mkconfig -o /boot/grub/grub.cfg
* Make sure your boot flag is set also, use Gparted to do this or in console.
If you already have a Linux bootloader installed just edit your syslinux.cfg/grub.cfg for Slackerc, see /boot/syslinux/syslinux.cfg
Full Install to Hard Drive or USB-HDD- using Lilo or Grub2
*You need to be booted from a Slackerc dvd/usb frugal install to do this!
A manual full install is relatively easy too.
In short- we're gonna do a full install to a hard drive partition from usb/hdd/dvd and the resulting install will function exactly as a full slackware install to hard drive.
First, in this example we're booting from dvd or usb premounted at /mnt/usb (mount -o loop /dev/sr0 /mnt/usb) or usb (mount /dev/sdb1 /mnt/usb) and installing to /dev/sda1 hard drive partition.
Now, we're gonna decompress the Slackerc/Slackerc.sb from a squashfs file into the partition using sb2dir, this will populate the partition with the folders bin, etc, home, lib, lib64, opt, root, sbin, usr, and var. Then we're gonna make the other empty folders for a linux system.
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
cd /mnt/usb/Slackerc
sb2dir Slacker.sb /mnt/sda1
After it finishes do
cd /mnt/sda1
mkdir boot
mkdir dev
mkdir media
mkdir mnt
mkdir proc
mkdir run
mkdir srv
mkdir sys
mkdir tmp
Now you gotta copy the contents of boot/hdkernel to your /mnt/sda1/boot folder
cp -r /mnt/usb/boot/hdkernel/* /mnt/sda1/boot
Now edit /etc/fstab and /etc/lilo.conf using nano or a gui app like Leafpad.
Fstab should look like this
/dev/sda2 swap swap defaults 0 0
/dev/sda1 / ext4 defaults 1 1
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
lilo.conf like this
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda1
#compact # faster, but won't work on all systems.
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
prompt
timeout = 50
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/sda1
label = slackware
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Now we have to make a initrd for the generic live kernel to boot, using /usr/share/mkinitrd/mkinitrd_command_generator.sh
just copy/paste this into terminal, adjust for drive and kernel
mkinitrd -c -k 5.1.9-xanmod6 -f ext4 -r /dev/sda1 -m usb-storage:ums-realtek:ehci-hcd:ehci-pci:uhci-hcd:jbd2:mbcache:ext4:aufs -u -o /mnt/sda1/boot/initrd.gz
Now install lilo or grub to /dev/sda
If installing Grub
grub-install --force --boot-directory=/mnt/sda1/boot /dev/sda
##grub-mkconfig -grub-mkconfig -o /boot/grub/grub.cfg
If Lilo
use pkgtool/rerun slackware install scripts as root to install lilo to /dev/sda
Now reboot into your new system!
Remastering-
You can remaster this distro anytime using the live kit found in /root/linux-live-050719
Edit the configs inside notably build and config for your distro name, etc.
You can do it from persistent/non-persistent live session or hard drive install. You must have a aufs-patched kernel.
as root
cd linux-live-050719
./build
Have fun!