Should I keep or replace /etc/grub.d/10_linux?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
VanessaTL

Should I keep or replace /etc/grub.d/10_linux?

Post by VanessaTL »

I ran Update Manager, and now it's asking me whether I want to keep or replace /etc/grub.d/10_linux. Which should I choose? The differences are below.




--- /etc/grub.d/10_linux 2013-12-31 13:55:18.791974218 +0800
+++ /etc/grub.d/10_linux.dpkg-new 2013-12-06 18:06:55.000000000 +0800
@@ -82,13 +82,13 @@
version="$2"
recovery="$3"
args="$4"
- description="`grep GRUB_TITLE /etc/linuxmint/info | awk -F = '{print $2}'`"
if ${recovery} ; then
- title="${description}, ${version} (${GRUB_DEVICE_BOOT}) -- recovery mode"
+ title="$(gettext_quoted "%s, with Linux %s (%s)")"
+ printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")"
else
- title="${description}, ${version} (${GRUB_DEVICE_BOOT})"
+ title="$(gettext_quoted "%s, with Linux %s")"
+ printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
fi
- printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
cat << EOF
recordfail
EOF
@@ -121,9 +121,15 @@
echo '$message'
EOF
fi
- cat << EOF
+ if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then
+ cat << EOF
+ linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}
+EOF
+ else
+ cat << EOF
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
+ fi
if test -n "${initrd}" ; then
if [ "x$5" != "xquiet" ]; then
message="$(gettext_printf "Loading initial ramdisk ...")"
@@ -156,8 +162,8 @@

cat << 'EOF'
function gfxmode {
- set gfxpayload="$1"
- if [ "$1" = "keep" ]; then
+ set gfxpayload="${1}"
+ if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
@@ -171,7 +177,7 @@
echo "set linux_gfx_mode=$GRUB_GFXPAYLOAD_LINUX"
else
cat << EOF
-if [ \${recordfail} != 1 ]; then
+if [ "\${recordfail}" != 1 ]; then
if [ -e \${prefix}/gfxblacklist.txt ]; then
if hwmatch \${prefix}/gfxblacklist.txt 3; then
if [ \${match} = 0 ]; then
@@ -192,12 +198,19 @@
fi
cat << EOF
export linux_gfx_mode
-if [ "\$linux_gfx_mode" != "text" ]; then load_video; fi
+if [ "\${linux_gfx_mode}" != "text" ]; then load_video; fi
EOF

in_submenu=false
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
+ case $linux in
+ *.efi.signed)
+ # We handle these in linux_entry.
+ list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
+ continue
+ ;;
+ esac
echo "Found linux image: $linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
eanfrid

Re: Should I keep or replace /etc/grub.d/10_linux?

Post by eanfrid »

The normal - safe - rule is to always keep existing config files because...

1/ they are already working
2/ they may (should) contain custom/local tuning that would be overwritten if you would replace them with newer default config files

If however the new release of the upgraded software needs real changes or bring new config features over the older one, you will still find the new default config file(s) with an added ".new" suffix. You can then review later which changes you may wish to - manually - apply into your existing config files.
Last edited by eanfrid on Sat Jan 04, 2014 10:14 am, edited 1 time in total.
computerbob

Re: Should I keep or replace /etc/grub.d/10_linux?

Post by computerbob »

I always update to the package maintainers version. I've never had a problem or lost config settings.
eanfrid

Re: Should I keep or replace /etc/grub.d/10_linux?

Post by eanfrid »

Will probably be the case only if you never run any network service, like apache, openssh, openvpn, ftp, *sql, postfix/sendmail/exim, samba, jabber, ldap, imap and so on :)
VanessaTL

Re: Should I keep or replace /etc/grub.d/10_linux?

Post by VanessaTL »

Thanks, everyone. I decided to replace the file. I thought that since I had fresh install of Mint 13 without any custom modifications to the file, I might as well go with the new.
eanfrid

Re: Should I keep or replace /etc/grub.d/10_linux?

Post by eanfrid »

:?
eanfrid wrote:The normal - safe - rule is to always keep existing config files
E.g. if your OS now says it is Ubuntu instead of Linux Mint, you will know why...
Locked

Return to “Beginner Questions”