Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting gentoo from intel RAID 0 volume.
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
HenrykZZarzecza
n00b
n00b


Joined: 02 Sep 2018
Posts: 3
Location: Sosnowiec

PostPosted: Sun Sep 02, 2018 1:17 pm    Post subject: Booting gentoo from intel RAID 0 volume. Reply with quote

Hello,

I'm experiencing problems with booting gentoo on intel RAID 0 array. Apparently can't get it working and I'm slowly getting out of ideas.
It's a RAID 0 volume made of 2 128GiB SSD's with built-in Intel (pseudo)RAID controller version 1.0 on MSI GT60 2PC(basically 16F4 whitebook but the hardware is the same).
I'm installing it next to Windows 10, partition table is GPT, booting with UEFI. The array is detected by LiveCDs and mounts without problems, fdisk shows:
Code:

GPT PMBR size mismatch (500129791 != 250069679) will be corrected by w(rite).
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x6dcb6716

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1           1 500129791 500129791 238.5G ee GPT

Partition 1 does not start on physical sector boundary.


Disk /dev/sdb: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/md126: 238.5 GiB, 256066453504 bytes, 500129792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 16384 bytes / 32768 bytes
Disklabel type: gpt
Disk identifier: 60194ECA-E7AA-463B-8F89-AC395D24C425

Device            Start       End   Sectors   Size Type
/dev/md126p1       2048    923647    921600   450M Windows recovery environment
/dev/md126p2     923648   1128447    204800   100M EFI System
/dev/md126p3    1128448   1161215     32768    16M Microsoft reserved
/dev/md126p4    1161216 369247092 368085877 175.5G Microsoft basic data
/dev/md126p5  436932608 438685695   1753088   856M Windows recovery environment
/dev/md126p6  369248256 436932607  67684352  32.3G Linux filesystem
/dev/md126p7  438685696 498020351  59334656  28.3G Linux filesystem
/dev/md126p10 498286592 500129758   1843167   900M Linux swap

Partition table entries are not in disk order.

It shows some errors but windows boots, filesystem mounts etc, so I'm not sure if it's an issue. I'm using windows EFI partition as /boot.
I've installed Fedora on LVM once(but I prefer distribution for adults like gentoo ;) ) and it worked, so booting linux is possible on this configuration.

I've configured kernel manually (there are rumors that genkernel won't configure kernel properly for RAID), generated initramfs with genkernel with --mdadm option, added
Code:
CONFIG_CMDLINE="CONFIG_CMDLINE=\"domdadm root=UUID=5645bde7-efbe-4adf-a741-bce9a8b86044 rootfstype=ext4\""

to .config.

The problem is that kernel can't mount the filesystem, tried with grub(grub.cfg:https://www.dropbox.com/s/82d434k1mhl54jg/grub.cfg.henryk?dl=0)- "muuid/(...) not found"(tried with two muuids because I'm not sure which one is correct) and with EFI configured with efibootmgr- "can't mount block device (0,0)" but it looks like framebuffer is enabled(i mean there are colors etc ;) ) so i think it's one step from booting.
I think the problem is in the kernel configuration.
Here's what I've enabled for RAID:
Code:
livecd /usr/src/linux # cat .config | grep RAID
CONFIG_RAID_ATTRS=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID456=y
CONFIG_DM_RAID=y
CONFIG_DMA_ENGINE_RAID=y
# CONFIG_ASYNC_RAID6_TEST is not set
CONFIG_ASYNC_RAID6_RECOV=y
CONFIG_RAID6_PQ=y

Previously I've compiled kernel without DM_RAID and other MD_RAID and it makes no difference.
About the controller, lspci -v:
Code:

00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 05)
        Subsystem: Micro-Star International Co., Ltd. [MSI] 82801 Mobile SATA Controller [RAID mode]
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 25
        I/O ports at f0b0 [size=8]
        I/O ports at f0a0 [size=4]
        I/O ports at f090 [size=8]
        I/O ports at f080 [size=4]
        I/O ports at f060 [size=32]
        Memory at f7f16000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [70] Power Management version 3
        Capabilities: [a8] SATA HBA v1.0
        Kernel driver in use: ahci
        Kernel modules: ahci

Options in .config:
Code:

livecd /usr/src/linux # cat .config | grep AHCI
CONFIG_SATA_AHCI=y
CONFIG_SATA_AHCI_PLATFORM=y
# CONFIG_AHCI_CEVA is not set
# CONFIG_AHCI_QORIQ is not set
# CONFIG_SATA_ACARD_AHCI is not set

