You are not logged in.

#1 2012-07-23 22:42:08

saabzero
Member
Registered: 2012-07-23
Posts: 5

grub on dmraid, always the same error!

Hi there!
I'm quite new to the archlinux community. Ive set up my laptop with archlinux and i love the concept!

Today i wanted to install arch on my desktop computer which runs with software (fake) raid. everything went quite smoothly, i managed to install the base system without any major problem. But i'm stuck now. I tried to install the grub bootloader but it seems like there is no way to install it. i always get the following error message when i try to install the bootloader on my hard drive with the command "grub-install /dev/mapper/sil_ahbidhaccdcb":

"Path '/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting."

And thats it. I tried a ton of things i read on the internet but nothing seems to work. I found the following script to give you guys additional information:

http://pastebin.com/ZJTWGGp0

My raid setup is striping. (raid0)

I would be very thankful for every tip you can give smile !


(sry if the english is not perfect)

Offline

#2 2012-07-23 22:57:36

gnux83
Member
Registered: 2012-06-02
Posts: 19

Re: grub on dmraid, always the same error!

Hi,

I once installed the old GRUB on a RAID-1. The system was also running a RAID-5, but it was not possibly to install GRUB on the RAID-5...

So, why not just create a boot partition (e.g. 100MB)?

regards,
gnux

Offline

#3 2012-07-24 18:27:31

saabzero
Member
Registered: 2012-07-23
Posts: 5

Re: grub on dmraid, always the same error!

hello there!

Thanks for the really quick response!

i figured out a way to install archlinux un my sil3132 software-raid-0 controller. as you said i have now a small separate boot partition, where grub-install did install.

Thanks!

Offline

#4 2012-07-25 07:38:24

gnux83
Member
Registered: 2012-06-02
Posts: 19

Re: grub on dmraid, always the same error!

Hi,

nice to hear... pls mark your post as solved

regards

Offline

#5 2012-08-18 10:45:35

gondsman
Member
Registered: 2009-07-27
Posts: 85

Re: grub on dmraid, always the same error!

This is not a solution if you cannot use a separate /boot partition to dual boot. I would advice you to try syslinux instead of grub. The configuration is WAY simpler and it works perfectly with my dmraid. Now back to try to make systemd play nicely with the array...

Offline

#6 2012-08-18 15:52:32

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: grub on dmraid, always the same error!

Perhaps my post in INSTALLATION will outline the how-to I used to run raid0 bootable with grub2-bios.

Title:Raid0 grub2 bootable partitioned install(success!)

Best to you.......


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#7 2012-08-21 18:37:03

Thiago H
Member
Registered: 2010-06-05
Posts: 16

Re: grub on dmraid, always the same error!

I had the same problem with my Intel controller:

00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode]

After some extensive googling, I found out that the wiki instructions for installing with dmraid (at https://wiki.archlinux.org/index.php/Fakeraid ) are deprecated: dmraid is no longer updated upstream, and now mdadm manages FakeRAID devices as well, and is more P&P.

So, I booted up the newest install media, and checked with:

# cat /proc/mdstat
md126 : active raid0 sda[1] sdb[0]
      1953519616 blocks super external:/md127/0 128k chunks
      
md127 : inactive sda[1](S) sdb[0](S)
      5288 blocks super external:imsm
       
unused devices: <none>

Everything was already activated by udev!! O.o
mdadm creates partitions under /dev/md<device_number>p<partition_number>

In my case:

$ ls /dev/ | grep md
md
md126
md126p1
md126p2
md126p3
md127

If your setup doesn't gets everything up and running automagically with udev, you can always try a manual scan:

# modprobe dm_mod
# mdadm --assemble --scan

After your device gets recognized, grub installs smoothly. Remember adding "dm_mod" to the MODULES array, and "mdadm_udev" to the HOOKS array (after "sata", before "filesystems") on /etc/mkinitcpio.conf, and regenerating the image with "mkinitcpio -p linux".

Hope it was helpful.

Offline

#8 2012-08-21 19:45:38

gondsman
Member
Registered: 2009-07-27
Posts: 85

Re: grub on dmraid, always the same error!

Thiago, this can be very helpful indeed. I checked with the latest arch iso and it detects the device as /dev/md126 automatically and I can mount it without any issue. I tried changing mkinitcpio.conf putting mdadm_udev instead of dmraid (dm_mod was already in the MODULES array) and running mkinitcpio again. At this point I changed the bootloader to run the image with root = /dev/md126p5 (root is on the 5th partition), but the kernel doesn't boot, as it cannot find the /dev/md126p5 device. Any suggestion? Thanks a lot!

Offline

#9 2012-08-21 20:06:59

Thiago H
Member
Registered: 2010-06-05
Posts: 16

Re: grub on dmraid, always the same error!

gondsman wrote:

Thiago, this can be very helpful indeed. I checked with the latest arch iso and it detects the device as /dev/md126 automatically and I can mount it without any issue. I tried changing mkinitcpio.conf putting mdadm_udev instead of dmraid (dm_mod was already in the MODULES array) and running mkinitcpio again. At this point I changed the bootloader to run the image with root = /dev/md126p5 (root is on the 5th partition), but the kernel doesn't boot, as it cannot find the /dev/md126p5 device. Any suggestion? Thanks a lot!

Try recapitulating so you verify that you haven't missed anything.

Assuming that you are installing to partition X on a BIOS system:

1) Format /dev/md126pX
2) Mount /dev/md126pX under /mnt

