0

I have a post on the debian forums as well but it seems to have less traffic than here so I thought I'd try my luck here as well.

I'm trying to install windows 10 and debian and possibly more distros on a fakeraid using UEFI and GPT. So I follow this guide and using dmraid I can successfully partition and install. The partitioning looks like this:

/dev/mapper/isw_dagfijbabd_RAID0SYS
|- Microsoft Recovery
|- EFI / boot
|- Microsoft MRS
|- Windows
|- swap
|- LVM PV
 \
  |-- VG0
   \
    |--- LV OS_2
    |--- LV debian
    |--- LV home

The problem is grub doesn't seem to see the raid when setting the root for the kernel. And I get this error

modprobe: module dm-raid45 not found in module.dep
Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
    - Check rootdelay= (did the system wait long enough?)
    - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/VG0-debian does not exist.
modprobe: module ehci-orion not found in modules.dep

I could use ubuntu live to chroot into the system instead of debian rescue mode and finish the installation steps, apart from actually setting the root for grub.

As far as I can tell it seems to be an issue with grub not using mdadm correctly or at all. So I need to edit initramfs to inklude mdadm somehow, right? But how does that work? I have succesfully mounted the initramfs using like this guide from ducea.com. But how would I continue?

# All work is done in a temporary directory
mkdir /tmp/initrdmount
# Copy the image, uncompress it
cp /boot/initrd.img-2.6.15-1-686-smp /tmp/initrd.img.gz
gunzip -v /tmp/initrd.img.gz
# Extract the content of the cpio archive
cd /tmp/initrdmount
cpio -i < /tmp/initrd.img

EDIT: I'll add some info gathered from the initramfs shell as well:

# this depends ofc on whether I use dmraid or mdadm for kernel boot
(initramfs) cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-3.16.0.4-amd64 root=/dev/mapper/VG0-debian ro {dmraid/mdadm}=true  
(initramfs) cat /proc/mdstat # returns nothing
(initramfs) cat /etc/mdadm/mdadm.conf
    ARRAY metadata=imsm UUID=xxxx:xxxx:xxxx:xxxx
    ARRAY /dev/md/isw_dagfijbabd_RAID0SYS container=xxxxxxxxxxxxxxxx member=0 UUID=xxxxxx:xxxxxx:xxxxxx:xxxxxx
    ARRAY /dev/md/isw_dagfijbabd_RAID0RST container=xxxxxxxxxxxxxxxx member=1 UUID=xxxxxx:xxxxxx:xxxxxx:xxxxxx
(initramfs) ls /dev/mapper/
    control isw_dagfijbabd_RAID0RST isw_dagfijbabd_RAID0SYS
(initramfs) lvm pvs    # returns nothing

This output was practically the same whether I used dmraid or mdadm in kernel boot line. I realized that I could find mdadm in /sbin either way and that the RAID0 disk isw_dagfijbabd_RAID0SYS / dm-0 is detected but not it's content.

I'm wondering if there is some interference with dmraid and mdadm. Should I remove dmraid from initramfs?

  • The thing I find odd, is that if I run a grub command line and try grub> ls I find the (lvm/VG0-debian) volume. And I confirm it contains the usual stuff with grub> ls (lvm/VG0-debian)/. I can even use grub> set root=(lvm/VG0-debian) without error. But if I try grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/ and hit tab it can't find the mapper folder or any of the usual dm-x volumes or any logical volumes. – mmFooD Jan 28 '17 at 14:18
0

I finally found out a way to do this but not using fakeraid (sataraid) and RAID0. Instead I disabled the bios raid and set it to AHCI.

I then used Ubuntu live to erase the drives and created an empty partition for windows followed by one for swap in the first disk. I used gparted to do this because it was always complaining about windows GPT-table. I then installed windows as usual.

Then I used LVM partitioning in the linux installer to create two physical volumes (PV), one in the remaining space on the drive where I placed windows and the other taking up the whole space of the second drive. I then created one single volume group (VG) containing both these physical volumes. Then I could use LV's to create the partitions I wanted.

I did it like this

              HDD 1                             HDD 2
================================   ===============================
||  Windows   | Swap |  PV 1  ||   ||            PV 2           ||
|| (boot/EFI) |      |        ||   ||                           ||
================================   ===============================
                          |                      |
                          V                      V
                ------------------------------------------------
               |                 Volume Group 0                 |
                ------------------------------------------------
                    |          |             |              |
                    V          V             V              V
                --------   --------   ---------------   --------
               |   Lv1  | |   Lv2  | |       LV3     | |        |
               | Fedora | | Debian | |      Home     | | Unused |
               |  20 GB | |  20 GB | |     ~100 GB   | |        |
                --------   --------   ---------------   -------- 

I am no expert in these things and I have no clue about how this will affect performance vs RADI0. But it serves the same function without interfering with windows at all. The LVM partitions is detected by default by at least Fedora, Debian and Ubuntu installers and GRUB worked out of the box.

I don't know if this is common knowledge and I was just late to the party (but I have still not revieved even one comment on either forum so maybe not so obvoius). Anyway I just wanted to share this to anyone having the same difficulties I had with this. I would strongly recommend this setup instead of spending countless hours trying to figure out fakeraid dualboot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.