Uuuuuuurgent help!!!!!

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Uuuuuuurgent help!!!!!

Postby Zorba on Thu Feb 28, 2013 8:06 pm

Following this thread http://forums.linuxmint.com/viewtopic.php?f=46&t=104683 Imessed up my grub and when I run
Code: Select all
sudo update-grub
I get
Code: Select all
mint@mint-Inspiron-N5040 ~ $     sudo update-grub
[sudo] password for mint:
Generating grub.cfg ...
Found background image: background.png
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Linux Mint 14 Nadia (14) on /dev/sda5
/etc/grub.d/50_mint_theme: 1: /etc/grub.d/50_mint_theme: mint#!/bin/bash: not found
/etc/grub.d/50_mint_theme: 3: /etc/grub.d/50_mint_theme: source: not found
/etc/grub.d/50_mint_theme: 18: /etc/grub.d/50_mint_theme: is_path_readable_by_grub: not found
done
mint@mint-Inspiron-N5040 ~

I have important work to do now what should I do to fix this????? :shock: :shock: :shock: :shock: :shock:
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Linux Mint is funded by ads and donations.
 

Re: Uuuuuuurgent help!!!!!

Postby kc1di on Thu Feb 28, 2013 8:42 pm

I would download and run boot-repair from here:
https://help.ubuntu.com/community/Boot-Repair

follow the instructions on the page
John 3:16
Morse code an Early
Digital Mode
Registered Linux User #462608
Image
User avatar
kc1di
Level 6
Level 6
 
Posts: 1472
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Uuuuuuurgent help!!!!!

Postby caribriz on Fri Mar 01, 2013 3:12 am

From this thread:
http://forums.linuxmint.com/viewtopic.php?f=46&t=104683&p=693409#p693374

dagon is right:
that file shouldn't have
Code: Select all
mint#!/bin/bash -e


at the beginning of it - it should be
Code: Select all
#!/bin/bash -e


Open /etc/grub.d/06_mint_theme as root.
Copy/paste the original 06_mint_theme file you have been sent.
Save it.
Then sudo update-grub.
Reboot.

I have just followed my own instructions in that thread - which was for Mint 13 Cinnamon,
applying them to an install of Mint 14 Cinnamon (32-bit).

What I did:

Copied an image (as root) from /home/username/Pictures - linuxmint-splashscreen2.png to /boot/grub

Opened (as root) /etc/grub.d/06_mint_theme
Changed the file to look exactly like this - anybody else, of course, would subsitute their own image name in place of linuxmint-splashscreen2.

Code: Select all
#!/bin/bash -e

source /usr/lib/grub/grub-mkconfig_lib

set_mono_theme()
{
  cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
EOF
}

# check for usable backgrounds
use_bg=true
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
#  for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do
   for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint-splashscreen2.{png,tga} ; do
    if is_path_readable_by_grub $i ; then
      bg=$i
      case ${bg} in
        *.png)      reader=png ;;
        *.tga)      reader=tga ;;
        *.jpg|*.jpeg)   reader=jpeg ;;
      esac
      if test -e /boot/grub/${reader}.mod ; then
        echo "Found Debian background: `basename ${bg}`" >&2
        #use_bg=true
        break
      fi
    fi
  done
fi

# set the background if possible
#if ${use_bg} ; then
#  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
#  cat << EOF
#insmod ${reader}
#if background_image `make_system_path_relative_to_its_root ${bg}` ; then
#  set color_normal=white/black
#  set color_highlight=white/light-gray
#else
#EOF
#fi

# otherwise, set a monochromatic theme for Ubuntu
#if ${use_bg} ; then
#  set_mono_theme | sed -e "s/^/  /g"
#  echo "fi"
#else
set_mono_theme
#fi   


Saved the file.

Open a terminal:
Code: Select all
sudo update-grub


Reboot.

It worked exactly as expected with my grub2 splashscreen image displayed.

Note: I hadn't actually done this prior to today for Mint 14 Cinnamon. I had done it for previous Mint installs, but I just hadn't bothered to do it for Mint 14 Cinnamon until now. But as I said, it worked perfectly.


In the original thread, the section I put in beginning with:

So that section of the file should then look like this - with your image name substituted of course:



is exactly the same as what I have just used today.

Note: I have amended the original "how to" post for clarity. See here:
http://forums.linuxmint.com/viewtopic.php?f=46&t=104683&p=591616&sid=2d80005d61902fd6f9b6f35da9335cd8#p591616
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 887
Joined: Mon Nov 28, 2011 7:43 am

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Fri Mar 01, 2013 1:03 pm

Thanks for your help :D :D But I have done exactly the same but when I run
Code: Select all
sudo update-grub
I get this error:
Code: Select all
mint@mint-Inspiron-N5040 ~ $     sudo update-grub
[sudo] password for mint:
Generating grub.cfg ...
Found background image: linuxmint-splashscreen2.png
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Linux Mint 14 Nadia (14) on /dev/sda5
/etc/grub.d/50_mint_theme: 1: /etc/grub.d/50_mint_theme: mint#!/bin/bash: not found
/etc/grub.d/50_mint_theme: 3: /etc/grub.d/50_mint_theme: source: not found
/etc/grub.d/50_mint_theme: 18: /etc/grub.d/50_mint_theme: is_path_readable_by_grub: not found
done
mint@mint-Inspiron-N5040 ~ $
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby caribriz on Fri Mar 01, 2013 4:12 pm

Can you open a terminal and enter:
Code: Select all
cat /etc/grub.d/06_mint_theme

Copy and paste and resulting text here.
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 887
Joined: Mon Nov 28, 2011 7:43 am

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Fri Mar 01, 2013 4:16 pm

I have copied it from your post and it looks like this:
Code: Select all
mint@mint-Inspiron-N5040 ~ $     cat /etc/grub.d/06_mint_theme
#!/bin/bash -e

source /usr/lib/grub/grub-mkconfig_lib

set_mono_theme()
{
  cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
EOF
}

# check for usable backgrounds
use_bg=true
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
#  for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do
   for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint-splashscreen2.{png,tga} ; do
    if is_path_readable_by_grub $i ; then
      bg=$i
      case ${bg} in
        *.png)      reader=png ;;
        *.tga)      reader=tga ;;
        *.jpg|*.jpeg)   reader=jpeg ;;
      esac
      if test -e /boot/grub/${reader}.mod ; then
        echo "Found Debian background: `basename ${bg}`" >&2
        #use_bg=true
        break
      fi
    fi
  done
fi

# set the background if possible
#if ${use_bg} ; then
#  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
#  cat << EOF
#insmod ${reader}
#if background_image `make_system_path_relative_to_its_root ${bg}` ; then
#  set color_normal=white/black
#  set color_highlight=white/light-gray
#else
#EOF
#fi

# otherwise, set a monochromatic theme for Ubuntu
#if ${use_bg} ; then
#  set_mono_theme | sed -e "s/^/  /g"
#  echo "fi"
#else
set_mono_theme
#fi 
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Fri Mar 01, 2013 4:24 pm

PS I'm using burg for now for fear of a failed boot if I reboot my PC :(
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby caribriz on Fri Mar 01, 2013 4:34 pm

PS I'm using burg for now for fear of a failed boot if I reboot my PC :(

Maybe a good idea - also backing up everything else would also be advisable.

I just noticed in the other thread - in this post:
http://forums.linuxmint.com/viewtopic.php?f=46&t=104683#p693409

You say:
I saved it and run
Code: Select all
sudo update-grub

and got:
Code: Select all
mint@mint-Inspiron-N5040 ~ $     sudo update-grub
    [sudo] password for mint:
    Generating grub.cfg ...
    Found background image: background.png
    Found linux image: /boot/vmlinuz-3.5.0-17-generic
    Found initrd image: /boot/initrd.img-3.5.0-17-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Linux Mint 14 Nadia (14) on /dev/sda5
    /etc/grub.d/50_mint_theme: 1: /etc/grub.d/50_mint_theme: mint#!/bin/bash: not found
    /etc/grub.d/50_mint_theme: 3: /etc/grub.d/50_mint_theme: source: not found
    /etc/grub.d/50_mint_theme: 18: /etc/grub.d/50_mint_theme: is_path_readable_by_grub: not found
    done
    mint@mint-Inspiron-N5040 ~



It's saying in those lines:
/etc/grub.d/50_mint_theme: mint#!/bin/bash: not found

It should be
06_mint_theme

