chroot /mnt /usr/share/mkinitrd/mkinitrd_command_generator.sh
… a fairly commonly-generated command:
chroot /mnt mkinitrd -c -k 3.10.17 -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:ehci-pci:usbhid:hid_generic:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
disk = /dev/vda bios = 0x80 max-partitions = 7
chroot /mnt lilo
cp /mnt/sbin/initscript.sample /mnt/sbin/initscript
ulimit -Hn 32768
ln -s /sbin/initscript /mnt/etc/initscript
… at this point, system can be booted, or some pre-emptive changes can be made:
vi /mnt/etc/passwd
vi /mnt/etc/sudoers
… Now, log in as root and:
chsh -s /bin/ksh root
/etc/rc.d/rc.sshd restart
# Add routing for WAN network on physical host route add -host 24.159.210.154 eth0 route add -net 24.159.210.152 netmask 255.255.255.248 gw 24.159.210.154 eth0
chmod 744 /etc/rc.d/rc.ntpd
server <ntpserveripaddr> iburst
restrict default ignore
restrict <ntpserveripaddr> mask 255.255.255.255 nomodify notrap noquery
Put your login in the wheel
group, and in /etc/polkit-1/rules.d/50-default.rules
:
polkit.addRule(function(action, subject) { if (subject.isInGroup("wheel")) { return polkit.Result.YES; } });
See official documentation ...
get-pip.py
script from the official documentation sitepython get-pip.py
, which will install pip
as well as pysetuptools
After installing slackware, and sanitizing it to FreeSlack, these steps can be used to convert the installation to an operationally “live” variant, which minimizes changes to disk during routine operation.
/var
footprint mkdir /var/live
mount -t tmpfs tmpfs /var/live -o nodev,uid=0,gid=0,size=100m
/var
subdirectories to under the live portion, one at a time, with: cd /var ; mv subdirname live ; ln -s live/subdirname
cache
, lib
, lock
, log
, run
, spool
, state
, tmp
rsync -ai /var/live /var/static
rsync -ai /var/live/ /opt/sys/var
mkdir -p /var/static/usr /var/live/usr/share
chmod 755 /var/static/usr /var/live/usr /var/live/usr/share
cd /usr/share
mv mime /var/live/usr/share
ln -s /var/live/usr/share/mime
rsync -ai /var/live/usr/ /var/static/usr/
/var
footprint can be a bit diverse, and there are some of these things that benefit from some persistence across a reboot. To accommodate this (as well as minimize in-memory space occupied by the “live” footprint), one can migrate selected subdirectories from the directory tree under /var/live
, in a rather “surgical” fashion, to a location designated as the “persistent storage layer” (I chose /opt/sys/var
), and populate the /var/live
tree with the symbolic links to the respective locations. In doing this with a stock slackware installation, I start out with these links:/var/live/log/setup -> /opt/sys/var/log/setup /var/live/log/scripts -> /opt/sys/var/log/scripts /var/live/log/removed_scripts -> /opt/sys/var/log/removed_scripts /var/live/log/removed_packages -> /opt/sys/var/log/removed_packages /var/live/log/packages -> /opt/sys/var/log/packages /var/live/lib/virtuoso -> /opt/sys/var/lib/virtuoso /var/live/lib/rpm -> /opt/sys/var/lib/rpm /var/live/cache/ldconfig -> /opt/sys/var/cache/ldconfig /var/live/cache/fontconfig -> /opt/sys/var/cache/fontconfig
/var/live
, synchronizing to /var/static
should be performed. This can either be done manually by repeating the process under /var/static
, or it can be scripted, or (if no other undesired changes have occurred under /var/live
): rsync -ai /var/live/ /var/static/
/etc/rc.d/rc.S
before loading loop device kernel module:# Mount the live filesystem if [ -d /var/live/log ]; then /sbin/mount -v -n -t tmpfs tmpfs /var/live -o nodev,uid=0,gid=0,size=100m /sbin/mount -v -n -t tmpfs tmpfs /tmp -o nodev,uid=0,gid=0,size=256m fi
/etc/rc.d/rc.S
before Configure ISA Plug-n-Play devices:# Add /var/live to /etc/mtab, and sync from static: /sbin/mount -f tmpfs /tmp -t tmpfs /sbin/mount -f tmpfs /var/live -t tmpfs /usr/bin/rsync -ai /var/static/ /var/live/
Links: Linux Info … Tech Info