Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########
- # Adding comments like this to split up the scripts
- ########
- root@optepr0n:~/bin# cat kopier.sh boot-symlinker.sh mkinitrd-optepr0n-swagg.sh
- ########
- # This first one copies the kernel files to /boot
- ########
- #!/bin/sh
- if [ -z "$1" ]; then
- echo "usage: $0 <KERNEL VERSION>"
- exit 64
- fi
- cp /usr/src/linux-"$1"/arch/x86/boot/bzImage /boot/vmlinuz-swagg-"$1"
- cp /usr/src/linux-"$1"/.config /boot/config-swagg-"$1"
- cp /usr/src/linux-"$1"/System.map /boot/System.map-swagg-"$1"
- ########
- # This one creates the symlinks in /boot
- ########
- #!/bin/sh
- if [ -z "$1" ]; then
- echo "usage: $0 <KERNEL VERSION>"
- exit 64
- fi
- echo 'Changing dir to /boot'
- cd /boot || exit 65
- echo 'Symlinking System.map'
- ln -sf System.map-swagg-"$1" System.map || exit 65
- echo 'Symlinking config'
- ln -sf config-swagg-"$1" config || exit 65
- echo 'Symlinking vmlinuz'
- ln -sf vmlinuz-swagg-"$1" vmlinuz-swagg || exit 65
- # `shellcheck` says this next line is bad, probably should fix it
- echo "$( ls -l /boot | grep "^l" )"
- echo "DONE"
- ########
- # This one I created from the mkinitrd helper script, probably should break up the long line using back slashes
- ########
- #!/bin/sh
- #
- # mkinitrd_command_generator.sh revision 1.45
- #
- # This script will now make a recommendation about the command to use
- # in case you require an initrd image to boot a kernel that does not
- # have support for your storage or root filesystem built in
- # (such as the Slackware 'generic' kernels').
- # A suitable 'mkinitrd' command will be:
- if [ -z "$1" ]; then
- echo "usage: $0 <KERNEL VERSION>"
- exit 64
- fi
- mkinitrd -c -k "$1" -f xfs -r /dev/md0 -m xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:xfs -R -u -o /boot/initrd-swagg.gz
- ########
- # Here's my lilo.conf, relevant stuff at bottom
- ########
- root@optepr0n:~/bin# cat /etc/lilo.conf
- # LILO configuration file
- # generated by 'liloconfig'
- #
- # Start LILO global section
- # Append any additional kernel parameters:
- append="root=/dev/md0 vt.default_utf8=1"
- boot = /dev/md2
- raid-extra-boot = mbr-only
- #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
- # Wait until the timeout to boot (if commented out, boot the
- # first entry immediately):
- prompt
- # Timeout before the first entry boots.
- # This is given in tenths of a second, so 600 for every minute:
- timeout = 100
- # Override dangerous defaults that rewrite the partition table:
- change-rules
- reset
- # 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
- # End LILO global section
- # Linux bootable partition config begins
- default = Linux-swagg
- image = /boot/vmlinuz
- initrd = /boot/initrd.gz
- root = /dev/md0
- label = Linux
- read-only
- image = /boot/vmlinuz-swagg
- initrd = /boot/initrd-swagg.gz
- root = /dev/md0
- label = Linux-swagg
- read-only
- # Linux bootable partition config ends
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement