Page 14 of 94 FirstFirst ... 412131415162464 ... LastLast
Results 131 to 140 of 931

Thread: Grub 2 Basics

  1. #131
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by mahiyar View Post
    On update-grub all the earlier kernels, even of sdb2 were found, i.e in the output of the command. But on inspecting the config file the kernels were not there. On rebooting they were certainly not there as shown in the attached pic.

    Grub-2 is really very powerful, but does that mean that we would have to learn programming language to control it?
    What we did was change the output, not change the input. The os-prober still looked at sdb but the script we altered prevented GRUB 2 from adding the results to the menu. There is probably a method to alter the way the command works rather than the script it generates, but as you found the menu results would be the same.

    Glad your menu now does what you wish. As GRUB 2 is upgraded you will have to re-edit the file to include the change you made. This is not to be confused with running "update-grub", but when a new version is released and you are asked if you want to retain your current version or accept the maintainer's newer version.

    Yes, G2 is very powerful. The scripting language is not complex but is something an average non-IT user isn't used to. For example, I am an average user and not well versed in programming languages. Every time someone asks how to hide something, I have to experiment with "cut", "awk", "sed" and other commands until I can come up with the correct output. Sometimes it takes me a while. Users with programming experience can easily do these things in a very short time. Those of us without such experience have to rely on others or take the time to figure it out.

    The good news is that, because of the power of Grub 2 and the basic way in which it works, there will come a day when a GUI app will be able to do all these things for us. StartUp-Manager 2 or some other app will be created to do all these things via menus in an easily-understood graphic application. We'll just have to get by with editing the scripts ourselves until that time.
    Last edited by drs305; November 23rd, 2009 at 07:06 PM.
    GRUB2

    Retired.

  2. #132
    Join Date
    Dec 2006
    Location
    Mumbai, India
    Beans
    625
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Grub 2 Basics

    Yeah when GUI start up manager does come it would make a lot of things easier. Till then we will rely on good souls like you to guide us.
    Ignorance is the parent of fear . . . MobyDick

  3. #133
    Join Date
    Sep 2006
    Location
    Allentown, PA; USA
    Beans
    490
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Grub 2 Basics

    I can't seem to keep grub from wiping out my MBR. I have Karmic installed on an SD card on my desktop and a CF card in the Expresscard port on my laptop. Both, when I run

    dpkg-reconfigure grub-pc, ask what device I want to install grub on, and I choose sdb1 and not sda1.

    The I run the windows setup and do "fixmbr" to make the internal disk bootable should I not have the sd card or CF card inserted. This works until one of the kernels or grub upgrades, then it still insists to install itself on sda1 and sda2. I clearly DO NOT want it on sda1 on these two machines and can't seem to prevent that.

    Help?

  4. #134
    Join Date
    May 2008
    Beans
    16

    Re: Grub 2 Basics

    Quote Originally Posted by drs305 View Post
    Some questions.

    Is there a reason you need Grub 2 installed on sda7? Normal installations do not put it onto a specific partition (such as sda7). The problem with blocklists is that if the location of the information changes G2 will no longer be able to find it. Despite the warning, installing G2 on sda7 should work, at least until things change. But the normal command would be "sudo grub-install sda" to put it into the MBR.

    Another common problem during the upgrade to G2 is when the user is presented with the list of devices. You must select one with the space bar before tabbing to "OK" and pressing ENTER. There is a graphic and explanation of this screen in the community doc.

    Did you just cut out the device map when you posted? Normally after the "This is the contents of the device map..." it shows the drives is it aware of. You may just not have copied it, but if it didn't display, that is a problem too.

    The device map is located in /boot/grub/device.map and usually looks something like this:


    If you can boot into Ubuntu or from the LiveCD you can reinstall Grub2. The instructions on reinstalling it are located in the community doc: https://help.ubuntu.com/community/Grub2

    Thank you!
    The problem was selecting the correct drive (the famous screen), This should be really improve because by pushing enter (when you did not select the correct partition) you remove you corrupt the grub legacy but don't install the grub2 on the MBR.
    This line just didn't appear in the french documentation!

  5. #135
    Join Date
    Dec 2006
    Location
    Mumbai, India
    Beans
    625
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Grub 2 Basics

    On a related note is there any way where during a windows install you can avoid windows touching the mbr.
    Ignorance is the parent of fear . . . MobyDick

  6. #136
    Join Date
    Jul 2005
    Beans
    36

    Re: Grub 2 Basics

    Hi,

    is there a possibility to let the "Recovery Mode" entry be created AFTER the Windows entry BUT the normal entry should be BEFORE the Windows entry? To get the memtest entry after the Windows entries was quite simple by just exchanging the order when which script runs but I have I don't know how I get this done - at least without doing the whole entries through the 40_custom file.
    Though I already thought about something like copying the 10_linux and modifying it that way that it will only create the recovery entries in one and the normal ones in the other but I am not sure if this is the best way to do it.

    Furthermore, I want to add that though I had Grub2 installed as bootloader - through a clean 9.10 installation - the installed package was grub and not grub2. I noticed today by installing the kernel updates and update-grub always wanted a menu.lst
    A simple apt-get install grub2 was enough though but still I don't think that it should have been that way.

  7. #137
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by ghost_zero View Post
    Hi,

    is there a possibility to let the "Recovery Mode" entry be created AFTER the Windows entry BUT the normal entry should be BEFORE the Windows entry? To get the memtest entry after the Windows entries was quite simple by just exchanging the order when which script runs but I have I don't know how I get this done - at least without doing the whole entries through the 40_custom file.
    In my thread on Grub 2 Title Tweaks I have a way to hide the Windows Recovery mode. You could edit the 30_os-prober file to incorporate this tweak and then copy the entire Windows section of the file and repeat it, this time hiding the actual Windows entry. If you need help I could probably come up with the new section fairly quickly. Of course the change would be lost whenever a new version of G2 was uploaded and you would have to re-enable the 30_os-prober file.

    Furthermore, I want to add that though I had Grub2 installed as bootloader - through a clean 9.10 installation - the installed package was grub and not grub2. I noticed today by installing the kernel updates and update-grub always wanted a menu.lst
    A simple apt-get install grub2 was enough though but still I don't think that it should have been that way.
    Did you actually see 0.97 on at the top of the menu? As you note, that shouldn't have happened. Did you have a separate, unformatted boot partition in which jn old menu.lst may have survived the clean install?
    GRUB2

    Retired.

  8. #138
    Join Date
    Jul 2005
    Beans
    36

    Re: Grub 2 Basics

    @drs305:
    Regarding first point: I meant the "Linux Recovery" option, not the Windows one BUT I actually did it by copying the 10_linux to 25_linux-recovery and uncommented the normal linux menu entry there and in 10_linux I uncommented the statement (actually the whole if) that creates the recovery entry.
    Though I don't know if I could have done it better or not.
    I am especially, concerned that future grub2 updates might overwrite my 10_linux script which is why I also thought about setting the GRUB_DISABLE_LINUX_RECOVERY value to true and making the 25_linux-recovery script so that it always creates the entry or uses a different value than that one but I think the way it is currently would be "cleaner".

    Did you actually see 0.97 on at the top of the menu?
    Of course not (I think you misunderstood that part a bit, I while try to explain it better), it was Grub 2 that was installed along with its configuration BUT the package grub2 wasn't installed but grub. So I mean the correct bootloader and configuration was installed but the wrong package for configuration and reinstallation of the bootloader was "available".

    Furthermore, I had all partitions removed prior to installing Windows 7 and afterwards Ubuntu 9.10.
    I still don't know why grub was installed instead of grub2 as you can't configure grub2 with the utilites that come with grub.
    Of course, I could have accidentally - though I extremely doubt it - installed grub sometime instead of grub2 but if that is the case I should have had a menu.lst which I didn't.



    Btw. different question: Is there an easy way to let 10_linux only detect the NEWEST kernel images, instead of all of them? Though, of course, having all of them listed has its advantages too. Especially, if a new kernel might create some problems. In that case it would be easy to boot the old one.
    Last edited by ghost_zero; November 26th, 2009 at 02:34 PM.

  9. #139
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    BUT the package grub2 wasn't installed but grub. So I mean the correct bootloader and configuration was installed but the wrong package for configuration and reinstallation of the bootloader was "available".
    For whatever reason, they didn't call the package grub2. It's called grub-pc


    Btw. different question: Is there an easy way to let 10_linux only detect the NEWEST kernel images, instead of all of them? Of course, I can uninstall the old ones but still...
    A menuentry like this should always use the latest entry:
    menuentry "Latest Kernel" {
    insmod ext2
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set 5a880a39-36a1-46f5-b106-e979608f295a
    linux /vmlinuz root=/dev/sda1 ro
    initrd /initrd.img
    }
    Just take your existing entry and remove the specific info from the end of the "vmlinuz" and "initrd" entries.

    You could put it at the top of your menu by creating a 06_custom file. To hide the other entries, you could disable 10_linux if you really wanted to. But check that this entry works first, of course.
    GRUB2

    Retired.

  10. #140
    Join Date
    Jun 2005
    Location
    Manchester UK
    Beans
    280
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Grub 2 Basics

    Can anyone help. My GRUB menu just sits there until I select an option. It used to just carry on it's own way. Not sure whats caused the change

    Thanks

    /etc/default/grub file below


    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.

    GRUB_DEFAULT=0
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT="0"
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=""

    # Uncomment to disable graphical terminal (grub-pc only)
    #GRUB_TERMINAL=console

    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    #GRUB_GFXMODE=640x480

    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID=true

    # Uncomment to disable generation of recovery mode menu entrys
    #GRUB_DISABLE_LINUX_RECOVERY="true"

Page 14 of 94 FirstFirst ... 412131415162464 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •