Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Intel FakeRAID in EFI
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
nelsonwcf
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2012
Posts: 112

PostPosted: Wed Sep 14, 2016 11:40 pm    Post subject: [Solved] Intel FakeRAID in EFI Reply with quote

Hi everybody,

I decided to create another thread because the previous one (https://forums.gentoo.org/viewtopic-t-1050714.html) was not very clear about the difficulties and ended up going to the wrong direction. I'd like to start this thread asked a very basic question: Was anyone successful installing gentoo on a system with a FakeRAID using an Intel SATA Raid controller? Seems like silly question, right? However, I have spent more than 20 hours trying to follow instruction from many places, including gentoo guides, Arch Linux guides, many-different-linux-flavors forums, in additional to the manpages of dmraid, mdadm, initramfs, rEFInd, genkernel, dracut and any tool related to this subject. In theory, it should be possible because the LiveCD almost correctly boots it (I say almost because nouveau drivers will always freeze the system in EFI mode - so I have to disable Kernel Mode to be able to boot).

So, let's start to my last try so far:

1. Completely removed /usr/src/linux and re-emerged gentoo-sources again.
2. Created the default config - make defconfig.
3. Unmerged dmraid and all its dependencies.
4. Emerged mdadm (not statically). My reasoning to use mdadm is that the LiveCD configure my RAID drive using mdadm and because Intel recommendation is to use mdadm for their ISW device.
5. Went to genkernel.conf and changed only the line that says to include mdadm.
6. ran gernkernel all
7. Rebooted.
8. During bootloader screen (from refind), edited the kernel command line and added dodadm and rootfstype=ext4 in addition to what was already there (root=/dev/md126p6 and initramfs= something).
9. During the boot, a message returns saying it couldn't find the device and to type "shell" to get into the shell.
10. Got into the shell and to my surprise, none of my SSDs were detected, with the only available device being the USB stick (in /dev/sda and sda1).

What am I doing wrong? What are my options here?


Last edited by nelsonwcf on Fri Sep 30, 2016 4:07 pm; edited 2 times in total
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1654
Location: United Kingdom

PostPosted: Thu Sep 15, 2016 2:20 am    Post subject: Reply with quote

mdadm is not fakeRAID a.k.a. 'Fake RAID', it's softRAID a.k.a. 'Software RAID' (see also RAID). If you really want to use Software RAID and you have a fakeRAID controller, have you configured the BIOS/UEFI Firmware Settings accordingly? For example, my HP server has an HP B120i fakeRAID controller and, in order to use mdadm instead of the fakeRAID driver, I had to configure the following two options in the server's BIOS menu: a) in 'System Options/SATA Controller Options' select 'Enable SATA AHCI Support'; b) in 'PCI Device Enable/Disable' disable "HPSmart Array Controller'. I use a different Linux distribution on that server, but the same comments apply whatever the distribution.
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
nelsonwcf
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2012
Posts: 112

PostPosted: Thu Sep 15, 2016 4:19 am    Post subject: Reply with quote

Fitzcarraldo wrote:
mdadm is not fakeRAID a.k.a. 'Fake RAID', it's softRAID a.k.a. 'Software RAID' (see also RAID). If you really want to use Software RAID and you have a fakeRAID controller, have you configured the BIOS/UEFI Firmware Settings accordingly? For example, my HP server has an HP B120i fakeRAID controller and, in order to use mdadm instead of the fakeRAID driver, I had to configure the following two options in the server's BIOS menu: a) in 'System Options/SATA Controller Options' select 'Enable SATA AHCI Support'; b) in 'PCI Device Enable/Disable' disable "HPSmart Array Controller'. I use a different Linux distribution on that server, but the same comments apply whatever the distribution.


My apologies, I was not very clear. I already have a RAID 0 volume create through the BIOS utility. Linux partition is number 6 and the device I use to access it when booting from LiveCD is /dev/md126p6. Stage3 from gentoo is already installed there. I just need to set up a kernel (and maybe a initramfs) that can make my computer boot from that partition.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Thu Sep 15, 2016 6:08 pm    Post subject: Reply with quote

Quote:
Was anyone successful installing gentoo on a system with a FakeRAID using an Intel SATA Raid controller?
Don't do that. It suffers from disadvantages of both, software raid and hardware raid, and it only provides the advantages they share (e.g. being a raid)
Really. It's a dummy hardware that controls data format and adds another single point of failure and then makes your CPU do all the hard work.
If you have any choice at all, trash that install and go with soft-raid. Unless you have a good reason to go with actual hardware raid...
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Thu Sep 15, 2016 6:39 pm    Post subject: Reply with quote

