LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   grub modification are not into effect (https://www.linuxquestions.org/questions/linux-newbie-8/grub-modification-are-not-into-effect-4175558895/)

_Turtle 11-15-2015 12:40 AM

grub modification are not into effect
 
I added /etc/default/grub : GRUB_BACKGROUND=/usr/share/images/grub/image_name

and then saved that file. then I ran the command "sudo update-grub"
It went well without reporting any errors but when I rebooted the system effect was not into place.

berndbausch 11-15-2015 12:46 AM

From the gnu grub documentation:
Quote:

GRUB_BACKGROUND
Set a background image for use with the gfxterm graphical terminal. The value of this option must be a file readable by GRUB at boot time, and it must end with .png, .tga, .jpg, or .jpeg. The image will be scaled if necessary to fit the screen.
Try putting the file under /boot, where grub can read it.
I also wonder about the pathname. Does it have to be relative to /boot?

_Turtle 11-15-2015 01:07 AM

further information
 
the file name is /usr/share/images/grub/Windbuchencom.tga

I describe what I did in steps:

1. I ran the command "sudo apt-get install grub2-splashimages
2. then I added the following line to the end of the /etc/deafult/grub file
GRUB_BACKGROUND="/usr/share/images/grub/Windbuchencom.tga
3. then I ran the command "sudo update-grub"
It created the file menu.lst

4. then I rebooted the system but the changes didn't take into effect

Same thing has happened to me when I compiled the kernel 4.0.4 Everything went all good . There was an entry vmlinuz-4.0.4kernel_4.0.4 and a file named initrd.img-4.0.4kernel_4.0.4 in the menu.lst file but grub doesn't show the kernel during boot time to choose.

berndbausch 11-15-2015 02:13 AM

Quote:

Originally Posted by _Turtle (Post 5449856)
the file name is /usr/share/images/grub/Windbuchencom.tga

I describe what I did in steps:

1. I ran the command "sudo apt-get install grub2-splashimages
2. then I added the following line to the end of the /etc/deafult/grub file
GRUB_BACKGROUND="/usr/share/images/grub/Windbuchencom.tga
3. then I ran the command "sudo update-grub"
It created the file menu.lst

4. then I rebooted the system but the changes didn't take into effect

Same thing has happened to me when I compiled the kernel 4.0.4 Everything went all good . There was an entry vmlinuz-4.0.4kernel_4.0.4 and a file named initrd.img-4.0.4kernel_4.0.4 in the menu.lst file but grub doesn't show the kernel during boot time to choose.

Two minutes googling for "grub2-splashimages" yielded this: http://community.linuxmint.com/tutorial/view/1357.

yancek 11-15-2015 08:39 AM

You don't indicate which Grub version you are using. Different methods for different versions, see the link below.

https://help.ubuntu.com/community/Grub2/Displays

In your original post, you indicate you edited the /etc/defaul/grub file to set the background image and in your second post you state "It created the file menu.lst". There is no menu.lst file in Grub2. There is no /etc/default/grub file in Grub Legacy.

_Turtle 11-16-2015 12:29 AM

grub version
 
$grub --version
this command yielded the o/p :
grub (GNU GRUB 0.97)

I am also surprised that both of the files "/boot/grub/grub.cfg" as well as "/boot/grub/menu.lst" exist.

berndbausch 11-16-2015 01:21 AM

Quote:

Originally Posted by _Turtle (Post 5450210)
$grub --version
this command yielded the o/p :
grub (GNU GRUB 0.97)

I am also surprised that both of the files "/boot/grub/grub.cfg" as well as "/boot/grub/menu.lst" exist.

I don't think the old grub has background image support, so you may have grub 2 installed in the boot sector and grub 0.97 on your system. Or both versions of grub on your system.

In any case, /etc/defaults/grub won't have an effect with version 0.97.

_Turtle 11-16-2015 02:32 AM

conclusion to grub
 
should I update the grub version to grub2 ?
I am still confused by your statement that Grub2 is on the boot sector and grub 0.97 on the system. Please don't get annoyed and if possible tell me how to proceed from here because last time I compiled a kernel 4.0.4 ( for learning purpose) and its entry exists in the menu.lst file but does not show during boot time, and Now I am stuck with this problem. I even changed the following line in the /boot/default/grub :
timeout 30

default 1

but this also does not meets the expectations. ( nothing happens at all)

_Turtle 11-16-2015 02:34 AM

conclusion to grub
 
should I update the grub version to grub2 ?
I am still confused by your statement that Grub2 is on the boot sector and grub 0.97 on the system. Please don't get annoyed and if possible tell me how to proceed from here because last time I compiled a kernel 4.0.4 ( for learning purpose) and its entry exists in the menu.lst file but does not show during boot time, and Now I am stuck with this problem. I even changed the following line in the /etc/default/grub :
timeout 30

default 1

but this also does not meets the expectations. ( nothing happens at all)

_Turtle 11-16-2015 02:34 AM

conclusion to grub
 
should I update the grub version to grub2 ?
I am still confused by your statement that Grub2 is on the boot sector and grub 0.97 on the system. Please don't get annoyed and if possible tell me how to proceed from here because last time I compiled a kernel 4.0.4 ( for learning purpose) and its entry exists in the menu.lst file but does not show during boot time, and Now I am stuck with this problem. I even changed the following line in the /etc/default/grub :
timeout 30

default 1
and then $sudo update-grub

but this also does not meets the expectations. ( nothing happens at all)

berndbausch 11-16-2015 03:27 AM

Quote:

Originally Posted by _Turtle (Post 5450257)
should I update the grub version to grub2 ?
I am still confused by your statement that Grub2 is on the boot sector and grub 0.97 on the system.

Grub is a boot loader. This is how grub 0.97 is structured: It consists of a 512 byte assembly program in the bootsector (perhaps the right term is MBR - master boot record) at the very beginning of the first disk, additional code located right after the disk's partition table, and more code in the /boot filesystem. These three pieces of code are named stages 1, 1.5 and 2 of grub, respectively.
I don't know version 2 too well but doubt that is conceptually different.

To update the bootsector and configure grub, you need software in your operating system. For example, grub-install (part of 0.97) copies stage 1 into the bootsector and stage 1.5 to the location after the partition table. /boot/grub/menu.lst or on RHEL-based systems /boot/grub/grub.conf contains the configuration.

Grub 2 is more complicated and has configuration files in /etc/defaults/grub and /etc/grub.d. Most people just modify /etc/defaults/grub. The program update-grub takes those config files, builds /boot/grub/grub.cfg and copies the required code into the boot sector and the other disk location (I am not so sure about the last bit).

So, it is possible that your bootsector and stage 1.5 comes from grub 2, and your OS has grub 0.97. This would be possible, for example, if you installed Centos 6 (uses 0.97), then also installed Centos 7 (uses 2). The second installation would use grub 2, but you could still boot Centos 6.

What happened to your system, I can't tell from this far. What OS is it? Are you dual booting? Can you check what grub packages are installed?
You could check the grub version in your bootsector by interrupting the boot and looking at the config file used. Perhaps there is also a method to do that without rebooting.
Quote:

Please don't get annoyed and if possible tell me how to proceed from here because last time I compiled a kernel 4.0.4 ( for learning purpose) and its entry exists in the menu.lst file but does not show during boot time, and Now I am stuck with this problem. I even changed the following line in the /etc/default/grub :
timeout 30
default 1
and then $sudo update-grub
but this also does not meets the expectations. ( nothing happens at all)
So, when you boot, what entries do you see on the first screen? If you see nothing, you may have to hit the ESC key to display the menu. Then match the name of the entries to the various grub files and you should see which grub file is used, therefore which grub is installed.

yancek 11-16-2015 08:09 AM

The first thing you need to do at this point, if you still haven't resolved this problem, is to indicate which Linux operating system you are using and which release you have. The output you posted for the Grub version is 0.97 which is referred to as Grub Legacy. The commands such as update-grub don't do anything with Grub Legacy. There is no /etc/default/grub file in Grub Legacy. There is no grub.cfg file in the /boot/grub directory for Grub Legacy but rather a menu.lst or grub.conf file.

Some Linux distributions have both Grub Legacy and Grub2 available. Grub Legacy did have the capacity to use a splash image but it was very limited and a convoluted process to get it working so if that is what you want you will be much better off using Grub2. Which Linux are you using and which release.

_Turtle 11-17-2015 01:01 AM

further infomation regarding OS
 
I am using Ubuntu 14.04 LTS and kernel Linux 0 3.13.0-53-generic

berndbausch 11-17-2015 03:01 AM

Ubuntu 14.04 should use grub 2, and there should be no menu.lst. Since you ran update-grub earlier, the bootsector should be grub 2 as well.
Now, you report two problems.
  1. the background doesn't work.
    Try to solve this by copying the image file under /boot. I don't think grub can find it under /usr.
  2. your new kernel doesn't appear in the grub menu.
    See https://help.ubuntu.com/community/Grub2 for instructions what to do. Putting the kernel in menu.lst is not the right solution.

yancek 11-17-2015 07:33 AM

I think you need to put the path in the /etc/defaul/grub file for your background image in quotes as shown at the link I posted earlier.
It should also work without this entry if you just put the appropriate image in the /boot/grub directory and run sudo update-grub.
When you checked the grub version it showed 0,97 which is Grub Legacy. As indicated above, the default for Ubuntu 14.04 is Grub2 and in fact has been for Ubuntu since version 9.10. So if you have Grub Legacy installed to the MBR, running update grub won't change what you see on boot as you would first need to install Grub2 to the MBR so that it is used on boot. Ubuntu 14.04 has all the Grub Legacy files in /usr/lib/grub-legacy but you won't see them in /boot/grub unless someone made that change. Various methods for re-installing Grub2 at the site below.

https://help.ubuntu.com/community/Gr...talling_GRUB_2


All times are GMT -5. The time now is 05:16 AM.