Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: openSUSE 13.1 have to restore Grub

  1. #1
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,968

    Default openSUSE 13.1 have to restore Grub

    This is a bit confusing story. I will try to keep to the main path I am following now, but I guess a bit of background information is needed.

    The system is good old BIOS and MSDOS partitioning.
    This is (still) a 13.1 system. This is it's fstab:
    Code:
    /dev/disk/by-id/ata-ST2000DM001-1CH164_Z1E89L2J-part2    /    ext4    acl,user_xattr    1 1  
    /dev/disk/by-id/ata-ST2000DM001-1CH164_Z1E89L2J-part5    /home    ext4    acl,user_xattr    1 2 
    /dev/disk/by-id/ata-ST2000DM001-1CH164_Z1E89L2J-part1    swap    swap    defaults    0 0 
    boven.henm.xs4all.nl:/home/wij                /home/wij nfs    noauto        0 0 
    tmpfs                            /tmp    tmpfs    size=25%,uid=root,gid=root,mode=1777 0 0
    and fdisk -l
    Code:
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk label type: dos
    Disk identifier: 0x00006df8
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048    14684159     7341056   82  Linux swap / Solaris
    /dev/sda2   *    14684160    56629247    20972544   83  Linux
    /dev/sda3        56629248    98590719    20980736   83  Linux
    /dev/sda4        98590720  3907028991  1904219136    f  W95 Ext'd (LBA)
    /dev/sda5        98592768   518014975   209711104   83  Linux
    Usage:
    sda1 as Swap
    sda2 is ext4 and mounted as /
    sda3 is unused and planned for a new / on installing a new system
    sda4 is extended
    sda5 is ext4 and mounted as /home
    a lot of free space where a new /home for a new installation is planned.

    Time to upgrade to 15.1. I installed 15.1 using:
    sda1 as Swap
    sda3 as ext4 (no Btrfs) for /
    a new sda6 of 200GB as ext4 (no zfs) for /home
    This basicaly went well (although there was one lib.... package which gave an error having an incorrect cheksum, it was skipped). Updated from the Update repos. Now I do have problems getting KDE Plasma to run.(after a few seconds it returns to the login screen). But as I can start at least one other DE, I consider the system as such and the users as configured correct.

    The main reason installing on two free partitions is to have the old 13.1 still available for my wife doing what she wants until a full takeover to the new 15.1 can take place.
    Grub menu shows four lines: two for 15.1 and two for 13.1, So it detected the other system.

    But, booting from 13.1 takes me to a running green ruler (different greens below) instead of the 13.1 Gecko on a branch) and hitting esc show me the text in large VGA characters. After a lot of fast scrolling (I see upping the network, and starting LSB), it abrubtly stops, Black screen. Can do nothing except Ctrl-Alt-Del which restarts the system.

    I tried to recover to the 13.1 Grub. Using the 15.1 as rescue system: booted, CTRL-Alt-F1 to the console,
    Code:
    mount /dev/sda2 /mnt
    mount --bind /dev /mnt/dev
    mount --bind /proc /mnt/proc
    mount --binf /sys /dev/sys
    chroot /mnt
    mount -a
    This indeed brings me to the 13.1 systems with all files (including in /home) available.
    Start
    Code:
    yast
    brings me the ncurses version. Start the boot module.
    From there, I am stuck. I changed several things there and hoped that at the end Grub would be installed overwriting the 15.1 grub, but always I get the 15.1 menu back and the same lousy booting of 13.1

    Anybody any suggestions how to recover the 13.1 grub (and forget for the time being the 15.1 installation, that can always be done again).
    Henk van Velden

  2. #2

    Default Re: openSUSE 13.1 have to restore Grub

    I would guess that the grub coming with 13.x (/boot/grub...) was overwritten by the new installation of 15.1 (boot device /dev/sda2 ? - as that partition is marked with a * )

    If you have network you could try chroot-ing into your 13.x installation, /boot/grub... should be populated, and do a forced re-install all of the grub packages of 13.x with yast or zypper, then run the bootloader setup.

    This might fix it.




    P.S. BACKUP your data, just in case.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,968

    Default Re: openSUSE 13.1 have to restore Grub

    Hm, I would never have thought that the installation would write to a file system it is not using during installation. But you could be right (because of the *). Thanks for the suggestion. I will check my backups.
    Henk van Velden

  4. #4
    Join Date
    Jun 2008
    Location
    Yorkshire
    Posts
    352

    Default Re: openSUSE 13.1 have to restore Grub

    You could use the 90_persistent section in 15.1 and set it to the 13.1 appropriate partitions. It's a bit like the old menu.lst. You can even make it the default (although I'm sure you know that).
    I find it very handy for picking up odd systems that I try now and again without affecting leap and tumbleweed.
    Pete

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,968

    Default Re: openSUSE 13.1 have to restore Grub

    I do not think it has the wrong partitions mentioned soemwhere, because it does boot, though in a strange way. But thanks for the suggestion.

    I will first try to restore /boot/grub. I do have a recent backup of it.

    I will repert back.
    Henk van Velden

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,069
    Blog Entries
    2

    Default Re: openSUSE 13.1 have to restore Grub

    Maybe try using the DVD to repair?
    The 13.1 ISO
    https://ftp.gwdg.de/pub/opensuse/dis...tion/13.1/iso/

    The 13.1 update repo, last packages available, you'll also have to specify the architecture from this page
    https://ftp.gwdg.de/pub/opensuse/dis...d/update/13.1/

    I can't remember the last time I tried to do a multi-boot with one using legacy GRUB while the other uses GRUB2, if there will be an attempt to upgrade/downgrade GRUB or properly chainload the ttwo GRUB. You'll have to look out for what happens.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,968

    Default Re: openSUSE 13.1 have to restore Grub

    @tsu2
    I have the 31.1 DVD here. I never throw such things away as long I have systems using a version.
    As told aboe, I used the just installed 15.1 as rescue system, but maybe the 131.1 dvd is a better option (but as soon as you chroot, you use the correct versions of the tools like yast).

    BTW I am think that 13.1 already uses grub2, or am I wrong here? In that case I have to check the grub directory and not the grub2 one .

    @robert_spitzenpfeil (very sharp one )
    I just restored in /boot/grub2 the files that had today as change date. In fact only grub.cfg was different. But that did not help. Still get the "wrong" Grub menu.
    Henk van Velden

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,968

    Default Re: openSUSE 13.1 have to restore Grub

    For your information:

    Both grub and grub2 are installed on the 13.1 system..
    I think grub2 is the one used because the /boot/grub library has only files with a date of Sep 2013 where those in the /boot/grub2 directory have several dates from Dec 2015 (until present).
    Henk van Velden

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,368
    Blog Entries
    3

    Default Re: openSUSE 13.1 have to restore Grub

    Quote Originally Posted by hcvv View Post
    For your information:

    Both grub and grub2 are installed on the 13.1 system..
    I think grub2 is the one used because the /boot/grub library has only files with a date of Sep 2013 where those in the /boot/grub2 directory have several dates from Dec 2015 (until present).
    As best I remember, grub legacy uses "/boot/grub/menu.lst" (or maybe just "/boot/menu.lst" for the boot menu. And grub2 uses "/boot/grub2/grub.cfg".
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2 Beta

  10. #10
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    2,084

    Default Re: openSUSE 13.1 have to restore Grub

    Quote Originally Posted by hcvv View Post
    Hm, I would never have thought that the installation would write to a file system it is not using during installation. But you could be right (because of the *). Thanks for the suggestion. I will check my backups.
    Writing a boot flag does not constitute writing to a partition. All it does is change the location of the flag within the partition table if one previously existed, or add one if not.

    This could be key to why this problem arose. You may have installed 13.1 originally with generic MBR code, and Grub on 13.1's sda2 only. Chrooting into 13.1 to update Grub would then repair /dev/sda2 without touching the MBR code that the 15.1 installer wrote, which continues loading Grub from sda3. If during chroot you would write generic code to the MBR, then due to the location of the flag, boot would go immediately to the 13.1 Grub installed on sda2. The other option would be to switch 13.1 to booting from MBR in YaST while in chroot, which would write 13.1's Grub code to MBR and update grub.cfg on sda2 and whatever is necessary in /etc/grub.d/ and/or /etc/default/grub.

    With booting according to the flag (via generic MBR code) and Grub on / configured for both 13.1 and 15.1, switching boot control becomes a simple matter of moving the flag, which could at least in theory be done even booting a DOS floppy, a simple and painless table manipulation process.

    I always keep generic code in the MBR, which boots according to the boot flag location (which Grub and Grub2 both ignore), and keep Grub either on / or nowhere at all that any individual OS knows about.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 15.1,TW,15.2 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&15.1 on 965P/Radeon
    Tertiary: TW,15.2,15.1,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

Page 1 of 5 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
  •