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

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

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

Postby VanessaTL on Tue Dec 31, 2013 3:16 am

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`
VanessaTL
Level 2
Level 2
 
Posts: 82
Joined: Sat Oct 13, 2012 1:56 pm

Linux Mint is funded by ads and donations.
 

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

Postby eanfrid on Tue Dec 31, 2013 5:46 am

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.
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

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

Postby computerbob on Wed Jan 01, 2014 5:46 pm

I always update to the package maintainers version. I've never had a problem or lost config settings.
computerbob
Level 4
Level 4
 
Posts: 284
Joined: Wed Jan 01, 2014 1:55 pm

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

Postby eanfrid on Wed Jan 01, 2014 6:20 pm

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 :)
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

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

Postby VanessaTL on Sat Jan 25, 2014 4:36 am

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.
VanessaTL
Level 2
Level 2
 
Posts: 82
Joined: Sat Oct 13, 2012 1:56 pm

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

Postby eanfrid on Sat Jan 25, 2014 12:10 pm

:?
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...
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR


Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot], H.Remedy, qsvhkong and 22 guests