szatox wrote:
Quote:
Was anyone successful installing gentoo on a system with a FakeRAID using an Intel SATA Raid controller?
Don't do that. It suffers from disadvantages of both, software raid and hardware raid, and it only provides the advantages they share (e.g. being a raid)
Really. It's a dummy hardware that controls data format and adds another single point of failure and then makes your CPU do all the hard work.
If you have any choice at all, trash that install and go with soft-raid. Unless you have a good reason to go with actual hardware raid...


I will have to give an emphatic second to this. Friends don't let friends use FakeRAID.

FakeRAID is really software RAID, embedded at a level beyond your control. Your data becomes tied to the hardware with the FakeRAID on it, be that the motherboard or a plug-in card. Your data will not be transportable to any other hardware - period. Since it's not really hardware RAID, so you're not offloading anything from your CPU, buying throughput, or any other benefit, other than the fact that you set it up through BIOS instead of RTFM for mdadm.

I've been happily running mdadm RAID-1 for over a decade.

I also have a friend who used to swear by hardware RAID, and for years he would have a pair of identical hardware RAID cards. The plan was (I don't know if he ever needed to execute this plan.) if one ever failed, he would install the other one, use it to get the latest backup of his data, then go buy another matched pair, install one, and recover his backup. A few years back he decided it just wasn't worth the hassle and moved to mdadm.

(Now for a moment of sarcasm and a minor dig that I can't refuse. I would recommend FakeRAID for systemd proponents.)
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
nelsonwcf
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2012
Posts: 112

PostPosted: Sat Sep 17, 2016 2:25 am    Post subject: Reply with quote

depontius wrote:
szatox wrote:
Quote:
Was anyone successful installing gentoo on a system with a FakeRAID using an Intel SATA Raid controller?
Don't do that. It suffers from disadvantages of both, software raid and hardware raid, and it only provides the advantages they share (e.g. being a raid)
Really. It's a dummy hardware that controls data format and adds another single point of failure and then makes your CPU do all the hard work.
If you have any choice at all, trash that install and go with soft-raid. Unless you have a good reason to go with actual hardware raid...


I will have to give an emphatic second to this. Friends don't let friends use FakeRAID.

FakeRAID is really software RAID, embedded at a level beyond your control. Your data becomes tied to the hardware with the FakeRAID on it, be that the motherboard or a plug-in card. Your data will not be transportable to any other hardware - period. Since it's not really hardware RAID, so you're not offloading anything from your CPU, buying throughput, or any other benefit, other than the fact that you set it up through BIOS instead of RTFM for mdadm.

I've been happily running mdadm RAID-1 for over a decade.

I also have a friend who used to swear by hardware RAID, and for years he would have a pair of identical hardware RAID cards. The plan was (I don't know if he ever needed to execute this plan.) if one ever failed, he would install the other one, use it to get the latest backup of his data, then go buy another matched pair, install one, and recover his backup. A few years back he decided it just wasn't worth the hassle and moved to mdadm.

(Now for a moment of sarcasm and a minor dig that I can't refuse. I would recommend FakeRAID for systemd proponents.)


Guys, I thank you both for the advice. My reason for choosing FakeRAID were:
1. It's running RAID 0. RAID 0 basically don't put any significant additional strain in the CPU, so going for a hardware RAID would be a waste for resources;
2. Software RAID has the problem that I run Multi-OS environment.

I even considered changing it from FakeRAID to SoftwareRAID, but since it is RAID 0 and I have both Windows and (want to have) Linux, FakeRAID may simplify things. If I was sure that I could use SoftwareRAID and both OSs would work with it without causing problem to each other AND was easy to manage, I wouldn't mind switching to it. That said, it doesn't change the fact there is lack of resources in this matter in gentoo guides. FakeRAID is also managed by mdadm and LiveCD can boot and recognize the strip volume so a hardware installation should be able to do the same.

So, first I'd like to solve my current issue. After this is solved, if there are good arguments for my set up why not to have FakeRAID, I can reinstall everything using other RAID type.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2970
Location: Germany

PostPosted: Sat Sep 17, 2016 8:44 am    Post subject: Re: Installing Gentoo in FakeRaid: Reply with quote

nelsonwcf wrote:
10. Got into the shell and to my surprise, none of my SSDs were detected, with the only available device being the USB stick (in /dev/sda and sda1).


If your disks are not detected you're most likely missing a puzzle piece, such as AHCI support baked into your kernel. (if running in ahci mode)

Boot a live cd that detects your disks and check dmesg what they are detected as. AHCI looks like such:

Code:

[    0.599520] ahci 0000:00:1f.2: version 3.0
[    0.599629] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x3f impl SATA mode
[    0.599634] ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part ems apst
[    0.609357] scsi host0: ahci
[    0.609616] scsi host1: ahci
[    0.609779] scsi host2: ahci
[    0.609957] scsi host3: ahci
[    0.610007] scsi host4: ahci
[    0.610062] scsi host5: ahci
[    0.610092] ata1: SATA max UDMA/133 abar m2048@0xf7e16000 port 0xf7e16100 irq 27
[    0.610096] ata2: SATA max UDMA/133 abar m2048@0xf7e16000 port 0xf7e16180 irq 27
[    0.610100] ata3: SATA max UDMA/133 abar m2048@0xf7e16000 port 0xf7e16200 irq 27
[    0.610103] ata4: SATA max UDMA/133 abar m2048@0xf7e16000 port 0xf7e16280 irq 27
[    0.610106] ata5: SATA max UDMA/133 abar m2048@0xf7e16000 port 0xf7e16300 irq 27
[    0.610109] ata6: SATA max UDMA/133 abar m2048@0xf7e16000 port 0xf7e16380 irq 27
[    0.610205] ahci 0000:03:00.0: SSS flag set, parallel bus scan disabled
[    0.610242] ahci 0000:03:00.0: AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[    0.610246] ahci 0000:03:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc sxs
[    0.610419] scsi host6: ahci
[    0.610461] scsi host7: ahci
[    0.610482] ata7: SATA max UDMA/133 abar m512@0xf7c10000 port 0xf7c10100 irq 28
[    0.610486] ata8: SATA max UDMA/133 abar m512@0xf7c10000 port 0xf7c10180 irq 28
...
[    0.913841] ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.916305] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.918519] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.920200] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    0.920203] ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.923302] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.923971] ata7.00: FORCE: horkage modified (noncq)
[    0.926071] usb 1-1: new high-speed USB device number 2 using ehci-pci
[    0.926077] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.926084] ata4.00: FORCE: horkage modified (noncq)
[    0.926145] ata6.00: FORCE: horkage modified (noncq)
[    0.926339] ata1.00: FORCE: horkage modified (noncq)
[    0.926379] ata4.00: ATA-8: WDC WD20EARS-00MVWB0, 51.0AB51, max UDMA/133
...


