Announcement

Collapse
No announcement yet.

Old 'Dog' needs assistance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Old 'Dog' needs assistance

    That'd be me.

    My HP laptop is 'old'. It doesn't support UEFI. It uses MBR. I have a Kubuntu 23.04 LiveUSB (had to convert it from GPT to MBR after it was created; the new *buntu ISOs all create GPT installs!) and it boots fine. I can't figure out how to create the partitions on my internal HDD so that the installer can install GRUB. The install process gets to the end and then fails, telling me that GRUB can't be installed on /dev/sda. This is a fatal error.

    My internal HDD is partitioned as:

    /dev/sda1 fat32 37.00 MiB Flags: boot
    /dev/sda2 btrfs 465.72 GiB
    unallocated unkown 1.01 Mib

    I want to use btrfs and have a single root partition. Using the live session installer, and choosing Manual, what partition type, size, and flags do I need to create so that GRUB will successfully install?
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    #2
    Originally posted by Snowhog View Post
    /dev/sda1 fat32 37.00 MiB Flags: boot
    37mb might not be big enough, though it should be. Even using an mbr, grub is too big to fit there these days. You do need to set that boot partition as /boot/efi still, -- At least *buntu uses this, or the installer needs it, or something does, even on MBR installs, for whatever reasons.

    Another long time trick I use, if I get a grub install failure, is to un-check installing updates and/or NOT connecting to the network when installing, . I think it downloads updated grub packages no matter what update option is chosen, and these somewhat often seem to fail, at least in my experience.
    Forcing it to use only the included grub packages has always worked when I have had this problem.

    Also, the usual caveat that it could just be a buggy-af-iso day right now, as well. A temporarily busted grub, that sort of thing. So you potentially might not see any fixes before the beginning of the week, at the very least, if this happens to be the case.

    Comment


      #3
      You can use GPT for BIOS boot if you make a BIOS boot partition. Here's what works for me using a GPT partition table with Legacy (non-UEFI) booting. The space from 34-2047 is unused and large enough to accommodate BIOS boot.
      1. Open the drive with gdisk.
      2. Select option "x - extra functionality (experts only)."
      3. Select "l - set the sector alignment value" (option lower-case L) and set it to 1.
      4. Return to the gdisk main menu and make a partition starting at sector 34 and ending at 2047.
      5. Select type "EF02 BIOS boot partition."
      Then grub will install in legacy mode on a GPT drive. I've been doing this for years.
      Last edited by oshunluvr; Jan 22, 2023, 08:18 AM.

      Please Read Me

      Comment


        #4
        Originally posted by oshunluvr View Post
        You can use GPT for BIOS boot if you make a BIOS boot partition.
        My LiveUSBs are both converted to MBR. My laptop doesn't support GPT "as far as I know"; it was purchased well before 2015.

        So, how do I partition my internal HDD so the LiveUSB (22.10 for now) will be able to install GRUB. I'd prefer that it install GRUB to /dev/sda, but if that isn't possible, then to /dev/sda1.

        In the 'old days', when I was using ext4, I'd just create three partitions: /dev/sda1, /dev/sda2, and /dev/sda3. I'd designate one for swap, one for root, and one for home.

        But I want to use btrfs and have a single btrfs partition. So, as my PC supports MBR (BIOS only), using GParted, what partitions do I need to create so the installer will not fail installing GRUB?

        This used to be easy-peasy.
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Getting really frustrated with this!

          I reformatted my HDD (Live GParted) as:

          Click image for larger version  Name:	HDD Partition Scheme.png Views:	0 Size:	103.7 KB ID:	667917
          /dev/sda2 is the EFI Partition the installer insists I have to have. It has the boot flag set. I selected sda3 for GRUB; sda2 wasn't in the selection.

          The installation process of 22.10 makes it all the way to installing/configuring packages, but when it gets to 'Running "grub-install /dev/sda2" ...66%' it fails, telling me:

          "Unable to install GRUB in /dev/sda2

          Executing 'grub-install /dev/sda2' failed.

          This is a fatal error.
          Acknowledging this error, I'm then presented with an Installation failed -- KDialog window:

          The installer encountered an unrecoverable error. A desktop session will now be run so that you may investigate the problem or try installing again.
          Acknowledging that and the PC reboots.

          Why is this so damn difficult! I'm not an inexperienced Linux user. My PC foo is not inconsequential, and my trouble shooting foo is strong, yet I don't understand why this is happening, or what I need to do to simply get Kubuntu 22.10 installed (again) on my laptop! grrrrr
          Last edited by Snowhog; Jan 21, 2023, 10:48 AM.
          Using Kubuntu Linux since March 23, 2007
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Did you try installing without connecting to the internet and/or disabling fetching updates, so that it doesn't try and download an updated grub installer package?

            If your partitions were wrong, I think the installer would gripe *before* it starts copying the OS image, and then attempting to install grub.
            The error when *installing* grub sure seems like the fairly common and long-running *bunutu Ubiquity bug I have seen many times over many years, both myself as well as in various haunts.

            Comment


              #7
              Originally posted by claydoh View Post
              Did you try installing without connecting to the internet and/or disabling fetching updates, so that it doesn't try and download an updated grub installer package?
              I always do it that way.

              Well, I got 22.10 installed. Not how I wanted to do it, but...

              I let the installer "do it's thing"; let it automatically install without my intervention. Of course, that resulted in the installer changing my pre-established btrfs partition to ext4 and installing the OS there. The pre-established fat32 partition (/dev/sda2) was kept with a mount point of /boot/efi.

              Now, at this point I have a working 22.10 on my laptop; again. But it's using ext4, and I want btrfs. So If I can't accomplish this with the installer on the LiveUSB of 22.10, then I guess I have to go the filesystem conversion route.

              Is the installer really a POS (piece of ****e)? It didn't used to be.
              Using Kubuntu Linux since March 23, 2007
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                So I started all over -- again -- for the umpteenth time. Arggg!

                No matter what I try with the installer (Manual), the GRUB install fails (FATAL). Okay. Let's resurrect this dead beast!

                This is what I have my internal HDD formatted as, and that I directed the installer to use:

                /dev/sda1 fat32 EFI System Partition 413.00 MiB
                /dev/sda2 btrfs 465.26 GiB

                After the notification of the GRUB install failure, I opened Dolphin and looked at the 465.3 GiB Internal Drive (sda2). Dolphin shows two folders, @ and @home. @ contains the installed system. @home contains one folder: paul that contains: .bash_logout .bashrc .config .face .face.icon -> .face .profile

                So I just need to get GRUB installed 'manually' while I'm still in my Live session of 22.10. Please tell me how to do that.
                Using Kubuntu Linux since March 23, 2007
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Let's just start FRESH.

                  I have GParted booted from a LiveUSB. Currently, the destination internal HDD has two partitions: /dev/sda1 (EFI System Partition) as fat32, and /dev/sda2 as btrfs. I want to setup this HDD so I can install Kubuntu 22.10 from my LiveUSB, which had to be converted from GPT to MBR after it was created.

                  So, experts, please tell me how I need to setup my HDD. I want to use btrfs on a single partition for the install of Kubuntu 22.10. However, the LiveUSB installer needs to be 'happy' when it tries to install GRUB to that HDD. Keep in mind, my laptop is 'old'; ancient even. IT DOES NOT SUPPORT UEFI. It's BIOS only. But, the installer, when choosing Manual, always, and I mean ALWAYS, insists that an EFI partition must exist.

                  Waiting for your assistance.

                  P.s. I'll even throw in this beer for you!

                  Click image for larger version

