Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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?
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 :-\.
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.
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.
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/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.