Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Secondary grub boot

  1. #1
    nrickert's Avatar
    nrickert is online now Shaman Penguin
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    2,981
    Blog Entries
    3

    Default Secondary grub boot

    I'm not sure if this should really be in the beta forum. But I'll start here.

    I have 11.4 running on my laptop.

    I later installed the live gnome 3 CD, installing into a separate partition (sda10). The install overwrote the boot sector for the extended partition (sda4), but booted gnome 3 nicely. This was expected.

    I restored the prior contents of sda4, so that I could get into my original 11.4 install. That worked too.

    I next added grub entry so that I could do a secondary boot into gnome 3.
    Code:
    title gnome3
        root (hd0,9)
        configfile /boot/grub/menu.lst
    That, too, worked as expected. If I selected "gnome 3" from the main grub menu, the secondary grub menu was shown and I could use that to boot into gnome 3.

    That's all background.

    I later installed 12.1 M2 into the sda10 partition, overwriting the gnome 3 install. I told the installer to install grub in the root partition (instead the extended partition).

    Now, when I boot, if I select gnome 3 from the main boot menu, it takes me into M2 (actually M3 now - I just updated).

    That's all fine. But here's the problem:

    Selecting gnome 3 does not display the secondary grub menu. It just boots me into the first item on the menu (even when the third item is listed as the boot default). So I don't get a chance to select between default and desktop kernels, or standard or failsafe boots with the use of the secondary grub.

    What went wrong? How do I fix it? Or is this a 12.1 bug?
    opensuse 12.3; KDE 4.10.3;
    testing 13.1M2;

  2. #2
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: Secondary grub boot

    Hmmm ... I don't use the configfile command and I'm not sure how it works in this case. But if I understand correctly, you're trying to load 12.1 stage2 (installed in sda10) from 11.4 menu (stage2 in some partition) previously loaded by 11.4 stage1 installed in sda4. Since you also installed 12.1 stage1 in sda10, couldn't you chainload this Grub and tell us if it behaves differently? That would be:

    Code:
    title whatever
        root (hd0,9)
        chainloader +1
    I assume that /boot/grub/menu.lst in sda10 is correct and doesn't have a timeout of 0 (?).

    If you wonder which stage1 is looking for which stage2 and where, you might want to try findgrub.


    fingrub -k can also list all Linux kernels found on all partitions (but it doesn't use os-prober for scanning - unlike updategrub)

    * Speaking of that, I just noticed a minor bug in the display (which doesn't affect the info) that I'm going to fix right now - I have been trying to shorten the code while adding new features. As jdmcdaniel3 would say, we don't get points for writing shorter code - but if the code is less than 15.000 characters (actually less than that), we can post it in the forum. Otherwise we have to past it somewhere and it is less elegant (but I'm aware that I'm a snob).

    I'm also interested in learning if findgrub actually identifies 12.1 Grub as "openSUSE". If it does not, I'll be busy looking for its signature in bootsector sooner or later.

  3. #3
    nrickert's Avatar
    nrickert is online now Shaman Penguin
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    2,981
    Blog Entries
    3

    Default Re: Secondary grub boot

    Quote Originally Posted by please_try_again View Post
    Since you also installed 12.1 stage1 in sda10, couldn't you chainload this Grub and tell us if it behaves differently?
    Excellent suggestion. I have now tried that. And it behaves the same way.

    Quote Originally Posted by please_try_again View Post
    I assume that /boot/grub/menu.lst in sda10 is correct and doesn't have a timeout of 0 (?).
    The "menu.lst" looks correct to me. The timeout is 8. Apart from the actual boot lines, the menu.lst looks much the same as in the 11.4 menu.lst

    Quote Originally Posted by please_try_again View Post
    I'm also interested in learning if findgrub actually identifies 12.1 Grub as "openSUSE".
    Here's the output from running "findgrub" on the 12.1 system:
    Code:
    # findgrub
    Find Grub Version 3.4 - Written for openSUSE Forums
    
     - reading MBR on disk /dev/sda                       ...
     - searching partition /dev/sda1      ()              ...
     - searching partition /dev/sda2      (NTFS)          ... --> Windows7/Vista Loader found in /dev/sda2
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    You can add the following entry to /boot/grub/menu.lst :
    
    ###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
    title Windows on /dev/sda2
        rootnoverify (hd0,1)
        chainloader +1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
     - searching partition /dev/sda3   *  (NTFS)          ... --> Windows7/Vista Loader found in /dev/sda3
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    You can add the following entry to /boot/grub/menu.lst :
    
    ###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
    title Windows on /dev/sda3
        rootnoverify (hd0,2)
        chainloader +1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
     - reading bootsector  /dev/sda4      (Extended)      ... --> Grub  found in /dev/sda4   => sda5   0x83 (openSUSE)
     - reading bootsector  /dev/sda5      (LINUX)         ...
     - searching partition /dev/sda6      (FAT32)         ...
     - reading bootsector  /dev/sda7      (LINUX)         ...
     - reading bootsector  /dev/sda8      (LINUX)         ...
     - skipping partition  /dev/sda9      (swap)         
     - reading bootsector  /dev/sda10     (LINUX)         ... --> Grub  found in /dev/sda10  => sda10  0x83 (openSUSE)
    
    
    Press <enter> to Exit findgrub...
    opensuse 12.3; KDE 4.10.3;
    testing 13.1M2;

  4. #4
    nrickert's Avatar
    nrickert is online now Shaman Penguin
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    2,981
    Blog Entries
    3

    Default Re: Secondary grub boot

    An update.

    I tried booting again, still using the chainload method. This time I did get the full boot menu. Perhaps there was a careless keystroke on my first try.

    At least that is some progress.

    The reason I need the full menu, is that thus far 12.1 M3 is booting fine with the default kernel, but just giving me a blank screen with the desktop kernel.

    I guess the next step to try will be to copy the desktop kernel and initrd files to my 11.4 "/boot" (which is a separate partition), and try booting 12.1M3 directly with the 11.4 grub. Is there anything else I need to copy (such as the symtable)? I would not think so, but I'm not a grub expert.
    opensuse 12.3; KDE 4.10.3;
    testing 13.1M2;

  5. #5
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: Secondary grub boot

    Since you don't have Grub in MBR (according to findgrub output) and your sda3 partition is active, you must boot Grub from the Windows Boot Manager. Is that right? It adds one level of complexity. Did you update the bs file you're loading from Windows? I would set the bootflag on sda4 (easy done with findgrub -a). You can reactivate the Windows partition at any time (with fdisk). We know that Grub installed on sda4 will load its menu from sda5. Now in this menu, you can chainload Grub installed on sda10 (using the entry I posted previously) and it should display the menu in sda10. If this menu doesn't let you select the 12.1 kernel you want to boot and assuming the syntax is correct, I don't have an explanation either (might be a bug indeed). Why don't you also try to add 12.1 kernel entries in 11.4 menu.lst in sda5? You can do that easily by just running updategrub under 11.4 or updategrub -i to see a menu where you can enable/disable boot entries, or just by copying/pasting the entries manually. But better use updategrub, so we will learn how os-prober deals with openSUSE 12.1 (you have to run updategrub on 11.4. It ignores the host system and looks for others). The thread might indeed belong in the beta forum - but you were right to post it here somehow, because I wouldn't have looked in the beta forum.

    * Sorry, I didn't see your post (was busy looking for typos in my answer).

  6. #6
    nrickert's Avatar
    nrickert is online now Shaman Penguin
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    2,981
    Blog Entries
    3

    Default Re: Secondary grub boot

    Yes, I do currently have Windows as the primary boot. That's because Windows will boot stand-alone, while linux requires an encryption key (I am encrypting "/home" and swap). If I turn it on, and forget to hang around, then it will at least boot Windows.

    Since I am using 11.4 as primary grub, the install of 12.1 did not require updating the Windows booter. Using the secondary boot entry in the primary grub should take care of that.

    Here's what I am currently thinking. Maybe the BIOS cannot read all of sda10, and was only seeing the beginning of menu.lst . And maybe the reason the desktop kernel isn't working, is that the BIOS cannot read it. That's why I plan to copy the desktop kernel to "/boot" from my 11.4 install.

    I still think that I had the same incorrect behavior on my first attempt to chain boot 12.1. Before the second attempt, I copied over an alternate version of menu.lst (with the desktop line first). That copy could have resulted in menu.lst being located earlier on the disk. When I attempt to boot the Desktop kernel, it prints the boot line and immediately hangs. There is no indication that it is actually trying to load the kernel. Oh, the sda10 partition does straddle the 128G mark on the disk, and supposedly that's a problem for some BIOS versions.
    opensuse 12.3; KDE 4.10.3;
    testing 13.1M2;

  7. #7
    please_try_again is offline Flux Capacitor Penguin
    Join Date
    Sep 2008
    Posts
    9,385

    Default Re: Secondary grub boot

    Quote Originally Posted by nrickert View Post
    Here's what I am currently thinking. Maybe the BIOS cannot read all of sda10, and was only seeing the beginning of menu.lst. And maybe the reason the desktop kernel isn't working, is that the BIOS cannot read it. That's why I plan to copy the desktop kernel to "/boot" from my 11.4 install.
    If I correctly remember you mentioned this method already. What can I say? The BIOS doesn't know nor care about logical partitions at boot time. You were able to chainload sda10 successfully, so its bootsector is not out of range. Copying kernels from one release/distro to a common /boot partition is not something I would do, even if the start sector of the partition was too far away. Whenever I encountered similar problems - back to the time of the 1023 cylinder limit, about 15 years ago - I simply created as many /boot partitions as I needed. As for the 128G LBA limit, I saw the problem once on a mainboard which defaulted to Legacy IDE mode. Switching to AHCI allowed me to boot from anywhere.

    Quote Originally Posted by nrickert View Post
    I still think that I had the same incorrect behavior on my first attempt to chain boot 12.1. Before the second attempt, I copied over an alternate version of menu.lst (with the desktop line first). That copy could have resulted in menu.lst being located earlier on the disk
    No. That's not how it works. And by the way the menu is user-friendly but not necessary to boot (you could also type commands in the Grub shell). Only the offset and BIOS drive (if you have more than one) of stage2 matters to stage1. That's what findgrub reads in bootsectors to determine in which partition stage2 is located. An that's why you have to reinstall stage1 if you move stage2.

    Quote Originally Posted by nrickert View Post
    When I attempt to boot the Desktop kernel, it prints the boot line and immediately hangs.
    That the desktop kernel of a Milestone version might hang on some machines is not really surprising, I guess.

  8. #8
    nrickert's Avatar
    nrickert is online now Shaman Penguin
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    2,981
    Blog Entries
    3

    Default Re: Secondary grub boot

    Quote Originally Posted by please_try_again View Post
    No. That's not how it works.
    The original configfile entry in the 11.4 grub is now displaying the full menu. The only change from when it didn't work properly, is that I copied the "menu.lst" that didn't work to elsewhere on the disk before editing to restore the default kernel boot to first position. Then I copied it back. Both times, I used "cp -p" to copy. The difference cannot be the content of "menu.lst". The only change would be in the disk sectors occupied by "menu.lst".

    Quote Originally Posted by please_try_again View Post
    That the desktop kernel of a Milestone version might hang on some machines is not really surprising, I guess.
    It seems to still hang after the change in how I am booting.

    One last check will be to copy the default kernel and initrd instead, and make sure that my 11.4 boot line works for that.
    Okay, tried that and it boots fine to the default kernel. So the desktop kernel does indeed hang.

    I'll report this on the M3 thread. Thanks for your suggestions here.
    opensuse 12.3; KDE 4.10.3;
    testing 13.1M2;

  9. #9
    robopensuse is offline Wise Penguin
    Join Date
    Dec 2008
    Posts
    1,177

    Default Re: Secondary grub boot

    I'm guessing the OP has Nvidia card which will mean he's hit the "nomodeset" issue - openSUSE:Most annoying bugs 12.1 dev - openSUSE
    Bugs https://bugzilla.novell.com/show_bug.cgi?id=706305 https://bugzilla.novell.com/show_bug.cgi?id=707110 https://bugzilla.novell.com/show_bug.cgi?id=707148

    Fix info - https://bugzilla.novell.com/show_bug.cgi?id=707110#c6
    Please confirm oldcpu's work if you can, he's feeling lonely!

  10. #10
    nrickert's Avatar
    nrickert is online now Shaman Penguin
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    2,981
    Blog Entries
    3

    Default Re: Secondary grub boot

    Quote Originally Posted by robopensuse View Post
    I'm guessing the OP has Nvidia card which will mean he's hit the "nomodeset" issue - ...
    No, bad guess. I have an Intel card. I am not making it as far as the nouveau issue indicates. It is looking to me as if the attempt to load the desktop kernel is failing. That is, it hangs during kernel load rather than after the kernel has loaded.

    Perhaps I need to reinstall that desktop kernel.

    I failed to mention in earlier posts in this thread, that M3 is installed as 32 bit, though the hardware is capable of 64 bit. The default kernel would be fine, but it limits me to 4G of memory (there is actually 6G).
    opensuse 12.3; KDE 4.10.3;
    testing 13.1M2;

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO 3.5.2 PL2