Results 1 to 10 of 10

Thread: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

  1. #1
    Join Date
    Aug 2012
    Beans
    5

    Question 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    Setup 10.10 on this Dell way back when using the alternate install CD and mdadm to create mirroring with dual 2TB drives.


    I recently decided to upgrade to 12.04. Everything seemed fine but had a few light crashes and issues with some software.


    I then realized even though I upgraded to 12.04 my kernel version is still the old 2.6.38-15-generic-pae and Grub was till 1.99~rc1-13ubuntu3. It has something to do with my raid array.


    Tried to update Grub thinking that would be a start but the array is still using the old version.


    Can anyone tell me how to get this Raid array upgraded to the latest Kernel and Grub without data loss? I don't have an alternate storage source large enough for the data I have on this array. I'm just not that proficient with Linux but love it.


    I attached screen shots.


    Thank you in advance. Steve
    Attached Images Attached Images

  2. #2
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    It looks to me like you have two installations, knowingly or not.

    Look at the second image. One ubuntu entry is on top, and then the 3.2.0 kernel (the kernel from 12.04) is below the memory test entry, which is where grub2 puts other OSs found on the machine.

    So, there is one ubuntu with 2.6.38 as principal, and another with 3.2.0 on /dev/sda3.

    I think you should investigate this, but if you only want to make the 12.04 primary OS, simply boot the 3.2.0 entry below the memory test, and once booted execute in terminal:
    sudo grub-install /dev/sda

    That will make grub2 from 12.04 to install on the MBR of the disk and be the main one. So the 12.04 will become the default OS on top of the boot menu.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  3. #3
    Join Date
    Aug 2012
    Beans
    5

    Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    Thanks darkod

    I did see in grub where it listed the newer kernel on both sda3 and sdb3.

    I was too scared to boot with either due to the mirroring.

    My thought was if I chose to boot the latest kernel on sda3 for example that it would destroy the array if data was written to the disk because I would only be working on sda3 (not being mirrored).

    Do you think if I booted from sda3 with the latest kernel the array will still be fine and in sync between both disks?
    Attached Images Attached Images

  4. #4
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    I didn't notice that for sdb3. It seems your main install is not aware of the raid on sda3/sdb3.

    It might be better to do it this way:
    Boot the ubuntu shown now as main one, install the mdadm package, assemble the raid and then use the correct raid device to mount the root partition and install grub2, like:
    Code:
    sudo apt-get install mdadm
    sudo mdadm --assemble --scan
    sudo mount /dev/mdX /mnt
    sudo grub-install --root-directory=/mnt /dev/sda
    sudo grub-install --root-directory=/mnt /dev/sdb
    I hope that should do it. Make sure you use the correct md device for root.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  5. #5
    Join Date
    Aug 2012
    Beans
    5

    Lightbulb Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    I included a screen shot in the GUI. It seems the system DOES recognize the Raid1 array so I hesitate to re-install mdadm (unless I need a newer version?).

    I decided to try booting from sda3 in Grub (showing the 3.x kernel) and received an error stating

    error: File not found
    error: You need to load the Kernel first
    Press any key..

    If I could just get Grub and the new Kernel to use md0 I think it would fix this.
    Attached Images Attached Images

  6. #6
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    If mdadm is recognized even better. But that pictura shows md1, you say md0 is your root? Is it also recognized?

    If it is, simply do:
    sudo mount /dev/md0 /mnt (unless it's already mounted)
    sudo grub-install --root-directory=/mnt /dev/sda
    sudo grub-install --root-directory=/mnt /dev/sdb

    I think both systemas have to be the same version for this to work, otherwise you might need to do it from live mode.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  7. #7
    Join Date
    Aug 2012
    Beans
    5

    Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    Your right Darko md1 is / and md0 is swap

    The first command to work but I got the error below trying to install grub on /sda though


    sudo grub-install --root-directory=/mnt /dev/sda
    /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
    /usr/sbin/grub-setup: error: embedding is not possible, but this is required for cross-disk install.
    Attached Images Attached Images

  8. #8
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    I didn't know your disks have gpt table. On gpt disk you have to make a small 1MB partition with no filesystem, that will have the bios_grub flag.

    This is because grub2 doesn't fit on the MBR of a gpt disk so it needs the small partition to save its file there.

    But I'm not sure how you can add the partition now when all the system is set up and the disks are partitioned.

    Are both disk gpt? If /dev/sdb has msdos table, installing grub2 on it will work.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  9. #9
    Join Date
    Aug 2012
    Beans
    5

    Unhappy Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    Thanks so much for your help Darko.

    I've been beating my head on the case of this system for a week and my patience is shot. At this point I'm giving up and will just use the system as is rather than risk data loss.

    I can live with a few minor crashes and quirks but my main objective was to get Virtualbox going again for XP. I'm handicapped needing a few programs in that environment, otherwise I've made the leap. After the upgrade Virtualbox died. All attempts to re-install it fail because of the old kernel I'm stuck with.

    Hard lesson learned - always be prepared to start from scratch after clicking the upgrade button.

    Thanks again, Steve

  10. #10
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04 Upgrade - Raid Array Still Using Old Kernel & Grub

    The main problem seems to be that you have two ubuntu installations and you are using grub2 from the installation that you don't consider "primary".

    If you are willing, grub2 can be easily installed from live mode. Just get the live cd of the same version (12.04), boot it into live mode, and in terminal try the commands from post #4, they still apply. Use /dev/md1 since we now know that's the root.

    Running from live mode it is not touching anything on the HDDs, and the first command to install mdadm is only for inside the live mode since the cd doesn't contain that package.

    Reinstalling grub2 with those commands and mdadm array should work just fine.

    After you get grub2 from the raid on your MBR, you have the correct bootloader from the primary system. And it will boot the latest kernel provided the upgrade went well.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

Bookmarks

Posting Permissions

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