Skip to content

Instantly share code, notes, and snippets.

@whoizit
Last active September 4, 2019 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whoizit/5b37a986204946a95b07fb90343736dc to your computer and use it in GitHub Desktop.
Save whoizit/5b37a986204946a95b07fb90343736dc to your computer and use it in GitHub Desktop.
kiss minimal install
### Partitioning
fdisk /dev/sda
(o) New DOS table
(n) All free space, Linux filesystem
(w) write and exit
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt
# getkiss.org not available in Russia, so I make short urls for github links
# also using kiss fork with quiet build & install
wget tinyurl.com/{kiss-chroot{,-tar-xz},kiss-whoami}
mv kiss-whoami /bin/kiss-it
chmod +x /bin/kiss-it
tar xvf kiss-chroot-tar-xz -C /mnt --strip-components 1
sh kiss-chroot /mnt
### Build kernel
passwd
# (optional) vi /etc/fstab
vi /etc/profile.d/flags.sh
export CFLAGS="-O3 -pipe -march=native"
export CXXFLAGS="$CFLAGS"
export MAKEFLAGS="-j$((`nproc`+1))"
sh -l
kiss-it update
kiss-it build grub baseinit
git clone -b v5.2.11 --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
cd linux-stable
make defconfig
make $MAKEFLAGS
make install modules_install
cd /boot
V=5.2.11
mv vmlinuz vmlinuz-$V
mv System.map System.map-$V
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
### Update kernel
cd linux-stable
git fetch --tags
git checkout `git tag | grep -v rc | sort -V | tail -1`
make $MAKEFLAGS
cp .config /boot/config-`uname -r`
make install modules_install
cd /boot
V=5.2.11
mv vmlinuz vmlinuz-$V
mv System.map System.map-$V
grub-mkconfig -o /boot/grub/grub.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment