Announcement

Collapse
No announcement yet.

UEFI and Grub - 1st Boot fails; 2nd works

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

    UEFI and Grub - 1st Boot fails; 2nd works

    Hello!
    I'm fairly new to linux, only started using Kubuntu half a year ago. I had the 12.04 release first and there weren't any major problems. But then I made a fresh install of 12.10 on an SSD with UEFI boot and that's when things begun acting strangely. Here is what happens:
    When I turn the computer on it goes through the boot process and displays grub menu with a countdown. I can press enter at once or wait until it counts to zero -- the result is the same. It doesn't come any further! It crashes without displaying any error mesage (or anything else for that matter), the monitor says "No Signal". Now, if I restart (f.ex. by pressing Ctrl+Alt+Del) it boots without problem! The grub menu comes up, I press enter and the screen where I type in my passphrase appears. This happens every time -- every second boot (or, rather, every 'first' boot) fails but the next one goes fine.
    There is one small difference between these boots: on the second boot, the one that succeeds, there is no countdown.
    Being new to Linux I don't even know where to look for clues to the problem -- is there some log file or error log?

    I'm on a 64-bit Kubuntu 12.10, an encrypted SSD drive with UEFI boot and separate /boot and /home partitions.

    Does anyone have any clue to this irritating problem?

    P.S. I tried to find a thread describing this problem but there doesn't seem to be one on this forum.

    #2
    I hate to begin this way, but can you duplicate the problem if the drive is not encrypted?

    Comment


      #3
      I haven't tried to replicate it. It may be a bit problematic since I'm using my computer every day and it would be hard to find time to make a full backup, a fresh install and then a full restore. But I may offer a detail that can, perhaps, help a little.

      I have an older install on a smaller SSD, which boots without problem. This one is also an update from 12.04 to 12.10 on encrypted LVM, just like my current one, and, like my current system, the original 12.04 install was made with the alternative CD. But, unlike my current system, this install is not UEFI and the partition table is not GPT, but the usual MBR.

      If necessary, I can try and make a fresh install of Kubuntu 12.10 on this disk without LVM or encryption. But it wont be an exact replication of the situation on my main disk, unless I physically connect this disk to the first SATA port (right now it is connected to an alternative SATA port that isn't part of the Z68 chipset but was put on the motherboard by ASUS). If this is necessary I can try to do it this Sunday.

      But is there no log file or some such that can give a hint about the problem with my main install? Something that would show what happened during the previous boot?

      Btw, thanks for taking the time to read through this post.
      Last edited by Snowhog; Jan 30, 2013, 09:20 PM.

      Comment


        #4
        Do you know how to edit the file /etc/default/grub, or is this a new concept for you?

        Comment


          #5
          Yes, I know how to do it, although I'm not very comfortable with it. But I have changed some of the options there, like the 'timeout'. I used Kubuntu's settings to do so.
          Here's the copy of my grub:
          Code:
          GRUB_COLOR_HIGHLIGHT=cyan/light-blue
          GRUB_TIMEOUT=15
          GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
          GRUB_DISABLE_OS_PROBER=true
          GRUB_DEFAULT=saved
          GRUB_GFXMODE=800x600
          GRUB_CMDLINE_LINUX_DEFAULT=splash
          GRUB_CMDLINE_LINUX=""
          GRUB_BACKGROUND=/boot/grub/themes/starfield/starfield.png

          Comment


            #6
            1. Change the line containing the word DEFAULT to this:
            Code:
            GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 text"
            2. Place comments signs (pound signs) in front of the GRUB_GFXMODE and GRUB_BACKGROUND and GRUB_COLOR_HIGHLIGHT lines.

            3. Save the file, exit the editor, and run sudo update-grub

            4. Edit the file /etc/init/tty1.conf

            5. Change the exec line so that looks like this (new part underlined):
            Code:
            exec /sbin/getty -8 38400 [U]--noclear[/U] tty1
            6. Reboot

            You'll have one smooth message-filled text mode boot, with no screen clearing or console switching. Tell us what, if any, errors you might see, especially right before any delays.

            Comment


              #7
              I did as you instructed. This was weird! The weirdest was that it booted into the system on the first boot! After I pressed 'enter' in the grub menu the messages appeared on the screen too quickly to read, without any noticeable delays, until it came to the passphrase. Here are the last few lines:
              Code:
              [ 1.877625] [drm] Initialized radeon 2.18.0  20080528 for 0000:01:00.0 on minor 0
              [ 1.963363] [I]something-about-usb ehci.-.-.-.-.-.-.-.-.-.-.-[/I]
              error: unexpectedly disconnected from boot status daemon
              Begin: Loading essential drivers ... done.
              Begin: Running /scripts/init-premount ... done.
              Begin: Mounting root file system ... Begin: Running /scripts/local-top ... Unlocking the disk /dev/disk/by-uuid/[I]80199ad1-xxx-xxx[/I] (sda3_crypt)
              Enter passphrase:
              I didn't write down the uuid of the disc and I forgot to write down the message about usb ehci driver right before the error. The messages above these last lines didn't display any errors or warnings.
              When I entered the passphrase it mounted the discs pretty quickly and took me to the login screen.
              This is confusing to me: why would it boot now, without the gfx mode? Can it be connected to the radeon driver I'm using? I do have another problem that seems to be connected to graphics (since it mostly occurs when I'm watching a movie) but I thought it unrelated to this one and so planned to describe it in a different thread.

              Comment


                #8
                Over the last several releases of Ubuntu and its various flavors, changes have been made with respect to how the system's boot proceeds from inistal startup to loading the desktop manager to starting X to finally starting the desktop session. My disdain for graphical boot splashes continues to increase, because in an effort to make the bootup look pretty, important status messages are obscured. So in a few threads here on KFN, I'm having folks temporarily disable that, in order to attempt to find the root causes of problems.

                When you wrote "took me to the login screen," do you mean the text mode login, or the graphical mode login?

                Comment


                  #9
                  Originally posted by SteveRiley View Post
                  Over the last several releases of Ubuntu and its various flavors, changes have been made with respect to how the system's boot proceeds from inistal startup to loading the desktop manager to starting X to finally starting the desktop session. My disdain for graphical boot splashes continues to increase, because in an effort to make the bootup look pretty, important status messages are obscured.
                  I totally agree , you can in so many cases get a good clue as to what is going wrong with a text mode boot up
                  Originally posted by SteveRiley View Post
                  So in a few threads here on KFN, I'm having folks temporarily disable that, in order to attempt to find the root causes of problems.
                  do you not get the same effect by pressing e at the grub boot screen and removing the vt hand off and quiet splash from the linux boot line and then pressing ctrl+x for 1 boot only ?

                  VINNY
                  i7 4core HT 8MB L3 2.9GHz
                  16GB RAM
                  Nvidia GTX 860M 4GB RAM 1152 cuda cores

                  Comment


                    #10
                    That would work. But what I want to do is prevent even the display manager from starting. Let's try to get the point where a successful text-mode login works. Then we can proceed with additional troubleshooting flexibility. Let's consider the symptom of login failure on the GUI. What's the actual problem? At least two come to mind.

                    * If the user can successfully log in via text mode and can successfully launch X via startx, then the display manager is probably borked. We can test this by attempting sudo service lightdm start right after the text mode login.

                    * If the user can successfully log in via text mode and can also start the display manager, but if the subsequent DM login fails to start X and throws the user back to the DM, then the problem is with X.

                    Maybe I'm just becoming a cranky old fart. After all, in three days I turn 47. But this prettifying stuff, "seamless" graphical boots, an overly complicated boot manager (yeah, I'm talkin' bout you, GRUB), and deep Plymouth (!) integration just create a lot of unnecessary brittleness.

                    I love being able to completely eliminate GRUB on my UEFI-based machines. I am also thinking about how to completely unwind the Plymouth integration, too. My only reluctance to moving too far from the defaults is that it makes it more difficult for me help troubleshoot problems that arise among the community. If don't keep my hands in this stuff daily, I won't understand how to fix it when it inevitably breaks.

                    Comment


                      #11
                      Originally posted by SteveRiley View Post
                      Maybe I'm just becoming a cranky old fart. After all, in three days I turn 47. But this prettifying stuff, "seamless" graphical boots, an overly complicated boot manager (yeah, I'm talkin' bout you, GRUB), and deep Plymouth (!) integration just create a lot of unnecessary brittleness.
                      Agree. I'm simply amazed when folks rate Kubuntu based (almost) solely on how the boot screen looks! If one eliminates the graphical boot sequence -- goes with a totally text boot -- the process is also faster (who want's to stay on the boot screen longer than you have to?).
                      Using Kubuntu Linux since March 23, 2007
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        Or the freakin' wallpaper!

                        Comment


                          #13
                          Originally posted by SteveRiley View Post
                          That would work. But what I want to do is prevent even the display manager from starting. Let's try to get the point where a successful text-mode login works. Then we can proceed with additional troubleshooting flexibility. Let's consider the symptom of login failure on the GUI. What's the actual problem? At least two come to mind.

                          * If the user can successfully log in via text mode and can successfully launch X via startx, then the display manager is probably borked. We can test this by attempting sudo service lightdm start right after the text mode login.

                          * If the user can successfully log in via text mode and can also start the display manager, but if the subsequent DM login fails to start X and throws the user back to the DM, then the problem is with X.
                          Aaaa yes I understand , you are of course correct in this ,,,,,,I am wright (Charles Vincent Wright) I'm always wright even when I'm wrong I'm wright because I always do things the wright way which is my way!! LOL ------ but you are the overlord and I will defer to your wisdom :cool:


                          Originally posted by SteveRiley View Post
                          Maybe I'm just becoming a cranky old fart. After all, in three days I turn 47. But this prettifying stuff, "seamless" graphical boots, an overly complicated boot manager (yeah, I'm talkin' bout you, GRUB), and deep Plymouth (!) integration just create a lot of unnecessary brittleness.
                          (agin I agree ) 47 ,,,,,you yungun you

                          Originally posted by SteveRiley View Post
                          I love being able to completely eliminate GRUB on my UEFI-based machines. I am also thinking about how to completely unwind the Plymouth integration, too. My only reluctance to moving too far from the defaults is that it makes it more difficult for me help troubleshoot problems that arise among the community. If don't keep my hands in this stuff daily, I won't understand how to fix it when it inevitably breaks.
                          cant wate till I can get my hands on a UEFI box .

                          VINNY
                          i7 4core HT 8MB L3 2.9GHz
                          16GB RAM
                          Nvidia GTX 860M 4GB RAM 1152 cuda cores

                          Comment


                            #14
                            Since we're discussing this stuff... the Boot Graphics Architecture page in the Ubuntu wiki might be interesting. Just discovered it a few moments ago.

                            Comment


                              #15
                              Originally posted by SteveRiley View Post
                              Over the last several releases of Ubuntu and its various flavors, changes have been made with respect to how the system's boot proceeds from inistal startup to loading the desktop manager to starting X to finally starting the desktop session. My disdain for graphical boot splashes continues to increase, because in an effort to make the bootup look pretty, important status messages are obscured. So in a few threads here on KFN, I'm having folks temporarily disable that, in order to attempt to find the root causes of problems.
                              I understand this. Although it's nice when it's pretty! And when it's tuned and all the errors and other stuff that can cause problem has been dealt with I see no reason not to use the graphical boot.

                              But my choice of Kubuntu wasn't based on how pretty it looks. Since I'm not experienced with linux I had to have something suitable for a beginner and this limited my choices of distributions (I actually tried Debian but there were too many cranks and I had insufficient knowledge with them). Another requirement was that I must be able to use encryption from the get-go (I think it's important). This further limited my choices. Also in the choice of desktop environment I think KDE is the most comfortable. I tried several distros before I installed Kubuntu but each had something that left me unsatisfied. Kubuntu, once it's installed, satisfies all my criteria and also feels comfortable enough.

                              Originally posted by SteveRiley View Post
                              When you wrote "took me to the login screen," do you mean the text mode login, or the graphical mode login?
                              I mean graphical mode. As soon as I type in my passphrase (in the text mode) and press 'enter' a few lines of messages appear (too quickly to read) and graphical KDM login screen is suddenly there. I've switched from LightDM back to KDM because it looks better.
                              But before I made the changes you suggested the 1st boot didn't get so far. It didn't even display the screen where I type my passphrase, much less the login screen.

                              I read about plymouth in this thread but I don't really understand what it is, except that it has something to do with the graphical boot. Could it be what was causing the problem in the first place? After all, I don't experience this problem with the text boot, only with the graphical boot.
                              Last edited by Snowhog; Feb 03, 2013, 10:09 AM.

                              Comment

                              Working...
                              X