[Bug 1028677] Re: mdadm should be used for fakeraid (instead of dmraid)

John Center jlcenter at comcast.net
Wed Dec 23 23:27:58 UTC 2015


Here are a set of notes I made for myself because I did this often
enough I didn't want to forget.  I hope this helps.

    -John

New procedure for using Ubuntu Desktop installer (until they fix it)
--------------------------------------------------------------------

1)  Launch UEFI setup at startup:

	* Disable Legacy BIOS
	* Turn on RAID & SMART

2)  Boot Ubuntu CD:

        1) Pick "Try Ubuntu" & edit kernel command line.

        2) Add "nodmraid" to kernel line to prevent dmraid from
assembling the disks.

        3) Hit F10 to start session.


3)  Start 2 terminals & increase scrolling buffer.

4)  sudo to root in one of the windows.

5)  Do the following before starting installation:

        1) apt-get purge dmraid

        2) apt-get install mdadm

        3) mdadm --assemble --scan --verbose

6)  Partition the raid drive:

        1) gdisk /dev/md126

	1G EFI partition (EF00)
	1T EXT4 partition (FD00) <-- change md126p2 to type FD00
	128G swap partition (8200)
	600G NTFS partition (0700)

7)  Do the following before starting installation:

        1) apt-get install grub-efi-amd64

	2) apt-get update
	   apt-get upgrade

8)  Run installer until it fails on bootloader.

9)  Mount & chroot raid disk:

        1) mkdir /target  (if not still mounted)

        2) mount /dev/md126p2 /target

        3) mount /dev/md126p1 /target/boot/efi

        4) for i in /dev /dev/pts /proc /sys /run; do mount -B $i
/target$i; done

        5) chroot /target

10) Do the following again on the chroot volume:

	apt-get purge dmraid
	apt-get install mdadm
	apt-get install grub-efi-amd64
	apt-get update
	apt-get upgrade

11) Run grub-install to fix the bootloader:

        * grub-install --boot-directory=/boot --bootloader-id=ubuntu
--target=x86_64-efi --efi-directory=/boot/efi --recheck
[--verbose|--debug] /dev/md126

12) Unmount the raid disk:

        * for i in /dev /dev/pts /proc /sys /run; do umount /target$i;
done

	* umount /target/boot/efi
	  umount /target/boot

13) Find all the places that may try to stop mdadm/mdmon from starting &
disable them:

	* find /etc -name "*" -type f -exec grep 'nomdmonisw' {} \; -print
	* find /lib -name "*" -type f -exec grep 'nomdmonisw' {} \; -print
	* find /usr -name "*" -type f -exec grep 'nomdmonisw' {} \; -print

        * Comment out dmraid2mdadm.cfg at /etc/default/grub.d/

14) Fix up the mdadm configuration:

	* cp /lib/udev/rules.d/63-md-raid-arrays.rules /etc/udev/rules.d/
	* cp /lib/udev/rules.d/64-md-raid-assembly.rules /etc/udev/rules.d/
	* cp /usr/share/initramfs-tools/hooks/mdadm /etc/initramfs-tools/hooks/
	* cp /usr/share/initramfs-tools/scripts/mdadm-functions /etc/initramfs-tools/scripts/
	* Edit rules if need be.

        * See mdadm.patch file from bug# 1320402 & fix up files.

        * Create /etc/initramfs-tools/conf.d/mdadm:

	##  mdadm boot_degraded configuration
	##
	BOOT_DEGRADED=true

        * Create /boot/efi/EFI/ubuntu/grub.cfg:

	search.fs_uuid 9b5a6959-7df1-4455-a643-d369487d24aa root
	set prefix=($root)'/@/boot/grub'
	configfile $prefix/grub.cfg

        * update-grub

15) reboot

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debian-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1028677

Title:
  mdadm should be used for fakeraid (instead of dmraid)

Status in debian-installer package in Ubuntu:
  Invalid
Status in mdadm package in Ubuntu:
  Invalid
Status in partman-md package in Ubuntu:
  Confirmed
Status in ubiquity package in Ubuntu:
  Invalid

Bug description:
  mdadm now support external metadata and can hadle fakeraid better than dmraid:
  https://raid.wiki.kernel.org/index.php/RAID_setup#External_Metadata
  http://download.intel.com/design/intarch/PAPERS/326024.pdf

  It seems that dmraid is no more developed (only maintenance), so
  ubuntu should use mdadm instead of dmraid for fakeraid.

  Actually, it's not possible to setup a new ubuntu install with mdadm
  fakeraid (tried 12.04 and 12.10 alpha 2 alternate cd): only dmraid is
  offered.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: mdadm (not installed)
  ProcVersionSignature: Ubuntu 3.0.0-23.39-generic 3.0.36
  Uname: Linux 3.0.0-23-generic i686
  NonfreeKernelModules: nvidia
  ApportVersion: 1.23-0ubuntu4
  Architecture: i386
  Date: Wed Jul 25 00:45:56 2012
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111011)
  ProcEnviron:
   LANGUAGE=en_US:en
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: mdadm
  UpgradeStatus: Upgraded to oneiric on 2012-07-07 (17 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1028677/+subscriptions



More information about the foundations-bugs mailing list