Announcement

Collapse
No announcement yet.

GRUB 2: A Guide for Users

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #91
    Re: GRUB 2: A Guide for Users

    Thanks, oshunluvr - that is cool.

    So I take it you maintain your /boot manually? If so

    - what files are you concerned about?
    - how do you keep them from being changed automagically?

    And now back to some reading
    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

    Comment


      #92
      Re: GRUB 2: A Guide for Users

      I did manually edit for a while but I no longer need to or do.

      The files that your supposed to edit are /etc/default/grub and the rest are in /etc/grub.d. I have found that as long as I'm using the same version of GRUB2 in my installs and my default/grub and 40_custom files are the same, I can run update-grub from any of my installs without problems.

      Of course, when you do a new install you have to be careful not to overwrite GRUB2 unless you know for a fact it's the same version (just to avoid possible incompatibilities). I think soon we will be able to have a new install option of "use the GRUB currently installed" rather than re-install GRUB every time or install with no boot loader.

      If I'm not sure of what version of GRUB the new install uses, I install GRUB to the install partition, then once I'm sure the versions are the same; manually add the GRUB mount point to the new installs fstab.

      To directly answer your questions: /boot/grub/grub.cfg is the file that contains the boot menu and sets the GRUB parameters. If you needed to do manual edits you can do them and they will not be overwritten until you run update-grub.

      The files you're supposed edit that will insert your choices into grub.cfg during updating grub are:

      /etc/default/grub
      /etc/grub.d/00_header
      /etc/grub.d/05_debian_theme
      /etc/grub.d/40_custom

      In theory, if all your installs have the same version of GRUB and all these file match then you should get the same results from running update-grub regardless of which install you run it from.

      Also note my experience with GRUB2 is only with (K)Ubuntu.

      Please Read Me

      Comment


        #93
        Re: GRUB 2: A Guide for Users

        Thank you very much, most useful and precise
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment


          #94
          Re: GRUB 2: A Guide for Users

          Qqmike,

          Just joined this forum after seeing this thread.

          Great work! You make Grub2 a lot respectable than I thought.

          Comment


            #95
            Re: GRUB 2: A Guide for Users

            Yes, Qqmike is pretty amazing

            By the way, is this a known bug or something? Grub2 is autodetecting another partition with Kubuntu perfectly, but it assigns the root directory wrong. Here goes an example:

            search --no-floppy --fs-uuid --set fff011a2-5131-4ba5-a1ea-f8c18b3a3859
            linux /boot/vmlinuz-2.6.32-21-server root=UUID=e1c15c83-23cf-4bfb-a043-ba9469332293 ro quiet splash acpi_enforce_resources=lax

            /boot/vmlinuz-2.6.32-21-server is effectively in fff011a2-5131-4ba5-a1ea-f8c18b3a3859 , and the root directory should be set to that same partition. However, it is being set to e1c15c83-23cf-4bfb-a043-ba9469332293, which is the partition where update-grub is being run from. Any clues anyone off the top of your head?

            Many thanks!

            Comment


              #96
              Re: GRUB 2: A Guide for Users

              Originally posted by Qqmike
              This is important enough to make note of a correction here.
              I went through the how-to changing update-grub to grub-mkconfig. However, when actually used as a command, update-grub does not require an argument, whereas grub-mkconfig does (to change grub.cfg). I think I caught all the corrections, but will be working on this some more, and for now note this post and specifically:


              Note: update-grub
              The command update-grub generates a new grub.cfg file and replaces the existing grub.cfg with the newly generated grub.cfg (by default).
              But, as explained next, you must specify the output file when using grub-mkconfig.

              Using grub-mkconfig correctly: -o option, or --output=FILE
              grub-mkconfig --help
              tells you.

              Note that
              sudo grub-mkconfig
              prints its output to the screen (default = stdout).
              To print to the grub.cfg, use
              sudo grub-mkconfig -o /boot/grub/grub.cfg
              or
              sudo grub-mkconfig --output=/boot/grub/grub.cfg
              Thanks Q!
              Had to redo GRUB after reinstalling with 10.10 and just couldn't remember. Great to have this How To!

              Comment


                #97
                Re: GRUB 2: A Guide for Users

                Originally posted by lmilano
                Yes, Qqmike is pretty amazing

                By the way, is this a known bug or something? Grub2 is autodetecting another partition with Kubuntu perfectly, but it assigns the root directory wrong. Here goes an example:

                search --no-floppy --fs-uuid --set fff011a2-5131-4ba5-a1ea-f8c18b3a3859
                linux /boot/vmlinuz-2.6.32-21-server root=UUID=e1c15c83-23cf-4bfb-a043-ba9469332293 ro quiet splash acpi_enforce_resources=lax

                /boot/vmlinuz-2.6.32-21-server is effectively in fff011a2-5131-4ba5-a1ea-f8c18b3a3859 , and the root directory should be set to that same partition. However, it is being set to e1c15c83-23cf-4bfb-a043-ba9469332293, which is the partition where update-grub is being run from. Any clues anyone off the top of your head?

                Many thanks!

                I had that also. I think I recall it has something to do indivual "/boot/grub/grub.cfg" and fstab's files.
                Its been a while now, but I removed one of the grub.cfg files , for the partition that was not being installed and that "error" didn't show up.
                Here is a snapshot of the same "error" , as an example example:

                Code:
                menuentry "KUB (on /dev/sda9)" {
                	insmod part_msdos
                	insmod ext2
                	set root='(hd0,msdos9)'
                	search --no-floppy --fs-uuid --set 25eb4615-fe24-4384-ac81-e167bc93c682 <--------
                	linux /vmlinuz root=UUID=debfdd2e-50ec-4933-b709-88f708449e5e ro quiet splash
                	initrd /initrd.img
                }
                menuentry "Lucid (on /dev/sda9)" {
                	insmod part_msdos
                	insmod ext2
                	set root='(hd0,msdos9)'
                	search --no-floppy --fs-uuid --set 25eb4615-fe24-4384-ac81-e167bc93c682 <--------
                	linux /vmlinuz root=UUID=03568d9f-8220-4f89-b1d2-4930cb038fd1 ro quiet splash
                	initrd /initrd.img
                }
                menuentry "MAV (on /dev/sda9)" {
                	insmod part_msdos
                	insmod ext2
                	set root='(hd0,msdos9)'
                	search --no-floppy --fs-uuid --set 25eb4615-fe24-4384-ac81-e167bc93c682 <<<----------CORRECT----------
                	linux /vmlinuz root=UUID=25eb4615-fe24-4384-ac81-e167bc93c682 ro quiet splash
                	initrd /initrd.img
                }
                It appears its guessing what's on sda9.


                Code:
                /dev/sda1: LABEL="HP" UUID="D8C0EF8FC0EF7264" TYPE="ntfs" 
                /dev/sda2: LABEL="NTFS" UUID="C8C08EAFC08EA374" TYPE="ntfs" 
                /dev/sda5: UUID="73398b64-1873-44f3-8fad-67daafad9752" TYPE="swap" 
                /dev/sda6: UUID="debfdd2e-50ec-4933-b709-88f708449e5e" TYPE="ext4" 
                /dev/sda7: LABEL="Kubuntu" UUID="cc7db4b9-b039-4d6b-aa77-6d59cce1e317" TYPE="ext4" 
                /dev/sda8: LABEL="Lucid" UUID="03568d9f-8220-4f89-b1d2-4930cb038fd1" TYPE="ext4" 
                /dev/sda9: LABEL="mav" UUID="25eb4615-fe24-4384-ac81-e167bc93c682" TYPE="ext4" <<--correct

                Now if you look at "MAV". That's correct. Both match up. Its gueses wrong on the name and floppy for the others.

                lmilano, I first noticed this "error" when I started installing different Ubuntu OS on separate partitions. I have Kubuntu Lucid & Maverick, Ubuntu Lucid & Maverick. Whenever I would zsync that version OS, I would install grub to that partition.

                If you look at the code closely enough you can figure it out. Once I realized that the sda's didn't match up for the name, but did for the correct name and sda , then looked at each "/boot/grub/grub/cfg"/"fstab", I saw what was happening.

                Actually now Maverick doesn't give you a choice not to install grub to any partition. Before you could. There is a bug report in Launchpad for this. If your interested I can try and find it. Apparently its too late in the testing cycle to change it.
                Boot Info Script

                Comment


                  #98
                  Re: GRUB 2: A Guide for Users

                  I did a total re-installa couple of weeks ago and my laptop is now running better than it ever has. And as I used 10.04 as the basis for the re-install I am running GRUB 2 (I assume :-) ).

                  I had some questions a long time ago in this thread regarding the way you could (at least earlier) assign a different bootdisk in MacOS.

                  I would love to see this functionality in Kubuntu - you go to the System settings, click on something called Boot (should probably be under "Startup and Shutdown") and choose what should be the harddisk to boot from.

                  This way, you could have different partitions and install a different version of Kubuntu on each of the partitions/harddisks and switch between them in a very easy way. No need to edit any configuration files etc. Just an interface with an icon for each partition and a green checkmark on the current boot partition.

                  We did not use USB then, it was mostly external SCSI drives and it was great to be able to swap version of the os and versions of the installed programs by using this function.

                  These days it is not too interesting to do this as long as one has a computer with enough power and RAM. Setting up VirtualBox is not difficult and can be used to run a variety of operating systems. Last time I checked even OSX server was supported!
                  Regards,
                  Oceanwatcher
                  Blog: http://www.wisnaes.com/
                  Pictures: http://www.oceanwatcher.com/
                  Software tips (in Norwegian): http://www.datahverdag.com/

                  Comment


                    #99
                    Re: GRUB 2: A Guide for Users

                    Few tools to edit (mess ?) your grub 2

                    > Grub2 Kcm:
                    Description:
                    This Kcm module manages the most common settings of Grub2 .
                    It uses the KAuth authorization system to gain root privilegies and is thus well integrated in system settings, under startup/shutdown.
                    [img width=400 height=250]http://kde-apps.org/CONTENT/content-pre1/137886-1.png[/img]


                    > GRUB2 Bootloader KCModule:
                    Description:
                    A KCModule for configuring the GRUB2 bootloader.
                    ...
                    This is just a preview release
                    ...
                    [img width=400 height=331]http://kde-apps.org/CONTENT/content-pre1/139643-1.png[/img]


                    Maybe with the Kubuntu OO ( > DevelopmentCodeNames ) there is a KDE Grub editor from the official repositories.
                    Before you edit, BACKUP !

                    Why there are dead links ?
                    1. Thread: Please explain how to access old kubuntu forum posts
                    2. Thread: Lost Information

                    Comment


                      Re: GRUB 2: A Guide for Users

                      Nice!

                      As usual with these GUIs, it is important to try to abstract things away, instead of mapping the config files one to one with GUI entries that the user won't be able to make sense of ...

                      Comment


                        Re: GRUB 2: A Guide for Users

                        ... and no need to wait to the OO - ubuntu/natty kcm-grub2 0.3.0-0ubuntu1 (Accepted):
                        kcm-grub2 (0.3.0-0ubuntu1) natty; urgency=low

                        * Initial release LP: #745524

                        Description:
                        kde-config-grub2 - Configuration module for the GRUB2 bootloader
                        Launchpad-Bugs-Fixed: 745524
                        The LP: #745524 was > FFE: kcm-grub2 is a configuration module for grub2 that is integrated into KDE


                        The package name is kde-config-grub2
                        Description: Configuration module for the GRUB2 bootloader
                        This is a configuration module for System Settings for configuring the
                        GRUB2 bootloader.
                        Homepage: https://sourceforge.net/projects/kcm-grub2/
                        Bugs: https://bugs.launchpad.net/ubuntu/+filebug
                        Origin: Ubuntu
                        Before you edit, BACKUP !

                        Why there are dead links ?
                        1. Thread: Please explain how to access old kubuntu forum posts
                        2. Thread: Lost Information

                        Comment


                          Re: GRUB 2: A Guide for Users

                          Hmm. Fails to launch. I'm presented with the password pop-up, but after typing it and pressing enter, it fails to run.
                          paul@tanagra:~$ kdesudo kcm_grub2
                          QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
                          QFileSystemWatcher: failed to add paths: /home/paul/.config/ibus/bus
                          sudo:
                          Well, never mind. While I think it should run this way from the console, it is located in System Settings > Startup & Shutdown, and it runs correctly from there.
                          Using Kubuntu Linux since March 23, 2007
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            Re: GRUB 2: A Guide for Users

                            ... and with the Kubuntu 11.10* > Kubuntu Specs UDS-O:
                            ...
                            Specs

                            Kubuntu Oneiric Packaging
                            ...
                            ...


                            * (All plans are subject to revision)
                            Before you edit, BACKUP !

                            Why there are dead links ?
                            1. Thread: Please explain how to access old kubuntu forum posts
                            2. Thread: Lost Information

                            Comment


                              Re: GRUB 2: A Guide for Users

                              I have not tried these yet, but they look like they could be useful.

                              Boot-Repair > 1st option : get a CD including Boot-Repair

                              Boot Info Script

                              Comment


                                What printer that is compatible for Linux?

                                Comment

                                Working...
                                X