Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on amd64 and software Raid
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Dark Mayu
n00b
n00b


Joined: 21 Nov 2009
Posts: 2

PostPosted: Sun Nov 22, 2009 12:00 am    Post subject: Gentoo on amd64 and software Raid Reply with quote

Hi there,

I'm new to Gentoo and would love to try this dist. out(and learn new things about linux), but I have a very annoying and depressing problem within the installation process:

I want to install Gentoo mainly on Raid 0. For the setup, I'm using the quick insallation guide, the only difference in setup is my partitioning plan:

sda + sdb, each about 82GB

sda1 & sdb1 for /boot, raid1

sda2 & sdb2 as swap, striped

sda3 & sdb3 as / , striped

Except for the partitions, I did exactly what the Tutorial said. I even tried the howto on the Gentoo wiki.

Now, the installation works up to that point where I have to reboot, right after selecting "gentoo" in grub for boot, the system seems to load, but stops and prints an error saying that it couldn't find root on (hd0,0). It lists sda and sda1 as possible options for root= and just hangs up.

Judging from the actual error, I would guess that the system is not able to read the striped partition... Or did I miss something out not listed in the tutorial?
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Sun Nov 22, 2009 2:39 am    Post subject: Reply with quote

Well, grub sure can't read a striped partition, and (hd0,0) is a grub disk identifier so I assume grub is the one having a problem.

This site: http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml explains how to use raid and lvm, but you should be able to ignore the lvm parts if you have sufficient understanding of raid. Don't misunderstand me, I don't think you should reinstall, but I think you may have missed something important. Did you install the raid utilities? Is mdadm available in your chroot?

Now, if I misunderstand, you might actually be getting the kernel to boot, in which case you don't have to mess with grub and your boot partition at all, since it's done its job by the time the kernel boots. Instead, direct your attention to your kernel configuration. Did you enable raid? It will have to be compiled in since you can't load a module without the filesystem it's on (unless you're using an initrd or initramfs, in which case you could have a module, but no real purpose to it. you'll always need raid on if you have a root filesystem on raid).

If you need more help, throw up your kernel command line parameters from grub too, would you? I'd like to see whether you're passing root=/dev/md2 (i think that would be right looking at your list).

And also, there's not much point to adding the overhead of software raid for swap space
Quote:
sda2 & sdb2 as swap, striped

Just activate 2 swap partitions and you'll automatically get striped swap space. This will be a little more efficient.

And one final thing. Looking at the size of your drives I would guess they're old. Please make a backup frequently. Since you're striping only one small problem with either drive would destroy your system.

Good Luck!
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
cubchai
n00b
n00b


Joined: 11 Sep 2004
Posts: 70

PostPosted: Sun Nov 22, 2009 3:45 am    Post subject: Reply with quote

I had this problem too but too bad I have forgotten the solution partially.

I think the problem lies within setting up grub. That's how I solved this problem. You might specify the wrong root for grub.
Back to top
View user's profile Send private message
aguettinger
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2003
Posts: 84

PostPosted: Sun Nov 22, 2009 3:57 am    Post subject: Reply with quote

@erik: if you read Mayu's post again he is exactly following the guide you suggested.

@mayu: It wasn't quite clear if you use LVM or not as in the guide. Can you clarify?
Can you post grub.conf and your /etc/fstab.
Also check your kernel config. Did you set everything as in the guide? Did you enable the stuff for the filesystems you are using (ext2, ext3) and for the disks you are using (Serial Ata drivers).

Also, in the guide / is raid-1, not stripped.
_________________
regards
- andy
Back to top
View user's profile Send private message
Dark Mayu
n00b
n00b


Joined: 21 Nov 2009
Posts: 2

PostPosted: Sun Nov 22, 2009 12:14 pm    Post subject: Reply with quote

Thanks for your replies.

@aguettinger:
the only difference between the guides configuration and my one is that I use raid 0 for / and no lvm at all.

@erik258:
I'm not sure if Grub is the problem since I am able too boot into it and also can configure it. But if I select Gentoo to boot, it stops at the point where it's supposed to mount / .

Yes, the 2 hdd I use are 2 old Server SATA drives. I have another hdd which serves as backup drive.


I am sorry for not giving many detailed informations, the problem (and this is also the reason why I have to reinstall all the time) is that if I boot the minimal cd, the md partitions are not available anymore.
cat /proc/mdstat doesn't list anything, thus I need to start from scratch again.

fstab looks like this:
Code:
/dev/md1          /boot                   ext2  noauto,noatime  1 2
/dev/md3          /                         ext3  noatime             0 1
/dev/sda2         none                    swap  sw,pri=1           0 0
/dev/sdb2         none                    swap  sw,pri=1           0 0

At 1st, I wanted to use ext3 for boot and ext4 for root, but the result was always the same. I tried ext2/ext3 for boot/root as well.

boot.conf looks like this:
Code:
default 0
timeout 10

title Gentoo Linux 2.6.30-r5
root (hd0,0)
kernel /boot/kernel root=/dev/md3


I configured Grub with these commands:
Code:
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)

device (hd1) /dev/sdb
root (hd1,0)
setup (hd1)

The reason for the device command is that 'find' when executed in Grub lists:
Code:
(hd1,0)
(hd2,0)
(hd3,4)
(I have 4 hdd, 3 SATAs and 1 IDE)

I am not sure if I picked the right drivers within the Kernel configuration, so I will try to use genkernel once, maybe that'll work...
Until now, I the only things I changed within the Kernel configuration were:
Processor -> athlon64; maximum amount of cpus = 2; disabled IBM and Intel drives
Network -> disabled NFS, PCMCIA, token ring(anyone out there still using that?), FDDI, Wireless
Divice Drives -> SATA disabled Intel drivers, enabled Nvidia drivers(ASUS M2N board with nvidia chipset)
I didn't change the SCSI settings
Graphics -> disabled Intel driver, enabled ATI Radoen driver

And I definitely enabled the Raid support along with Raid 1 and Raid 0.
That's about the configuration I used. Sorry for this rough layout...
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Sun Nov 22, 2009 6:27 pm    Post subject: Reply with quote

Quote:

I am sorry for not giving many detailed informations, the problem (and this is also the reason why I have to reinstall all the time) is that if I boot the minimal cd, the md partitions are not available anymore.
cat /proc/mdstat doesn't list anything, thus I need to start from scratch again.


mdadm can assemble these devices based on the information on the disks, if you invoke it properly. check out the manual page on mdadm, particularly the --assemble section.
Quote:

@erik258:
I'm not sure if Grub is the problem since I am able too boot into it and also can configure it. But if I select Gentoo to boot, it stops at the point where it's supposed to mount / .


If it boots the kernel (and a whole bunch of output scrolls on the screen) grub is configured correctly. The last line in this case would probably be a 'PANIC' .


Quote:
@erik: if you read Mayu's post again he is exactly following the guide you suggested.

Oh, sorry, I saw 'quick install guide' and immediately thought
http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
networkorg
n00b
n00b


Joined: 02 Feb 2006
Posts: 74
Location: Buenos Aires

PostPosted: Wed Dec 16, 2009 3:13 am    Post subject: Reply with quote

Hi,

I am not sure if you have still solved your problem. But this info should help to fix the boot sequence as I have it in an enviroment system. First is to change the kernel line in your grub.conf (only one examble) :

Code:

title=gentoo_2632_1st
root (hd0,0)
kernel (hd0,0)/boot/vmlinuz-2.6.32-first nofb dodmraid root=/dev/md3 real_root=/dev/md3


I use the same for a RAID6 Raid on AMD64 system. The important stuff is to tell the kernel the "REAL_ROOT" to know where the file system is located. Maybe you don't need to use dodmraid but it is more secure to put it into the grub.conf that the raid driver will be loaded corretly.

Be sure that you have this lines (my config) in your /etc/mdadm.conf with the correct UUID IDs and be NOTED that GRUB only can start the /boot filesystem if it is on a nonRAID, RAID0 or RAID1 partition :!: I use a config with 4 HDD and have 2 x RAID1 for /boot (md1 + md2). This file is most important that the system/kernel knows which partitions exists (DEVICE line) and which one is for which array (ARRAY lines).

Code:

DEVICE /dev/sd[abcd]1 /dev/sd[abcd3] /dev/sd[abcd]4
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=c3c612c6:xxxxxx devices=/dev/sda1,/dev/sdc1
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=77187f55:xxxxxx devices=/dev/sdb1,/dev/sdd1
ARRAY /dev/md3 level=raid6 num-devices=4 UUID=436749b8:xxxxxx devices=/dev/sda3,/dev/sdb3,/dev/sdc3,/dev/sdd3
ARRAY /dev/md4 level=raid6 num-devices=4 UUID=5b454326:xxxxxx devices=/dev/sda4,/dev/sdb4,/dev/sdc4,/dev/sdd4


Don't forget to declare all partitions (like Raid and Swap) in /etc/fstab (as my example) and note that you should not have SWAP on a RAID partition. Use on each HDD a separated SWAP partition because it is much faster and don't get you into any trouble ...

Code:

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/md0                /boot           reiserfs        noatime,notail,rw       1 2
/dev/md3                /               reiserfs        noatime,notail,rw               0 1
/dev/md4                /nfs            reiserfs        noatime,notail,rw,usrquota,grpquota             0 1
/dev/sda2               none            swap            sw,pri=1                0 0
/dev/sdb2               none            swap            sw,pri=2                0 0
/dev/sdc2               none            swap            sw,pri=3                0 0
/dev/sdd2               none            swap            sw,pri=4                0 0


For any question send me some note ...

bye alex
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum