Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Kernel Installer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Canek Peláez Valdés
Kernel Installer
Commits
909361ab
Commit
909361ab
authored
11 years ago
by
Canek Peláez Valdés
Browse files
Options
Downloads
Patches
Plain Diff
boot-manager: Now that GRUB2 is stable in Gentoo, it makes no sense to
keep supporting GRUB.
parent
de11dc7c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
kerninst
+2
-38
2 additions, 38 deletions
kerninst
kerninst.conf
+1
-23
1 addition, 23 deletions
kerninst.conf
with
3 additions
and
61 deletions
kerninst
+
2
−
38
View file @
909361ab
...
...
@@ -93,45 +93,9 @@ function update_grub2() {
/usr/sbin/grub2-mkconfig
-o
"
${
GRUB2_CONFIG_FILE
}
"
&>>
"
${
LOGFILE
}
"
||
die
}
function
update_grub
()
{
einfo
"Generating /boot/grub/grub.conf..."
KERNELS
=
$(
find /boot
-name
"vmlinuz*"
|
sort
-r
-V
)
echo
"
${
GRUB_HEADER
}
"
>
/boot/grub/grub.conf
||
die
for
KERNEL
in
${
KERNELS
}
;
do
KV
=
$(
echo
${
KERNEL
}
|
sed
"s@/boot/vmlinuz-@@g"
)
cat
<<
EOF
>> /boot/grub/grub.conf || die
title
${
GRUB_KERNEL_TITLE
}
(kernel
${
KV
}
)
root
${
GRUB_ROOT_PARTITION
}
kernel
${
KERNEL
}
root=
${
ROOT_PARTITION
}
init=
${
INIT
}
${
INIT_OPTIONS
}
EOF
einfo
"Added
${
KERNEL
}
kernel."
if
[
-f
"/boot/initrd-
${
KV
}
"
]
;
then
echo
"initrd /boot/initrd-
${
KV
}
"
>>
/boot/grub/grub.conf
||
die
einfo
"Added /boot/initrd-
${
KV
}
initramfs."
fi
done
/bin/chmod 600 /boot/grub/grub.conf
}
function
update_bootmanager
()
{
einfo
"Updating
${
BOOTMANAGER
}
..."
case
"
${
BOOTMANAGER
}
"
in
GRUB
)
update_grub
;;
GRUB2
)
einfo
"Updating GRUB2..."
update_grub2
;;
*
)
ewarn
"Invalid bootmanager
${
BOOTMANAGER
}
."
esac
}
EXEC_NAME
=
$(
/usr/bin/basename
"
$0
"
)
...
...
This diff is collapsed.
Click to expand it.
kerninst.conf
+
1
−
23
View file @
909361ab
# The file with the kernel configuration. This file should be in /etc.
KERNEL_CONFIG
=
"/etc/kerninst/kernel-config"
# Init to use
INIT
=
"/usr/lib/systemd/systemd"
# Init options
INIT_OPTIONS
=
"quiet"
# Bootmanager (one of GRUB or GRUB2)
BOOTMANAGER
=
"GRUB2"
# The root of GRUB
GRUB_ROOT_PARTITION
=
"(hd0,0)"
# The root partition in the GRUB kernel command line
ROOT_PARTITION
=
"/dev/sda1"
# The header of the GRUB configuration file
GRUB_HEADER
=
"
default
0
timeout
5
"
# Title for the kernels in GRUB
GRUB_KERNEL_TITLE
=
"Gentoo Linux"
# GRUB2 configuration file
GRUB2_CONFIG_FILE
=
"/boot/grub
2
/grub.cfg"
GRUB2_CONFIG_FILE
=
"/boot/grub/grub.cfg"
# Wether to include firmware files
INCLUDE_FIRMWARE
=
"no"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment