Announcement

Collapse
No announcement yet.

newbie grub to root pratition

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

    newbie grub to root pratition

    I searched the messages here, and it seem that somehow simply when someone needs to have the bootloader NOT in the mbr, but rather in the root partition, there is almost no way to do it, appart probabaly from trying to set up grub scripts what I do not know how to do.
    I tried to install kubuntu 8.04 and it reports me as to other people fatal error in installing grub to root partition.
    From there it not possible to boot the kubuntu.
    I have the supper grub disk, rescue kubuntu disk, and other things, none of it is able tto install the bootloader to root partition.

    I am not programmer, so I need it installing and finish, no script writing etc helps me, since this I am not able to do.

    Is there any version which is able to install on a PC, in partition and the bootloader installed into the root partition?

    System: dell laptop, 256mb ram, partition 6gb for the linux, swap 0.5gb


    #2
    Re: newbie grub to root pratition

    How To GRUB Methods - Toolkit
    http://kubuntuforums.net/forums/inde...opic=3081671.0

    You will have to use a Live CD (e.g., Kubuntu) to do it.
    Basically,
    sudo grub
    grub> find /boot/grub/stage1
    that returns some partition (hdx,y); put that here:
    grub> root (hdx,y)
    grub> setup (hdx,y)
    grub> quit
    $ exit
    re-boot to test it.

    As you know, that does NOT install GRUB to any MBR -- only to the root partition (the boot sector of the root partition = sector 1 of the root partition), and that is what you are asking for here.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: newbie grub to root pratition

      Originally posted by ottosykora
      I searched the messages here, and it seem that somehow simply when someone needs to have the bootloader NOT in the mbr, ... (emphasis mine)

      System: dell laptop, 256mb ram, partition 6gb for the linux, swap 0.5gb
      Pardon me for being confused, but what condition would make it O.K. to NOT install the bootloader to the MBR of the first bootable device for a single OS (Linux) system. The BIOS has to have a bootloader of some kind in that primary MBR in order to boot any OS.

      If there is no code on the primary MBR -- then guess what? There is no bootable device and the BIOS will tell you that.
      The next brick house on the left
      Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



      Comment


        #4
        Re: newbie grub to root pratition


        >How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...pic=3081671.0<

        have so far read abt 6-8 howto's, but all give similar quite logical advises which however do not apply to the current downloaded distros.



        >You will have to use a Live CD (e.g., Kubuntu) to do it.<

        I did try the live CD boot, but this does not help too much, it is not able to install the grub to anything but itself which is not of much use.

        >
        Basically,
        sudo grub
        grub> find /boot/grub/stage1<

        yes , it will simply not find anything whatever I try.

        >that returns some partition (hdx,y); put that here:
        grub> root (hdx,y)
        grub> setup (hdx,y)
        grub> quit
        $ exit
        re-boot to test it.<

        ok tried, but as I mentioned, the grub is not present, it refuses to install so the setup etc will also not work.



        >As you know, that does NOT install GRUB to any MBR -- only to the root partition (the boot sector of the root partition = sector 1 of the root partition), and that is what you are asking for here.<
        correct: this is exactly I was asking for, bootloader in the root partition.

        I finaly tried the supper grub disk, di dnot help much , then the system rescue disk from ubuntu, well here I could mange to instal the grub finaly, but it will install without any menu.lst. The file is simply missing.

        OK I copied some other similar once, but as you know, there is so much to edit in sich script, itended as it had to end, not real booting, some 'half' booting, but stopping again and again, simply to set up the menu.lst by hand is not possible for avarege user.




        Comment


          #5
          Re: newbie grub to root pratition

          >for a single OS (Linux) system.<

          I did not mention it is single OS system ;-)

          it is in fact having 4 OS and other more suitable bootmanager then GRUB. Grub is too complex and not easy to repair once something goes wrong.

          Comment


            #6
            Re: newbie grub to root pratition

            If you are not going to use GRUB, please disregard my above post
            (which uses GRUB)
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: newbie grub to root pratition

              The only posts that I've seen that mention other (non-Grub) boot managers have been about problems booting Linux. I advise caution.

              Comment


                #8
                Re: newbie grub to root pratition

                Originally posted by ottosykora
                >for a single OS (Linux) system.<

                I did not mention it is single OS system ;-)

                it is in fact having 4 OS and other more suitable bootmanager then GRUB. Grub is too complex and not easy to repair once something goes wrong.
                It would have been nice to know that!!
                The next brick house on the left
                Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                Comment


                  #9
                  Re: newbie grub to root pratition

                  >If you are not going to use GRUB, please disregard my above post <

                  no this is not the meaning.
                  I am going to use the other bootmanager for the whole PC, since for number of things it is more flexible for my case.
                  But:
                  I need to have the grub in the root partition of Kubuntu in order to be able to start Kubuntu. Any partition which needs to be booted from needs bootloader. In this of linux, I used LILO earlier with Suse etc, but this option is not any more offered here, so need the grub to be in the Kubuntu root partition, simply /boot/grub....

                  The problem is, that when I run the installation CD, I tick the install boot loader into root partition, but the installation will complete with error message that it was not able to install the grub into the root partition.
                  Since there is no bootloader now in that partition, the partition remains non bootable, thus the kubuntu can not be run at all.
                  There is no provision to run the kubuntu on the hard disk by booting from the CD, since the CD does not include any generic bootloader enabling the boot from such partition. (pitty, most other distros have this)

                  As I mentioned, I managed with the aid of the 'repair disk' of kubuntui to install the grub into the partiton finaly, but it is just a simple copy and not configured at all. Apparently now I am supposed to writ emy own script menu.lst which is simly not present , but the complexity of this is far beyond my ability as average user.

                  The manual creation is possible, I tried to copy menu.lst from other intsllation and edit the entries then. All paths has to be corrected, all file names of the kernels and initrd files and it needs apparently also number of parameters, whic might be wrong in that case.
                  All I managed after 2 days playing is boot so that the kernel is just leaded and then all crashes, since some parameter seem not to be correct for that particular installation.



                  Is ther no distro of Kubuntu being able to do such simple thing as intall the grub into root partition and configure it according the the system actually installed?

                  Comment


                    #10
                    Re: newbie grub to root pratition

                    Originally posted by dibl
                    The only posts that I've seen that mention other (non-Grub) boot managers have been about problems booting Linux. I advise caution.
                    so far I have never encountered any problems with booting any linux except ubuntu and kubuntu, both not able to install and configure grub in the root partition.

                    Tried also the aternativ CD with the debian installer, did so far not manage to install it from there, since the installation crashes before it comes to the grub installation, but from earlier experience with real debian, this did work there allways.

                    Comment


                      #11
                      Re: newbie grub to root pratition

                      You are correct, yes: one needs SOME bootloader installed to the boot sector of the root partition for another bootloader to load that OS.
                      What you say makes sense.
                      I do it all the time (except I DO use GRUB as the general boot manager).


                      In my Reply#3, assuming /boot/grub files are in the Kubuntu partition, you can install GRUB to the boot sector of that partition by following Reply #3.


                      If the /boot/grub/files are not already in the root partition of Kubuntu, you can get some from, say Super Grub Disk. I explained that in Reply #54 here:

                      Build a LIVE Kubuntu Flash Drive, How-To
                      http://kubuntuforums.net/forums/inde...089474.new#new
                      Step-by-step
                      -- with Persistence -- using GRUB all the way (i.e., no Syslinux): Reply #7
                      Reply #54: New for 8.10, simplified
                      (=> => basically, in your Kubuntu, make a new directory /boot, then copy/paste /grub from somewhere (e.g., SGD) to get your /boot/grub)


                      Menu.lst for Kubuntu 8.04, here's mine (the boot stanzas, that is):

                      default 0
                      timeout 3

                      title Ubuntu 8.04.1, kernel 2.6.24-23-generic
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro quiet splash
                      initrd /boot/initrd.img-2.6.24-23-generic
                      quiet

                      title Ubuntu 8.04.1, kernel 2.6.24-23-generic (recovery mode)
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro single
                      initrd /boot/initrd.img-2.6.24-23-generic



                      Knowing how GRUB sees your partitions:

                      Linux sees them as sda1, sdb3, etc. GRUB sees them as (hdx,y).
                      From any command line (even a Live CD), you can use the GRUB geometry command to see how GRUB sees the drives:
                      sudo grub
                      grub>geometry (hd<Press the TAB key now>
                      or
                      grub>geometry (hd0)
                      grub>geometry (hd1)
                      etc.

                      GRUB counts drives and partitions starting from zero. E.g., (hd0,3) is the first hard drive hd0, the 4th partition (partition 3).
                      How To GRUB Methods - Toolkit
                      http://kubuntuforums.net/forums/inde...opic=3081671.0
                      (toward the end)
                      And, of course, the GRUB manual, as you probably know
                      GRUB manual (pdf): http://www.gnu.org/software/grub/manual/grub.html
                      GRUB, GNU GRUB Manual 0.97 at: http://www.gnu.org/software/grub/manual/



                      Using the Live Kubuntu Desktop CD to install GRUB to the root partition of Kubuntu:
                      (=> this is how I do it all the time)

                      Step 4: Select the Manual partitioning method (the last one listed in the choices)
                      Step 5: Specify where to put root, swap, home (as usual)
                      TIP: It is best to run GParted Live CD to do any partitioning before running the Kubuntu installer.
                      Step 6: Advanced button at lower right.
                      Specify where to put GRUB using the notation (hdx,y) where x & y correspond to your Kubuntu root partition.


                      There's all the pieces.



                      Here's my full menu.lst (one of them, that is) from 8.04:

                      # menu.lst - See: grub(8), info grub, update-grub(8)
                      # grub-install(8), grub-floppy(8),
                      # grub-md5-crypt, /usr/share/doc/grub
                      # and /usr/share/doc/grub-doc/.

                      ## default num
                      # Set the default entry to the entry number NUM. Numbering starts from 0, and
                      # the entry number 0 is the default if the command is not used.
                      #
                      # You can specify 'saved' instead of a number. In this case, the default entry
                      # is the entry saved with the command 'savedefault'.
                      # WARNING: If you are using dmraid do not use 'savedefault' or your
                      # array will desync and will not let you boot your system.
                      default 0

                      ## timeout sec
                      # Set a timeout, in SEC seconds, before automatically booting the default entry
                      # (normally the first entry defined).
                      timeout 3

                      ## hiddenmenu
                      # Hides the menu by default (press ESC to see the menu)
                      #hiddenmenu

                      # Pretty colours
                      #color cyan/blue white/blue

                      ## password ['--md5'] passwd
                      # If used in the first section of a menu file, disable all interactive editing
                      # control (menu entry editor and command-line) and entries protected by the
                      # command 'lock'
                      # e.g. password topsecret
                      # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
                      # password topsecret

                      #
                      # examples
                      #
                      # title Windows 95/98/NT/2000
                      # root (hd0,0)
                      # makeactive
                      # chainloader +1
                      #
                      # title Linux
                      # root (hd0,1)
                      # kernel /vmlinuz root=/dev/hda2 ro
                      #

                      #
                      # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

                      ### BEGIN AUTOMAGIC KERNELS LIST
                      ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
                      ## by the debian update-grub script except for the default options below

                      ## DO NOT UNCOMMENT THEM, Just edit them to your needs

                      ## ## Start Default Options ##
                      ## default kernel options
                      ## default kernel options for automagic boot options
                      ## If you want special options for specific kernels use kopt_x_y_z
                      ## where x.y.z is kernel version. Minor versions can be omitted.
                      ## e.g. kopt=root=/dev/hda1 ro
                      ## kopt_2_6_8=root=/dev/hdc1 ro
                      ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
                      # kopt=root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro

                      ## Setup crashdump menu entries
                      ## e.g. crashdump=1
                      # crashdump=0

                      ## default grub root device
                      ## e.g. groot=(hd0,0)
                      # groot=(hd1,1)

                      ## should update-grub create alternative automagic boot options
                      ## e.g. alternative=true
                      ## alternative=false
                      # alternative=true

                      ## should update-grub lock alternative automagic boot options
                      ## e.g. lockalternative=true
                      ## lockalternative=false
                      # lockalternative=false

                      ## additional options to use with the default boot option, but not with the
                      ## alternatives
                      ## e.g. defoptions=vga=791 resume=/dev/hda5
                      # defoptions=quiet splash

                      ## should update-grub lock old automagic boot options
                      ## e.g. lockold=false
                      ## lockold=true
                      # lockold=false

                      ## Xen hypervisor options to use with the default Xen boot option
                      # xenhopt=

                      ## Xen Linux kernel options to use with the default Xen boot option
                      # xenkopt=console=tty0

                      ## altoption boot targets option
                      ## multiple altoptions lines are allowed
                      ## e.g. altoptions=(extra menu suffix) extra boot options
                      ## altoptions=(recovery) single
                      # altoptions=(recovery mode) single

                      ## controls how many kernels should be put into the menu.lst
                      ## only counts the first occurence of a kernel, not the
                      ## alternative kernel options
                      ## e.g. howmany=all
                      ## howmany=7
                      # howmany=all

                      ## should update-grub create memtest86 boot option
                      ## e.g. memtest86=true
                      ## memtest86=false
                      # memtest86=true

                      ## should update-grub adjust the value of the default booted system
                      ## can be true or false
                      # updatedefaultentry=false

                      ## should update-grub add savedefault to the default options
                      ## can be true or false
                      # savedefault=false

                      ## ## End Default Options ##

                      title Ubuntu 8.04.1, kernel 2.6.24-23-generic
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro quiet splash
                      initrd /boot/initrd.img-2.6.24-23-generic
                      quiet

                      title Ubuntu 8.04.1, kernel 2.6.24-23-generic (recovery mode)
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro single
                      initrd /boot/initrd.img-2.6.24-23-generic

                      title Ubuntu 8.04.1, kernel 2.6.24-22-generic
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro quiet splash
                      initrd /boot/initrd.img-2.6.24-22-generic
                      quiet

                      title Ubuntu 8.04.1, kernel 2.6.24-22-generic (recovery mode)
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro single
                      initrd /boot/initrd.img-2.6.24-22-generic

                      title Ubuntu 8.04.1, kernel 2.6.24-21-generic
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro quiet splash
                      initrd /boot/initrd.img-2.6.24-21-generic
                      quiet

                      title Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro single
                      initrd /boot/initrd.img-2.6.24-21-generic

                      title Ubuntu 8.04.1, kernel 2.6.24-19-generic
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro quiet splash
                      initrd /boot/initrd.img-2.6.24-19-generic
                      quiet

                      title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro single
                      initrd /boot/initrd.img-2.6.24-19-generic

                      title Ubuntu 8.04.1, kernel 2.6.24-16-generic
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro quiet splash
                      initrd /boot/initrd.img-2.6.24-16-generic
                      quiet

                      title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
                      root (hd1,1)
                      kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=4f8ed8da-e015-4149-954c-a353db1b284b ro single
                      initrd /boot/initrd.img-2.6.24-16-generic

                      title Ubuntu 8.04.1, memtest86+
                      root (hd1,1)
                      kernel /boot/memtest86+.bin
                      quiet

                      ### END DEBIAN AUTOMAGIC KERNELS LIST

                      # This is a divider, added to separate the menu items below from the Debian
                      # ones.
                      title Other operating systems:
                      root


                      # This entry automatically added by the Debian installer for a non-linux OS
                      # on /dev/sda1
                      title Microsoft Windows XP Home Edition
                      root (hd0,0)
                      savedefault
                      chainloader +1
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        Re: newbie grub to root pratition

                        one more strange thing:

                        now I have tried Kubuntu8.04.1, kubuntu 710, also to install from the alternate disk.

                        Could not finish the installation, since at some point it tries to install WVDial and suddenly asks me (in the case of 8.04.1) to change media and insert CD 'Kubuntu 8.04.1_Hardy Heron_Release i386(20080702.1)

                        Well I have this CD in, it is the Kubuntu 8.04.1, so what and how to change? I mean linux is running, and so as we all know, it will not allow the CD drive to be opened.
                        I can not select anything except forward and nothing will happen here.

                        Both versions , 7.10 and 8.04.1 behave similar.
                        I have made other CD from the download, still same, I used the check CD feature, it says OK.

                        So far I was still not able to carry single installation of the Kubuntu to end. Is this allwas so?

                        Comment


                          #13
                          Re: newbie grub to root pratition

                          I don't know about all that, maybe someone else here might know.

                          One thing -- you should be using the Live CD Kubuntu installer CD, not the Alternate.
                          The Alternate is fine, of course, but my experience and tips (above) apply to the Live CD.
                          You should have no problems with either 7.10 or 8.04
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            Re: newbie grub to root pratition

                            @Qqmike

                            thanks for the copy of the menu.lst
                            Will try on next occassion to use it as base fo the building up m yown. I nfact I tried to do something like this by copying it from one wubi installation, but apparently I did not succeed 100% in editing the lines with kernel parts etc. It started, but stopped somewhere again. Anyway I was on right way in general.

                            Meanwhile I managed to install the Xubuntu variation in same place. But there the creation and installation of grub in root works!
                            Why? Yes, beacause the installation GUI seems to be corrected there in a way, that when you tick the 'install bootloader', you have not only a window where you can enter the partition you want have it, but you actually get a drop down menu and can simply click on the partition you need.

                            In the Kubuntu 8.04 install GUI, the drop down menu does not exist, there is just a line you can insert the partition. BUt in which form? As defoult it contains '(hd0)' . This is neither grub designation nor linux. So I tried obvious and entered there (hd0,8), my partition being nr 9, then tried sda9 as it was called in the running linux etc. Every time waiting until all get installed just to find out it was wrong.

                            The Xubuntu with its drop down menu gave me answer: the correct entry seems to be /dev/sda9 in this case.

                            Who should smell this?
                            I will make an other test and enter this value and see if the config will go by itself.



                            Comment


                              #15
                              Re: newbie grub to root pratition

                              Well, thanks for the feedback.

                              In Kubuntu, GUI, the GRUB line to be filled out, I'm pretty sure you must enter it in GRUB notation, like (hdx,y). But, of course, you tried (hd0,8) and didn't work. Before running the Install option on the Live CD, it's a good idea to explore the drives using the geometry command, from Konsole in the Live session,
                              sudo grub
                              grub>geometry (hd<press TAB key now>
                              etc.


                              Also, btw, (hd0) means the MBR of drive hd0, in GRUB notation; (hd1) means the MBR of hd1; etc. note the use of parentheses to indicate MBR: hd0 is the drive hd0, but (hd0) usually means the MBR of drive hd0.

                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment

                              Working...
                              X