3) Install base, base-devel, mdadm and grub2-bios with pacstrap:

# pacstrap /mnt base base-devel mdadm grub2-bios

4) Generate the fstab:

# genfstab -p /mnt >> /mnt/etc/fstab

5) Verify that generated fstab is correct using any editor of your preference

6) chroot to /mnt using the provided script

# arch-chroot /mnt

7) Configure everything, special atention to the /etc/mkinitcpio.conf

EDIT> Forgot to mention that you must set grub to load it's "raid" module. My mistake, sorry sad
On the file /etc/default/grub, locate GRUB_PRELOAD_MODULES, and add the "raid" module:

GRUB_PRELOAD_MODULES="part_gpt part_msdos raid"

8) Run

# mkinitcpio -p linux
# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install --target=i386-pc --recheck /dev/md126

9) Define a root password using passwd
10) Reboot

Last edited by Thiago H (2012-08-21 20:24:18)

Offline

#10 2012-08-21 21:22:04

gondsman
Member
Registered: 2009-07-27
Posts: 85

Re: grub on dmraid, always the same error!

Ok, thanks for the explanation. I'm trying to switch from dmraid to mdadm on an already installed system, so I skipped some parts. I just changed my fstab, chrooted, re-ran mkinitcpio and installed grub. After doing so, the kernel doesn't boot, complaining it cannot mount /dev/md126p5 correctly (something along the line of "wrong filesystem, wrong options or missing tools"). Any idea?

Offline

#11 2012-08-22 02:05:53

Thiago H
Member
Registered: 2010-06-05
Posts: 16

Re: grub on dmraid, always the same error!

gondsman wrote:

Ok, thanks for the explanation. I'm trying to switch from dmraid to mdadm on an already installed system, so I skipped some parts. I just changed my fstab, chrooted, re-ran mkinitcpio and installed grub. After doing so, the kernel doesn't boot, complaining it cannot mount /dev/md126p5 correctly (something along the line of "wrong filesystem, wrong options or missing tools"). Any idea?

I need that you post the content of following files:
    - /etc/mkinitcpio.conf
    - /etc/default/grub
    - /etc/fstab

Plus the output of the following commands (run them from the install media live environment):

# lspci | grep RAID
# lsmod | grep dm
# lsmod | grep md

Offline

#12 2012-08-22 19:30:29

gondsman
Member
Registered: 2009-07-27
Posts: 85

Re: grub on dmraid, always the same error!

Ok, I made some progress. First of all  the things you asked for:

$ lsmod | grep dm
[no valid results, it only greps "hdmi" from a soundcard]

$ lsmod | grep md
md_mod                101427  8 raid1

$ lspci | grep RAID
00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 06)
/etc/mkinitcpio.conf (without comments for brevity):

MODULES="dm_mod"
BINARIES="/sbin/mdmon"
FILES=""
HOOKS="base udev autodetect pata scsi sata mdadm_udev filesystems"
/etc/fstab:

# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

/dev/md126p5  / ext4 defaults 0 1
/dev/md126p6  swap swap defaults 0 0
/dev/md126p7  /home ext4 defaults,user_xattr 0 1

I'm using syslinux at the moment, so I can't post the grub configuration. I can tell you that the root fs is set as /dev/md126p5 in the kernel parameters.

The system now boots fine. Notice how I had to add /sbin/mdmon to the BINARIES line in mkinitcpio.conf, as otherwise the system would only mount the filesystem read-only. When I shutdown the machine, on the other hand, it hangs forever on the "Unmounting Non-API filesystems" line. This is using systemVinit. If I try to use systemd, it cannot mount /home correctly (it times out when it tries to mount it) and it can't boot.

Offline

#13 2012-08-23 12:32:48

Thiago H
Member
Registered: 2010-06-05
Posts: 16

Re: grub on dmraid, always the same error!

gondsman wrote:

Ok, I made some progress. First of all  the things you asked for:
(...)
I'm using syslinux at the moment, so I can't post the grub configuration. I can tell you that the root fs is set as /dev/md126p5 in the kernel parameters.

The system now boots fine. Notice how I had to add /sbin/mdmon to the BINARIES line in mkinitcpio.conf, as otherwise the system would only mount the filesystem read-only. When I shutdown the machine, on the other hand, it hangs forever on the "Unmounting Non-API filesystems" line. This is using systemVinit. If I try to use systemd, it cannot mount /home correctly (it times out when it tries to mount it) and it can't boot.


Try adding "md_mod" and "raid1" to the MODULES array on mkinitcpio.conf.
I'm not used to syslinux configuration, have no idea on how to do it, sorry :'(

One off-topic tip: for perfomance, you could consider adding "relatime" or "noatime" to your / and /home partitions on /etc/fstab https://wiki.archlinux.org/index.php/Fs … me_options

Offline

Board footer

Powered by FluxBB