Name:	image.png
Views:	262
Size:	330.7 KB
ID:	667924
                  Last edited by Snowhog; Jan 21, 2023, 03:14 PM.
                  Using Kubuntu Linux since March 23, 2007
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Can't/couldn't wait. Reinstalled 'again'.

                    Steps

                    1. Booted into GParted (LiveUSB)
                    2. Deleted all partitions
                    3. Exited GParted and shutdown laptop
                    4. Booted from Kubuntu 22.10 LiveUSB
                    5. Opted to Install Kubuntu
                    6. Opted to let the installer install to the entire disk
                    7. Installation completed and I rebooted
                    8. Kubuntu 22.10 booted successfully and I logged in
                    9. Launched KDE Partition Manager to see how the installer setup the HDD

                    The picture below contains annotations as to the flags, if any, were set by the installer on the partitions it created.

                    Click image for larger version

Name:	Kubuntu 22.10 Installation Partitioning Created by the Installer.png
Views:	265
Size:	132.1 KB
ID:	667926

                    So I now have a working (again) Kubuntu 22.10 on my laptop, but with a single ext4 partition for Kubuntu 22.10. The installer created the 1.00 MiB /dev/sda1 partition with no filesystem type, but with the bios-flag set. It created /dev/sda2 with filesystem type fat32 and with the boot flag set.

                    As I want to use btrfs, but using the Manual option in the installer to setup the HDD constantly fails to install GRUB, I'm wondering if I can use the information gained and redo the installation, select Manual, and use the existing partitions, but changing only /dev/sda3 to reflect btrfs and proceed. Will the installer successfully install GRUB then?

                    Using Kubuntu Linux since March 23, 2007
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Originally posted by Snowhog View Post
                      Will the installer successfully install GRUB then?
                      I'm about to find out.

                      Rebooted the LiveUSB of 22.10. Selected to install Kubuntu. Selected Manual and changed /dev/sda3 to btrfs. Made no other changes to the partitions. Left sda as the location to install Grub (?); the drop down selection for the boot loader?

                      Will know shortly if this works. If it fails again, I'll repeat but select sda1, and if that fails, repeat and select sda2. As previously stated, this should not be this complicated!
                      Using Kubuntu Linux since March 23, 2007
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        Success!!!

                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Originally posted by Snowhog View Post
                          However, the LiveUSB installer needs to be 'happy' when it tries to install GRUB to that HDD. ​
                          A bit late now, but a way to make the installer happy about grub may be to tell it not to install a boot loader. With ubiquity one runs ubiquity -b in a konsole.

                          I've used -b for over a decade. These days I've got grub installed to a subvolume in the btrfs (for snapshotting and backup btrfs goodness), but that's with UEFI. Before btrfs, with BIOS/MBR, I gave grub it's own partition for /boot/grub, but that was when stage 2 (or 1.5 or something) of grub fit in the MBR gap.

                          Regards, John Little

                          Comment


                            #14
                            This may be a dumb question, but have you checked that your system isn't a hybrid one, or rather one that really is uefi but supports (emulates) legacy/bios?

                            I have in front of me two old laptops, one an HP pavilion from 2013 and a Dell latitude from 2012. Both by default iirc boot in "bios", or legacy MBR mode, if you will.​ Also called CSM. My old HP PC from 2010 was like this as well. Or the one from 2012 was.

                            In any case, it might be worth checking, if you haven't. What model is this beastie?

                            Comment


                              #15
                              Per the laptops System Information, its warranty start date was 04/01/2011, so it's twelve years old and pre-dates UEFI by four years. The BIOS vendor is Insyde. The BIOS version is F.04. There is nothing within the BIOS (InsydeH20 Setup Utility Rev. 3.5) to change/switch BIOS behavior. It's truly BIOS MBR only.

                              The HP model is: Pavilion g7-1070us (intel CORE i3 M 380 @ 2.53GHz).
                              Using Kubuntu Linux since March 23, 2007
                              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                              Comment

                              Working...
                              X