-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrotatekernel
executable file
·53 lines (42 loc) · 950 Bytes
/
rotatekernel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# This rotares the kernel files for refind bootloader.
# Usefull when using UEFI and the archlinux kernel was more or less needed to
# be moved. If this still applies to new installations is questionable.
# Licence GPL
# Author Artur Olech
# Justice @freenode #Archlinux
error(){
case "$1" in
0) echo "Error, cannot change directory to "$2""
error 2
;;
1) echo "Error cannot copy file "$2""
error 2
;;
2) echo "Aborting..."
exit 1
;;
*) echo "Unknown error"
error 2
;;
esac
}
copy(){
echo "moving "$1"..."
sudo cp "$1" efi/EFI/arch || error 1 "$1"
}
echo "[Rotating kernel]"
if cd /boot; then
echo "Arch"
copy "initramfs-linux-fallback.img"
copy "initramfs-linux.img"
copy "vmlinuz-linux"
# echo "Arch-ck"
# copy "initramfs-linux-ck-fallback.img"
# copy "initramfs-linux-ck.img"
# copy "vmlinuz-linux-ck"
else
error 0 "/boot"
fi
echo "[Moving complete]"
exit 0