Can you post what files are in your /etc/grub.d folder?
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 887
Joined: Mon Nov 28, 2011 7:43 am

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Fri Mar 01, 2013 4:43 pm

Image
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby caribriz on Fri Mar 01, 2013 4:52 pm

This is mine - no 50_mint_theme file.
I don't have this file in my grub.d
grub.d folder.png


Can you open a terminal, enter
cat /etc/grub.d/50_mint_theme
and post the results?

PS. The above screenshot is from LM13 Cinnamon - which I'm on at the moment.
I'll switch to LM14 Cinnamon.

This is LM14 Cinnamon's grub.d folder - it's contents are different from yours - but still no 50_mint-theme:

LM14 Cinnamon grub.d folder.png
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 887
Joined: Mon Nov 28, 2011 7:43 am

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Fri Mar 01, 2013 6:38 pm

Amazing!! :roll: :roll: When I run
Code: Select all
cat /etc/grub.d/50_mint_theme

I get:
Code: Select all
mint@mint-Inspiron-N5040 ~ $ cat /etc/grub.d/50_mint_theme
mint#!/bin/bash -e

source /usr/lib/grub/grub-mkconfig_lib

set_mono_theme()
{
  cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
EOF
}

# check for usable backgrounds
use_bg=true
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
#  for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do
   for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint-splashscreen2.{png,tga,jpg} ; do
    if is_path_readable_by_grub $i ; then
     bg=$i
     case ${bg} in
        *.png)      reader=png ;;
        *.tga)      reader=tga ;;
       *.jpg|*.jpeg)   reader=jpeg ;;
      esac
     if test -e /boot/grub/${reader}.mod ; then
        echo "Found Debian background: `basename ${bg}`" >&2
        #use_bg=true
        break
      fi
    fi
 done
fi


# set the background if possible
#if ${use_bg} ; then
#  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
#  cat << EOF
#insmod ${reader}
#if background_image `make_system_path_relative_to_its_root ${bg}` ; then
#  set color_normal=white/black
#  set color_highlight=white/light-gray
#else
#EOF
#fi

# otherwise, set a monochromatic theme for Ubuntu
#if ${use_bg} ; then
#  set_mono_theme | sed -e "s/^/  /g"
#  echo "fi"
#else
set_mono_theme
#fi
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby caribriz on Fri Mar 01, 2013 7:18 pm

I guess that's the problem.
As far as I can see, that file is identical to 06_mint_theme, except for the word "mint" at the beginning of the line.

You must have somehow put it in the file when you were trying to replace it, and *somehow* ended up with the additional file
named 50_mint_theme.

If it were me, I would just delete that file - 50_mint_theme (as root).
Make sure you have an appropriate image in /boot/grub titled linuxmint-splashscreen2.png
Then run sudo update-grub.

Edit: I have no experience of using burg. You might have to disable it ????? before you do the above. I don't know.

But I'm not you. Do it at your own risk.
If you're happy using burg - well use that.
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 887
Joined: Mon Nov 28, 2011 7:43 am

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Fri Mar 01, 2013 7:39 pm

I don't remember doing anything like that but I think something wicked happened!! I like burg but I have created a this new splash screen and grub background http://forums.linuxmint.com/viewtopic.php?f=25&t=127015 that I want to test :( :(
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby caribriz on Fri Mar 01, 2013 8:09 pm

It seems an unhappy accident occurred.

We've pinpointed the problem - and now it's up to you as to how you proceed.
Maybe make a complete backup image before you mess around with it further? I would do that. :wink:
Good luck.
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 887
Joined: Mon Nov 28, 2011 7:43 am

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Fri Mar 01, 2013 8:24 pm

Thanks for your help! I think I will delete that file and see what will happen :D :D
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby Zorba on Sat Mar 02, 2013 7:26 am

Thanks that solved the problem. I have deleted that /etc/grub.d/50_mint_theme file and I don't get that error msg anymore but I don't know whether it's safe to reinstall grub and replace burg. How can I test grub without reboot?
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2292
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: Uuuuuuurgent help!!!!!

Postby caribriz on Sat Mar 02, 2013 11:26 pm

Brahim wrote:.... but I don't know whether it's safe to reinstall grub and replace burg. How can I test grub without reboot?


Sorry, I have no idea. :(
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 887
Joined: Mon Nov 28, 2011 7:43 am

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: CaliforniaL33 and 12 guests