LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-19-2011, 11:46 PM   #1
cyberdeath
LQ Newbie
 
Registered: Mar 2007
Location: 127.0.0.1, Virginia, USA
Distribution: OpenSuSE & Gentoo (Primarily)
Posts: 15

Rep: Reputation: 2
Question mdadm & grub 1.99 on OpenSuSE


Hello everyone,

I am having a difficult problem that I cannot seem to resolve. I am currently running OpenSuSE 11.3 and I recently turned my non-RAID server into a RAID server by adding the drive and running it in a degraded state. I went through and used mdadm to create /dev/md0 (/boot or /dev/sd[a-b]1) and /dev/md1 (/ or /dev/sd[a-b]3) with /dev/sd[a-b]2 both being swap partitions.

Everything seemed to go okay because I was able to transfer the data from the active drive to the newly created /dev/md* RAID arrays. However, one thing I did not notice is how the metadata is required to be 0.90 for it to work properly with GRUB.

I am currently running metadata 1.2 on both RAID arrays. Instead of starting all over again, I scoured the internet in hopes of finding something useful that would be a "work around" for this problem. I found Grub2 (version 1.99rc1). I downloaded and installed it manually...until I got errors. I realized that all the #include<grub/blah.h> was pointing to an invalid location (bad relative path). I since went in and tried to make changes to all of these but I'm not certain it got them all because it still fails (just not as early). So, I cannot get Grub2 to compile to even see if it will work with metadata 1.2. Does anyone have any suggestions on how to get Grub2 (1.99rc1) to work?

Do I have any other alternatives? Right now I'm booting from a rescuecd and then booting to my OS which is tolerable for now. However, it is running a different kernel which is causing a few problems here and there plus it's not really how it's supposed to run.

Any suggestions to this day-long problem would be greatly appreciated!
 
Old 01-20-2011, 01:56 AM   #2
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Hi Cyberdeath; This may not be accurate but it's my understanding that openSUSE won't boot from a RAID device. Something about the RAID drivers not being loaded before files in /boot are accessed.

Have you tried using a small primary partition (for multi-distro maybe 150-200 MB) for /boot with everything else on the RAID array?

Tom
 
1 members found this post helpful.
Old 01-20-2011, 08:51 AM   #3
cyberdeath
LQ Newbie
 
Registered: Mar 2007
Location: 127.0.0.1, Virginia, USA
Distribution: OpenSuSE & Gentoo (Primarily)
Posts: 15

Original Poster
Rep: Reputation: 2
Hi Tom & LinuxQuestions community,

When I initially setup the system for use, it asked if I wanted to setup a RAID array then and I chose not to since I didn't have two drives at the time. I believe OpenSuSE does support RAID. I also updated mdadm to the latest release from what YaST provides. Finally, I installed grub2 from the compiled source available on their website. I couldn't get grub2 to install, either. From my understanding, under my current configuration of metadata 1.2, it won't work with "legacy" grub.

As far as your suggestion on using a single drive for the /boot array, I have considered it. I also have a thumb drive I was considering to possibly figure out how to get the machine to boot off of that with Grub 1.99. Then, I could simply back up the drive (for now) to the existing md0 array after the machine boots and detects it until I can get grub 1.99 sorted out.

However, I can't seem to figure out how to get it to boot with the thumb drive because it still doesn't detect the RAID. When it boots, it'll go to the limited initrd console and I can see from /proc/mdstat that the drives are not mounted. However, when I manually mount them, they are detected but at that point, I can't boot to them.

One other thing I did notice, however, is that when I booted to a rescue disk, the RAID devices are now listed as /dev/md126 and /dev/md127 instead of being /dev/md0 and /dev/md1. I tried the trick I saw online to change the super-minor numbering but to no avail.

Command I used from rescue disk:
mdadm --stop /dev/md126 (/boot)
mdadm -A /dev/md0 -u <UUID> -U super-minor /dev/sda1 /dev/sdb1
It mounts fine as md0 but when I reboot, it's back to md126. I did the same thing for md127 except I changed it to md1. When I tried to use the -m126 parameter in place of -u, it gave me an error message saying that the super-minor could not be found.

So, I'm not sure if they are related or even part of my problem. I just really would like to get this working :-\.
 
Old 01-20-2011, 08:37 PM   #4
cyberdeath
LQ Newbie
 
Registered: Mar 2007
Location: 127.0.0.1, Virginia, USA
Distribution: OpenSuSE & Gentoo (Primarily)
Posts: 15

Original Poster
Rep: Reputation: 2
Hello everyone,

I wanted to mention something I found after I posted earlier today. I realized that the reason it keeps mounting md126 is because that's what is hard-coded into mdadm.conf within initrd. I'm still trying to figure out the easiest way to solve this without going through too much trouble. I really wish there was a way to mount it, modify it, then unmount. I tried the cpio method and I get a kernel panic when I try to boot with it.

With that said, I'm not sure that's the problem anyway so I'm open to any suggestions to get grub to work so I can boot without a USB stick.
 
Old 01-21-2011, 11:17 AM   #5
cyberdeath
LQ Newbie
 
Registered: Mar 2007
Location: 127.0.0.1, Virginia, USA
Distribution: OpenSuSE & Gentoo (Primarily)
Posts: 15

Original Poster
Rep: Reputation: 2
Question

Hello everyone,

Wanted to give an update on the status of my problem.

I was able to boot using a rescuedisk and trying to boot to /dev/md1. When it failed, it took me into the initrd / where I was able to mdadm -S and mdadm -A under /dev/md1. I exited that environment and the OS booted. Once in the OS, I ran a mkinitrd -r md . I pulled the initrd off /boot and was able to use this on my thumb drive for now to boot to the correct device name of /dev/md1.

So, that problem is resolved. My initial problem, however, is not.

The error message I get now is:

Code:
chmod a+x grub-set-default
./config.status --file=-:util/grub-reboot.in | sed -e 's,@pkglib_DATA@,grub-mkconfig_lib update-grub_lib,g' > grub-reboot
chmod a+x grub-reboot
make[2]: Leaving directory `/root/src/grub-1.99rev3'
Making all in grub-core
make[2]: Entering directory `/root/src/grub-1.99rev3/grub-core'
gcc -o gentrigtables -I../include  gentrigtables.c -lm
/gentrigtables > trigtables.c
/bin/sh: /gentrigtables: No such file or directory
make[2]: *** [trigtables.c] Error 127
make[2]: Leaving directory `/root/src/grub-1.99rev3/grub-core'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/src/grub-1.99rev3'
make: *** [all] Error 2
This happens when I try to install grub 1.99rc1. I know the problem is with relative paths but I was hoping someone knew of a quick way to solve it without having to change the path in all instances, which I already tried and was unsuccessful.

Any suggestions would be greatly appreciated.
 
Old 02-13-2011, 10:51 AM   #6
Dunkelschorsch
LQ Newbie
 
Registered: Aug 2009
Distribution: Arch Linux
Posts: 7

Rep: Reputation: 0
Hi Cyberdeath;
despite what the grub2-wiki says here http://grub.enbug.org/LVMandRAID, version 1.99rc1 does not cope with 1.2 metadata superblocks. Tried it on Arch Linux, wasn't able to either install or generate a config file.
Burg, on the other hand, which is based on grub2, does the job just fine. Since you are building from source anyway, maybe you should give it a try. You can get it here: http://code.google.com/p/burg/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] GRUB: Cannot find list of partitions && /usr/sbin/grub-setup: error w1k0 Linux Mint 26 12-21-2010 03:29 PM
Moved to mdadm raid1 and now I'm having grub problems gardar Linux - Software 2 11-28-2010 09:59 AM
LXer: PV-Grub & managing openSUSE 11.1 PV DomU (via VFB) at Xen-Unstable Dom0 with 2. LXer Syndicated Linux News 0 02-13-2009 02:12 AM
Problems with Grub and Mdadm katvis Linux - Newbie 1 11-02-2007 01:07 AM
Problem booting with grub + mdadm spectra Linux - General 1 04-04-2007 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration