You are not logged in.

#1 2012-04-02 21:57:26

cedricmc
Member
From: Madrid, Spain
Registered: 2011-11-20
Posts: 53

[Help Needed] HowTo install ArchLinux on a RAID5 with Grub2

Hi archers! Some months ago, I tried to install ArchLinux on my system. Due to a non-standard configuration and a lack of compatible installation media, I failed on my many attempts. Nonetheless, the errors and seek of answers have gotten me to an almost working installation, although I got stuck. So here I am seeking now for your help and knowledge. What must frustrates me is that Fedora 16 succeeds to install properly in this same system (grub conf is "copied" from here) and I am not able to do so with ArchLinux.

Some reasons have driven me to write this help request in a MiniHowTo format, mainly:

I will first briefly describe my system configuration, then my installation procedure and finally present my problem.

I have a RAID5 (Intel ICH9R) with 3 identical drives mapped to /dev/md126. The partitions (MBR) are

/dev/md126p1     /boot (ext2)
/dev/md126p2     /  (ext4)
/dev/md126p3     /home (ext4)
/dev/md126p4     Win7

My system is BIOS based (non UEFI). The goal is to install ArchLinux on this RAID5 with Grub2 on /dev/md126.

Note: This configuration is not a hardware nor a software RAID, but fake RAID. I personally find the naming inadecuate since fake RAID is still a RAID while the fake adjective seems to indicate otherwise.

The installation begins downloading a recent snapshot of ArchLinux since the official stable one does not work properly with some RAID configurations. Configure your RAID through the chipset utility and boot the machine with the downloaded image. Proceed with a regular installation. Be aware that the package installation will probably fail due to changes in pacman's signature system. To override this, edit /tmp/pacman.conf on an other terminal (Alt+F2) and add this to the "[options]" section (as described here:

[options]
(...)
SigLevel = Never

Also, at the system file edition step, modify mkinitcpio.conf according to this

MODULES = "raid456"
HOOKS = "(...) mdadm_udev"

The bootloader installation step may be safely skipped since Grub Legacy does not support RAID5 and the goal is to install Grub2.

We continue with the installation of Grub2 (to read the Grub2 wiki page is recommended). To this end, we will have to chroot to the new system. Note that, at this moment, your new filesystem should be already mounted at /mnt (if not, do so).

# cp /etc/resolv.conf /mnt/etc
# mount -o bind /dev /mnt/dev
# mount -t proc /proc /mnt/proc
# mount -t sysfs /sys /mnt/sys
# chroot /mnt bash

Install Grub2 (removing Grub Legacy):

# pacman -Sy grub2-bios

Now that all the needed software is on the system, we will configure properly mdadm and Grub2 (different wikis are recommended RAID, softRAID and fakeRAID and also this thread).

# mdadm --examine --scan >> /etc/mdadm.conf

Take note of the two UUIDs added by mdadm to the conf file since we will need them later (the container and the proper array).

output of mdadm --examine --scan

As the initramfs should have an updated copy of /etc/mdadm.conf, it must be regenerated (read mkinitcpio's wiki for more details).

# mkinitcpio -p linux

Finally, we setup Grub2 (read Grub2's wiki for more details). Edit /etc/default/grub and add the previous UUIDs

GRUB_CMDLINE_LINUX = "(...) rd.md.uuid=MD_UUID1 rd.md.uuid=MD_UUID2"

Regenerate the Grub's configuration file

# grub2-mkconfig -o /boot/grub/grub.cfg

Install Grub2 into the master boot record

# grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/md126

Reboot

The problem
The system fails to boot properly. It seems that the filesystems are mounted read only at initramfs time and cannot be remounted later. I have really no clue of what to do here. What follows is the output just after the messages from Grub2 and vmlinuz/initramfs loading.

fsck.ext4: Operation not permitted while trying to open /dev/md126p2
You must have r/w access to the filesystem or be root
ERROR: fsck failed on '/dev/md126p2'
INIT: version 2.88 booting

 > Arch Linux

 > http://www.archlinux.org

   ------------------------------
:: Adjusting system time and setting kernel timezone        [DONE]
:: Starting UDev Daemon                                     [DONE]
:: Triggering UDev uevents                                  [DONE]
:: Waiting for UDev uevents to be processed                 [DONE]
:: Bringing up loopback interface                           [DONE]
:: Unlocking encrypted volumes:                             [BUSY]
:: Checking Filesystems                                     [FAIL]
fsck.ext4: Operation not permitted while trying to open /dev/md126p2
You must have r/w access to the filesystem or be root

***************  FILESYSTEM CHECK FAILED  ******************
*                                                          *
*  Please repair manually and reboot. Note that the root   *
*  file system is currently mounted read-only. To remount  *
*  it read-write type: mount -o remount,rw /               *
*  When you exit the maintenace shell the system will      *
*  reboot automatically.                                   *
*                                                          *
************************************************************

Give root password for maintenance
(or type Control-D to continue): _

Thanks in advance!

Last edited by cedricmc (2012-04-04 21:13:08)

Offline

#2 2012-04-05 13:23:45

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [Help Needed] HowTo install ArchLinux on a RAID5 with Grub2

I think that the message below (from your post) might be a clue...

:: Unlocking encrypted volumes:                             [BUSY]

It shows that decryption is still busy and therefore not completed. You may not have encryption set up correctly and your volumes are not ready.

Offline

Board footer

Powered by FluxBB