Announcement

Collapse
No announcement yet.

REVISITING - More BTRFS fun Multibooting to subvolumes - FIXING GRUB

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

    #46
    Originally posted by vinnywright View Post
    if he is on Kubuntu-17.04 ,,,,he has a kate version that will edit root owned files just fine by it's self ,,,,,,,,when saving the file it will ask for his password .
    Does 17.04 come with fresh enough kf5 (5.34), though? it was released with kde-apps 16.12 and kf5 5.31, but newer versions may be available through kubuntu ppas. (but kate 16.12 will also open as root normally, the change came with kate 17.04)

    Also, sudoedit doesn't work like that, "kate sudoedit /etc/grub.d/40_custom" will just open a kate window (as regular user) with two files, an empty new file called "sudoedit" and "/etc/grub.d/40_custom". One could use "EDITOR=kate sudoedit /etc/grub.d/40_custom", but like you said, this isn't really necessary with a relatively new versions of kf5 (ktexteditor) which will ask for password when needed.

    ---

    EDIT: To summarize (graphical editing as root)...just to clarify, kate version number is not the same as kubuntu version number:

    1. The old way - kate version <17.04 (kate still runs as root)
    Use: "kdesudo kate
    /etc/grub.d/40_custom" or "sudo -i /etc/grub.d/40_custom"

    2. The intermediate way - kate >=17.04 (kate won't run as root), but kf5 [ktexteditor] not new enough <5.34 to support polkit file save.
    Use: "
    EDITOR=kate sudoedit /etc/grub.d/40_custom"

    3. The new way - new enough kf5 [ktexteditor] version >=5.34:
    Use: "kate
    /etc/grub.d/40_custom" (no need to call root, KAuth/polkit will handle authentication when saving)

    Last edited by kubicle; Oct 15, 2017, 12:39 AM.

    Comment


      #47
      Greygeek's, instructions appear to be working. I launched kparted to get the uuid of my btrfs, Iget the following error message.
      Code:
      Neither the configured ("pmlibpartedbackendplug") nor the default
      {"pmlibpartedbackendplugin")
      backend plugin could be loaded.
      
      Please check your installation.
      Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

      http://www.kubuntu.org/getkubuntu

      Comment


        #48
        I could not save the file. I guess greygeek wasn't entirely correct.
        Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

        http://www.kubuntu.org/getkubuntu

        Comment


          #49
          kubicle's, #1 way worked.
          Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

          http://www.kubuntu.org/getkubuntu

          Comment


            #50
            I tried to use kdesudo dolphin, to make 40_custom bootable. the properties program crashed! When I told it to report the crash, the crash reporter crashed!
            Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

            http://www.kubuntu.org/getkubuntu

            Comment


              #51
              How do I make custom_40 executable?
              Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

              http://www.kubuntu.org/getkubuntu

              Comment


                #52
                Originally posted by steve7233 View Post
                How do I make custom_40 executable?
                It should be executable by default, but if it's not you can make it so by running "sudo chmod +x /etc/grub.d/40_custom"

                You also need to run "sudo update-grub" so that your custom_40 will be written in grub config.

                NOTE: I haven't read the entire thread, just answering the last questions...so I'm just assuming you know what you're doing and have a valid reason for modifying grub.
                Last edited by kubicle; Oct 15, 2017, 04:24 AM.

                Comment


                  #53
                  Originally posted by kubicle View Post
                  ...

                  Also, sudoedit doesn't work like that, "kate sudoedit /etc/grub.d/40_custom" will just open a kate window (as regular user) with two files, an empty new file called "sudoedit" and "/etc/grub.d/40_custom". One could use "EDITOR=kate sudoedit /etc/grub.d/40_custom", but like you said, this isn't really necessary with a relatively new versions of kf5 (ktexteditor) which will ask for password when needed.
                  Does for me. To be sure I tried it out before I posted and copied it from the terminal. KDE Neon User Edition, fully updated


                  Sent from my iPhone using Tapatalk
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #54
                    Originally posted by GreyGeek View Post
                    Does for me. To be sure I tried it out before I posted and copied it from the terminal. KDE Neon User Edition, fully updated
                    Nope, unless you have set some fancy aliases for that.

                    That command will start kate normally with two files, "sudoedit" and "/etc/grub.d/40_custom" ("kate" is the command to run, and "sudoedit" and "/etc/grub.d/40_custom" are interpreted as arguments for the kate command, and sudoedit doesn't work that way...compare to "EDITOR=kate sudoedit /etc/grub.d/40_custom" which first sets the environment variable $EDITOR [which tells sudoedit which editor you wish to use], then runs "sudoedit" as the command and "/etc/grub.d/40_custom" as the argument for the sudoedit command) .

                    Your command will of course "work" (in up-to-date Neon) in the sense that you can edit the file "/etc/grub.d/40_custom" and save it , since you don't need sudoedit (or any other root invocation) with up-to-date neon, but it will work exactly the same without the sudoedit part, that is just plain "kate /etc/grub.d/40_custom".
                    Last edited by kubicle; Oct 15, 2017, 10:24 AM.

                    Comment


                      #55
                      I set up Grub as per oshunluvr, but the grub menu dose not appear.

                      40 custom
                      Code:
                      #!/bin/sh
                      exec tail -n +3 $0
                      # This file provides an easy way to add custom menu entries. Simply type the
                      # menu entries you want to add after this comment. Be careful not to change
                      # the 'exec tail' line above.
                      menuentry 'Kubuntu' {
                         insmod part_gpt 
                         insmod btrfs
                         search --no-floppy --fs-uuid --set=root 27a9a212-d177-4665-b6bc-bf304e8c1f3e
                         configfile /@Kubuntu1704/boot/grub/grub.cfg
                      Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                      http://www.kubuntu.org/getkubuntu

                      Comment


                        #56
                        I wounder if the modifications that oshunluvr, told me to make might be wrong for my system. Of course I am not going to mess around trying to guess and risk hosing my system. I will just have wait for him or someone else that knows how to do this to respond.
                        Last edited by steve7233; Oct 16, 2017, 02:49 PM. Reason: typo in the btrfs god's name. Lol.
                        Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                        http://www.kubuntu.org/getkubuntu

                        Comment


                          #57
                          At this rate I will have my computer replacement before I get this grub problem fixed.
                          Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                          http://www.kubuntu.org/getkubuntu

                          Comment


                            #58
                            I'm out of town, but in answer to the menu item not showing up in grub, did you update grub after editing 40_custom?

                            Please Read Me

                            Comment


                              #59
                              Originally posted by oshunluvr View Post
                              I'm out of town, but in answer to the menu item not showing up in grub, did you update grub after editing 40_custom?
                              I just grubpdate again and still the menu remains absent.
                              Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                              http://www.kubuntu.org/getkubuntu

                              Comment


                                #60
                                Originally posted by steve7233 View Post
                                I just grubpdate again and still the menu remains absent.
                                Then either your grub isn't working right or 40_custom isn't executable. Other possibilities are the menu isn't set to be visible at all or that you're booting to grub from another install.

                                There's no magic here;
                                Here's the last 10 lines of my grub.cfg before editing 40_custom and running update-grub:
                                stuart@office:~$ cat /boot/grub/grub.cfg |tail -10
                                search --no-floppy --fs-uuid --set=root 8f0c1661-4e84-4512-b875-23bcfd5be1d8
                                fi
                                echo 'Loading Linux 4.8.0-58-generic ...'
                                linux /@KDEneon/boot/vmlinuz-4.8.0-58-generic root=UUID=8f0c1661-4e84-4512-b875-23bcfd5be1d8 ro recovery nomodeset rootflags=subvol=@KDEneon
                                echo 'Loading initial ramdisk ...'
                                initrd /@KDEneon/boot/initrd.img-4.8.0-58-generic
                                }
                                }

                                ### END /etc/grub.d/10_linux ###
                                Here's my /etc/grub.d/40_custom:
                                stuart@office:~$ cat /etc/grub.d/40_custom
                                #!/bin/sh
                                exec tail -n +3 $0
                                # This file provides an easy way to add custom menu entries. Simply type the
                                # menu entries you want to add after this comment. Be careful not to change
                                # the 'exec tail' line above.
                                menuentry 'THIS IS A TEST' {
                                insmod part_gpt
                                insmod btrfs
                                search --no-floppy --fs-uuid --set=root 27a9a212-d177-4665-b6bc-bf304e8c1f3e
                                configfile /@Kubuntu1704/boot/grub/grub.cfg
                                }

                                stuart@office:~$
                                Here I am making it executable:
                                stuart@office:~$ sudo chmod +x /etc/grub.d/40_custom
                                stuart@office:~$ ll /etc/grub.d/40_custom
                                -rwxr-xr-x 1 root root 407 Oct 23 13:11 /etc/grub.d/40_custom*
                                Here I am running update-grub:
                                stuart@office:~$ sudo update-grub
                                Generating grub configuration file ...
                                Found theme: /boot/grub/themes/breeze/theme.txt
                                Found background image: /usr/share/wallpapers/neonbykde2.jpg
                                Found linux image: /boot/vmlinuz-4.11.0-14-generic
                                Found initrd image: /boot/initrd.img-4.11.0-14-generic
                                Found linux image: /boot/vmlinuz-4.11.0-13-generic
                                Found initrd image: /boot/initrd.img-4.11.0-13-generic
                                Found linux image: /boot/vmlinuz-4.10.0-29-generic
                                Found initrd image: /boot/initrd.img-4.10.0-29-generic
                                Found linux image: /boot/vmlinuz-4.8.0-58-generic
                                Found initrd image: /boot/initrd.img-4.8.0-58-generic
                                done
                                And here's the last 10 lines of grub.cfg now:
                                stuart@office:~$ cat /boot/grub/grub.cfg |tail -10
                                # menu entries you want to add after this comment. Be careful not to change
                                # the 'exec tail' line above.
                                menuentry 'THIS IS A TEST' {
                                insmod part_gpt
                                insmod btrfs
                                search --no-floppy --fs-uuid --set=root 27a9a212-d177-4665-b6bc-bf304e8c1f3e
                                configfile /@Kubuntu1704/boot/grub/grub.cfg
                                }

                                ### END /etc/grub.d/40_custom ###
                                All worked here, so you either missed something or one of the above mentioned issues is in the way.

                                I did notice in your post showing your 40_custom you are missing the last } but I assumed you just cut it accidentally out of your cut-n-paste. Otherwise, you'd have gotten an error message when running update-grub.

                                I don't know what else to tell you, sorry.

                                Please Read Me

                                Comment

                                Working...
                                X