It could also be different, if your board still runs things in IDE emulation mode or something.

Once you know which driver necessary for your disks you can check your kernel config accordingly.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3383

PostPosted: Sat Sep 17, 2016 10:59 am    Post subject: Reply with quote

nelsonwcf wrote:

Guys, I thank you both for the advice. My reason for choosing FakeRAID were:
1. It's running RAID 0. RAID 0 basically don't put any significant additional strain in the CPU, so going for a hardware RAID would be a waste for resources;
2. Software RAID has the problem that I run Multi-OS environment.


Backup. Backup. Backup.
(and you should be OK)
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
nelsonwcf
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2012
Posts: 112

PostPosted: Fri Sep 30, 2016 4:06 pm    Post subject: Intel FakeRAID in EFI [Solved] Reply with quote

Ok guys, I found the solution after a lot of trial and error.

In my case, since my controller is from intel, the RAID volume created is similar to the one created by mdadm so this is the tool that I used to set things up.

1. The first step is to compile the kernel using it's system default [make defconfig] and adding Multiple devices driver support (RAID and LVM) plus the RAID type as the suboption. Don't compile as module.
2. Copy the kernel file to the boot partition/EFI/Gentoo as "something".efi.
3. Next, create a initramfs partition. I used genkernel --mdadm --install initramfs and the file initrd file went to /boot.
4. Copy this file to EFI partition, in the same place as the kernel file is located. In my case, boot partition/EFI/Gentoo/initramfs.efi
5. The next is the tricky part and one of the reasons it took me so long to be able to boot it. You have to add these files as new EFI boot entry. The tool I've tried to use is efibootmgr, but this tool has some erratic behavior right now. Sometimes it works, sometimes it doesn't and sometimes it corrupts the EFI boot loader. I spent two days trying to figure a way of adding the correct string to the EFI boot loader but efibootmgr wouldn't work. I downloaded easyUEFI for Windows and used it to create the entry.
Very important: Since your rootfs is not mounted, you can't use fstab to tell your kernel where the root partition is located so it has to be passed through the kernel command line.
The kernel parameters need to have at least the following options: initrd=\EFI\Gentoo\initramfs.efi ro root=/dev/[your_root_partition - in my case md126p6] domdadm AND the loader has to point to the kernel.

and this should do the trick.
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