1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/silo/stone_mod_silo.sh
3 # Copyright (C) 2004 - 2025 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # [MAIN] 70 silo SILO Boot Loader Setup
15 create_kernel_list
() {
17 for x
in `(cd /boot/; ls vmlinuz-*) | sort -Vr`; do
18 if [ $first = 1 ]; then
21 label
=linux-
${x/vmlinuz-/}
29 initrd=$bootpath/initrd-${ver}
36 cat << EOT > /boot/silo.conf
38 # /boot/silo.conf created with the T2 SDE SILO STONE module
42 # Second silo image chooser delay
47 create_kernel_list
>> /boot
/silo.conf
49 gui_message
"This is the new /boot/silo.conf file:
51 $( cat /boot/silo.conf )"
56 gui_cmd
'Installing SILO' "echo 'calling silo'; silo -C /boot/silo.conf"
61 local dev
="`grep \" $1 \" /proc/mounts | tail -n 1 |
63 if [ ! "$dev" ]; then # try the higher dentry
64 local try
="`dirname $1`"
65 dev
="`grep \" $try \" /proc/mounts | tail -n 1 | \
68 if [ -h "$dev" ]; then
69 echo "/dev/`readlink $dev`"
78 dir
="`dirname $dir`/`readlink $dir`"
79 dir
="`echo $dir | sed 's,[^/]*/\.\./,,g'`"
85 bootdev
="`device4 /boot`"
87 if [ "$rootdev" = "$bootdev" ]
88 then bootpath
=/boot
; else bootpath
=""; fi
90 if [ ! -f /boot
/silo.conf
]; then
91 if gui_yesno
"SILO does not appear to be configured.
92 Automatically install SILO now?"; then
94 if ! silo_install
; then
95 gui_message
"There was an error while installing SILO."
102 gui_menu yaboot
'SILO Boot Loader Setup' \
103 "Root Device ........... $rootdev" "" \
104 "Boot Device ........... $bootdev" "" \
105 "Boot Path ............. $bootpath" "" \
107 '(Re-)Create silo.conf with installed kernels' 'create_silo_conf' \
108 '(Re-)Install SILO' 'silo_install' \
110 "Edit /boot/silo.conf (Config file)" \
111 "gui_edit 'STONE Configuration' /boot/silo.conf"