for filesystems:
Code:

livecd /usr/src/linux # cat .config | grep EXT[2,3,4]
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXT4_ENCRYPTION=y
CONFIG_EXT4_FS_ENCRYPTION=y
CONFIG_EXT4_DEBUG=y


entries in /etc/fstab look like this:
Code:
UUID=1AD7-F7D7  /boot   vfat    defaults,noatime        0 2
UUID=a10e1c67-bd67-450d-9638-4b4e175eedfe       none    swap    sw      0 0
UUID=5645bde7-efbe-4adf-a741-bce9a8b86044       /       ext4    noatime 0 1
UUID=090ede1b-ced9-4200-b926-364d47956e6a       /usr    ext4    noatime 0 1

(i've double-checked UUIDS and they're correct)
I'm compiling the kernel with:
Code:
make && make modules_install

Code:
make install

Code:
genkernel --mdadm --install initramfs

and the files in /boot are recent
then adding it to EFI(.efi file I'm also updating)
Code:
efibootmgr -c -d /dev/md126 -p 2 -L "GentooEFIBMGR" -l '\efi\Gentoo\boot\Gentoox64.efi' initrd='initramfs-genkernel-x86_64-4.14.64-gentoo'


Kind of strange thing is that before I've changed some kernel options not related to either RAID, SATA or filesystems options to prepare desktop environment it looked like it booted, but didn't give me any console despite of that it was configured, here's dmesg: https://docs.google.com/document/d/1qHFJCjlBTlVXUM4M8wfbAV8wDsiZawyX8ytzvCCmyYs/edit?usp=sharing
(sorry for gdocs)

Basically I suspect that I've either didn't configure kernel properly for SATA/RAID support(but I don't see any errors here so I may have over-configured it) or doing something wrong in the compiling/installing process, so I would be very grateful for any advise or guidance. It's been about ten years since I've installed gentoo for the last time(or maybe thirteen because it doesn't need reinstallation for upgrading ;) ) so I've got a little rusty in this subject.

Thank you in advance :)

EDIT:
here's my .config: https://www.dropbox.com/s/09pjhmo2qky8doc/config-henryk.txt?dl=0
(I know it's messy, I'll work on it :) )

Regards,
Paweł
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43754
Location: 56N 3W

PostPosted: Sun Sep 02, 2018 4:29 pm    Post subject: Reply with quote

HenrykZZarzecza,

Until root mounts, noting much matters.
Until then, its the kernel and the initrd, if you have one. As root is on raid, you must have an initrd since you need mdadm to assemble your raid before root will be visible.

Your fdisk -l looks a bit odd but its correct for a raid0 set.
You made the raid0 then partitioned it, so the partition table describes all the raid0 space and appears only on one drive.

Your dmesg ends with
Code:
[    4.420669] Adding 921576k swap on /dev/md126p10.  Priority:-2 extents:1 across:921576k SS
[    4.484250] EXT4-fs (md126p6): re-mounted. Opts: (null)
[    4.492426] EXT4-fs (md126p7): re-mounted. Opts: (null)

so thats swap and your two linux filesystems.

Unfortunately that's from the liveCD, so its not telling what went wrong.

I hate google and I won't download random stuff from the internet.
Please use wgetpaste to share files and large command output.

Code:
can't mount block device (0,0)
tells the kernel device major and minor numbers that the kernel is trying to mount as root.
(0,0) tells that the kernel cannot reach your HDD at all.
There is nothing obviously wrong in your kernel that would account for that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7556
Location: Goose Creek SC

PostPosted: Tue Sep 04, 2018 3:48 am    Post subject: Reply with quote

Guessing that the initramfs is not running
have you looked at https://wiki.gentoo.org/wiki/EFI_stub_kernel#Optional:_Initramfs
boot the install media in UEFI mode, and run
Code:
efibootmgr -v | wgetpaste -t
blkid | wgetpaste -t
mkdir /mnt/esp
mount /dev/md126p2 /mnt/esp
ls -lR /mnt/esp | wgetpaste -t
umount /mnt/esp
post the url's retuned here
Code:
CONFIG_CMDLINE="CONFIG_CMDLINE=\"domdadm root=UUID=5645bde7-efbe-4adf-a741-bce9a8b86044 rootfstype=ext4
is not familiar phrasing, I'd expect
Code:
CONFIG_CMDLINE="domdadm root=UUID=5645bde7-efbe-4adf-a741-bce9a8b86044 rootfstype=ext4"

_________________
Defund the FCC.
Back to top
View user's profile Send private message
HenrykZZarzecza
n00b
n00b


Joined: 02 Sep 2018
Posts: 3
Location: Sosnowiec

PostPosted: Tue Sep 04, 2018 11:07 pm    Post subject: Reply with quote

I'm sorry for the delay but I was a little busy lately.

The RAID was made with built-in intel utility if it matters.

Dmesg file I posted was from installed gentoo but I've once generated initrd with .config from LiveCD or minimal-install-cd, I thought it was overwritten later but I think I forgot to generate new one while compiling another kernel. I've tried this trick a minute ago and it didn't work but maybe .config from LiveCD is a little outdated considering it's two years old :) So I'll try with a recent installation CD .config.

Quote:

I hate google and I won't download random stuff from the internet.
Please use wgetpaste to share files and large command output.

Of course, sorry, I didn't know about this tool.

So here's my grub.cfg https://paste.pound-python.org/show/zAc7NrCY7HQY8aMMST2J/
I admit that I've edited it despite of the header ;). Also I've previously used grub-mkconfig before I've read that it doesn't really work with RAID.

Here's dmesg: https://paste.pound-python.org/show/LGV85YrpCOH0UQNYjJnF/
And .config https://paste.pound-python.org/show/j3TLVtkR7DS5HBQfx9MH/

@DONAHUE
I've tried this guide but with a separate initrd file, I think I'll try integrating it.

Here's the output:
efibootmgr -v: https://paste.pound-python.org/show/EelBne5cXL2MPGLFpsl2/
blkid: https://paste.pound-python.org/show/TDqxlh0S8uyU4yqHDm3J/
ls -lR /mnt/esp: https://paste.pound-python.org/show/OMnsB6K5UfLMBwAvSz5e/

About the CMDLINE argument, it must have been an error in copying, I tried with PARTUUID argument but the effect was the same.

Regards,
Henryk z Zarzecza
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7556
Location: Goose Creek SC

PostPosted: Wed Sep 05, 2018 4:50 am    Post subject: Reply with quote

Install media dmesg wrote:
Command line: BOOT_IMAGE=/vmlinuz-4.14.65-gentoo root=UUID=5645bde7-efbe-4adf-a741-bce9a8b86044 ro
.config wrote:
CONFIG_CMDLINE="domdadm root=PARTUUID=6dad7bbb-7aca-db48-8185-443b4cfd9db9 rootfstype=ext4"
blkid wrote:
/dev/md126p6: UUID="5645bde7-efbe-4adf-a741-bce9a8b86044" TYPE="ext4" PARTUUID="6dad7bbb-7aca-db48-8185-443b4cfd9db9"
grub.cfg wrote:
/vmlinuz-4.14.65-gentoo domdadm root=UUID=5645bde7-efbe-4adf-a741-bce9a8b86044 rootfstype=ext4 ro
I'm puzzled by the install cd produced dmesg command line having the same UUID as the file system on /dev/md126p6.
Thoughts:
Make a rEFInd cd or refind usb. Reference is https://www.rodsbooks.com/refind/getting.html . Make the cd or usb first to boot in the uefi. See how many kernels and OS's are found.
Use root=/dev/md126p6 by manual edit of grub.cfg.
If the boot result is unchanged:
Use root=PARTUUID=6dad7bbb-7aca-db48-8185-443b4cfd9db9 by manual edit of grub.cfg
If the boot result is unchanged:
In chroot, recompile the kernel enabling Processor type and features ---> [*] Built-in command line overrides boot loader arguments
If the boot result is unchanged:
in chroot, unmerge genkernel, emerge genkernel-next, genkernel next uses the same command set as genkernel, genkernel-next should use your oldconfig but check it, suggest not mounting the Efi Systems Partition at /boot and dispensing with the separate boot partition entirely instead create a /boot/efi or /boot/esp or /mnt/whatever mountpoint for use by the ESP, run
Code:
genkernel --mdadm --menuconfig all
See the efi stub wiki.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
HenrykZZarzecza
n00b
n00b


Joined: 02 Sep 2018
Posts: 3
Location: Sosnowiec

PostPosted: Thu Sep 06, 2018 10:47 am    Post subject: Reply with quote

Hello,

I've managed to get the system working.
Basically the first and main problem in loading the kernel was that when I looked at the mess on my /boot partition I've noticed some syntax errors and typos, so sorry for wasting your time on that matter. I'm not sure if it was the only issue because I've done a few other things which I barely remember because I thought they didn't work and continued.
The second problem was not recognising the root partition.
Basically when I've cleaned and corrected /boot, configured efibootmgr, I've got a bootable kernel with initramfs, but booting ended with:
Quote:
unable to mount root partition PARTUUID=XXX

and it asked for correct one or offered a shell, Ive tried with UUID in CONFIG_CMDLINE but it didn't work, then I've noticed that it listed RAID device name despite I've never defined it so it had to be recognised.
So I thought "why not?" and gave /dev/md126p6. It booted.
At the moment I have "domdadm root=/dev/md126p6 rootfstype=/ext4" in CONFIG_CMDLINE and it's booting but I've left an initramfs with UUID deifned so it may be a solution in case if someone will experience similar problem(but this old initramfs may not be necessary, I'll experiment on that matter when I'll have the environment sorted out). I've also tried with no root defined(in kernel and initramfs) for research purposes but it also didn't recognise the root partition.

Basically I think that maybe when RAID was created with integrated intel BIOS utility it behaves different that mdraid created arrays and it's to be handled almost like a normal device. Or maybe mdadm needs different syntax in this case(I'll try with ":" not "-").

@DONAHUE
I think that efi implementation on my motherboard may be a little uncommon because it sometimes behaves strangely. For example after long time powered off, windows can't connect to a wifi network without reboot or efibootmgr sometimes lists possible CD/USB/net boot options and sometimes not. It's worth mentioning that I have firmware and BIOS updated and unlocked with a known MSI magician's versions and my notebook is a barebone, so maybe it has some unofficial patches or something of the sort.
If you're curious about something I can experiment with it for you.

Thank you for your effort,
Regards,
Henryk z Zarzecza
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7556
Location: Goose Creek SC

PostPosted: Thu Sep 06, 2018 1:33 pm    Post subject: Reply with quote

curious about:
what does dmesg command line look like without the install media? grep -i command /var/log/dmesg
what does rEFInd cd or usb see on your raided system? If you try it and it works you may like it better than grub.

Loss of wifi in windows is probably due to power saving shutting down the radio long enough for the windows wifi driver to forget the connection. wife's machine had the problem, reboot was my first fix, taking wifi out of service and restarting was second, finding wifi power saving and setting it off was third. Windows troubleshooter was able to determine that the machine was not connected :D .
If the problem arises in Gentoo a kernel disabling: "Networking Support -> Wireless -> [ ] enable powersave by default" is a solution.
Hers was a desktop ...

Ordered a couple of small ssd's Monday so I could experiment; don't use raid ordinarily.

Researching reveals that rEFInd does not have the ability to read lvm or fakeraid or linux software raid (mdraid)
_________________
Defund the FCC.


Last edited by DONAHUE on Sun Sep 23, 2018 1:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
olger901
l33t
l33t


Joined: 17 Mar 2005
Posts: 625

PostPosted: Fri Sep 21, 2018 8:01 am    Post subject: Reply with quote

I've tried messing around with Intel Software RAID myself in both RAID-1 and RAID-0 on a variety of Linux systems, but never got it to work in a stable situation.

My advice:Use Linux software RAID, as it works much more reliably and stable then Intel RAID. If you update your UEFI / BIOS image or brick your laptop or reset your BIOS, there are chances you'll lose your RAID array and will be unable to get it back. As I've seen that happen a lot with Intel (BIOS) RAID.

- Create 1 /dev/sda1 partition on 1 disk as EFI partition where you locate GRUB2, the Linux kernel, the initrd image and such, as it's impossible to use the whole disk, because EFI won't recognize the partition as it's Linux and not a FAT32 EFI partition;
- Create a RAID-0 array in your case using mdadm software for /dev/sda2 and /dev/sdb2 for swap
- Create a RAID-0 array in your case using mdadm software for /dev/sda3 and /dev/sdb3 for the leftover or however you want it
- Format the mdadm arrays and install Gentoo Linux on it
- Create a script (using rsync) that syncs /dev/sda1 to /dev/sdb1
- If you include the RAID kernel options statically in your kernel, you won't have to hassle with an initrd image either.

Linux software RAID, that isn't influenced by BIOS flashes or defunct mothetboards and is more reliable than Intel (BIOS) RAID.
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