LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 02-27-2015, 08:59 PM   #1
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Rep: Reputation: 31
gentoo grub cant resolve root using raid1


Hi Guys.

Trying to setup a new system on Raid 1.

I followed the handbook and This site and now I cant boot the system.

I get the error unable to resolve root: UUID XXX

The install works as I rsynced it onto a spare HDD with a ext4 partition, plugged it into sda slot (removed other), reconfigured grub and other configs and it boots fine.

I am using Grub2 boot loader following instructions from the handbook
Quote:
grub2-mkconfig -o /boot/grub/grub.cfg
I tried downgrading grub to grub:0 and manually setup my conf file with similar non booting results.

Here are some of my configs (or useful bits)

/etc/mdadm.conf
Quote:
ARRAY /dev/md0 metadata=0.90 UUID=799f745c:7b24cc72:25c9ef3c:aa4e42c9
This came from the command mdadm --detail --scan >> /etc/mdadm.conf

/etc/fstab
Quote:
/dev/md0 / ext4 noatime,user_xattr 0 1
and from grub.cfg

Quote:
linux /vmlinuz-3.18.7-gentoo root=UUID=23b7cbb0-a3c5-4e85-89dd-23e6b9e1c637 ro
initrd /initramfs-genkernel-x86-3.18.7-gentoo
I did notice the UUID's didn't match so during testing, I changed them to be the same with the same results.

If I change the grub config from UUID to /dev/md0, I get the same results.


Any help would be great.

Danny
 
Old 03-01-2015, 07:46 AM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
Are you using grub2 or grub legacy? For grub legacy the line should be
Code:
kernel /vmlinuz-3.18.7-gentoo root=UUID=23b7cbb0-a3c5-4e85-89dd-23e6b9e1c637 ro

Last edited by colorpurple21859; 03-01-2015 at 07:47 AM.
 
Old 03-01-2015, 02:04 PM   #3
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
Grub2.

I just followed the handbook which now uses grub2 (which I've never used before). I may have to downgrade grub and try what you said.
 
Old 03-01-2015, 04:15 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
the post you mention is for legacy grub, maybe these will help for grub2. I know they are for other distros, but they may help.
https://ritter.vg/blog-grub2_raid_boot.html
https://bbs.archlinux.org/viewtopic.php?id=160322
http://www.howtoforge.com/how-to-set...n-ubuntu-10.04
 
Old 03-02-2015, 04:20 AM   #5
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
Thanks for the help. Happy to reply that I got it working after many many hours trial and error taking suggestions from those listed links.

In the end I think I needed grub2 emerged with -device-mapper use flag and also the auto config from grub wasn't picking the right UUID. When I manually changed it to what was in mdadm.conf, it booted fine.
 
Old 03-02-2015, 04:46 AM   #6
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
May have spoken too soon

Now during the boot process I can see an error

Quote:
EXT3-fs (sda4): error: couldn't mount because of unsupported optional features (240)
sda4 is the location of my md0 and is my / partition. It was formatted ext4. (Boot is on sda2 and only ext2)


Now the operating system loads and works ok but the command cat /proc/mdstat returns

Quote:
cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear] [multipath]
unused devices: <none>
There is also no md device in /dev. mdadm --detail /dev/md0 can't find anything.

It seems to be running off an array but isn't aware of it.

I think grub must be still missing something.
 
Old 03-02-2015, 05:33 AM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
Quote:
I think grub must be still missing something.
This is most lilely has nothing to do with grub, once the system boots grub is out of the picture.
Quote:
Now the operating system loads and works ok but the command cat /proc/mdstat returns
Code:
cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear] [multipath]
unused devices: <none>
There is also no md device in /dev. mdadm --detail /dev/md0 can't find anything.
It is most likely a kernel or configuration file adjustment.
 
Old 03-02-2015, 06:10 AM   #8
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
Strange that the system will pick up raid devices from other disk if I put them in. Or if I boot the system from a live cd, then mount the md0, it works fine.

My brain is hurting too much now. I'll look at tomorrow after work.
May still even give up on grub2 and go back to legacy.
 
Old 03-03-2015, 05:34 AM   #9
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
I have spent so many hours trying to figure this out with no luck

I went back over my kernel config and made sure all drivers for raid were in the kernel.

Still no luck so I removed grub2 and went grub legacy. Following above instructions, it boots with the same issues eg. cant find md0 but the operating system still works.

I followed these tutorials a few years ago on another machine and it worked great. I cant figure out what I am doing different.

I'm running kernel 3.18. I may have to try downgrading to a lower version.
 
Old 03-06-2015, 09:49 PM   #10
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
Bit of an update for anyone interested.

I copied a kernel from another machine I setup a few years ago to this machine (/usr/src/linux-3.3.8) including its config and recompiled it on the new machine.

This kernel boots up fine (with no initrd) and everything works fine. (using root=/dev/md0)

I tried booting one of the newer kernels (3.18.7) with no initrd and it wont boot.

My question is what has changed since 3.3.8 that makes raid behave so differently.
 
Old 03-06-2015, 10:03 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Config_md_autodetect ?
 
Old 03-06-2015, 10:07 PM   #12
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
CONFIG_MD_AUTODETECT=y
 
Old 03-07-2015, 12:55 AM   #13
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
Not sure what I have done but I copied the .config from the working 3.3.8 kernel to the new 3.18.7 and re rolled the kernel.

Works great with no initrd and root=/dev/md0
/proc/mdstat and mdadm --detail both show working raid arrays.

I have attached the working config and non-working config.

If anyone can see the difference that stops it booting from raid, I would love to have it pointed out to me for the future.
Attached Files
File Type: txt config.txt (99.3 KB, 32 views)
File Type: txt confignotworking.txt (117.4 KB, 28 views)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error (raid1) circus78 Debian 10 04-25-2013 07:14 PM
GRUB root="/dev/sda1' does not exist. gentoo installation problem ununun Linux - General 2 08-01-2011 08:30 PM
RAID1 and GRUB Error 17 clkennedy Linux - Server 1 06-18-2009 10:38 AM
Grub, RAID1 and a spare theooze Linux - General 3 10-15-2008 10:53 AM
Gentoo ATA Raid1 Vyeperman Linux - Hardware 1 01-14-2004 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 03:29 AM.

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