0

I'm using the Desktop version of Ubuntu 14.04.1. I started up the liveCD, installed mdadm, and created a RAID 1 array on a 3 TB HD. I then restarted, went directly into the installation menu, and set up a new installation with / and swap on two partitions on the SSD, and /home on the RAID 1 array.

The installer seemed to have no problems with this arrangement, but upon restarting into the new installation, I'm told that "The disk drive /home is not ready yet".

My first thought was that perhaps mdadm wasn't installed on the new system, so it had no way to read the drive, but I can't imagine Ubuntu installer would recognize and install to a RAID array without including the necessary packages to read said array. I'm not sure how to go about diagnosing this - any ideas?

Edit: After discovering that my new installation didn't have mdadm installed on it for whatever reason, I restarted and used the manual recovery mode to get to a root terminal. It seems like it would be possible to install mdadm from here, but I can't get an internet connection to work. I used "ifconfig eth0 up" to activate the ethernet, and tried pinging with and without lo disabled, but can't seem to get a connection to stick.

  • 1
    Do you have an /etc/mdadm/mdadm.conf file? if so please add its contents to your question – steeldriver Sep 13 '14 at 22:01
  • I booted into recovery mode, and had it toss me out into a root terminal. It doesn't appear that my /etc/ folder has an mdadm folder in it at all. Perhaps my first hunch was correct? I tried to install mdadm from the root terminal ("apt-get install mdadm"), but it returned an error - the gist of which was "unable to write to /var/cache/apt" If installing mdadm explicitly into the new installation is necessary, what's the best way to get into an environment where that's possible? – Brian Bauman Sep 13 '14 at 22:09
2

First, make sure that the mdadm package is present in the installed system (not just the live system) using apt-get install mdadm. I will assume you are doing this from a root shell, either via recovery mode or for example by invoking sudo -i, and hence none of the following commands are prefaced with an explicit sudo. If you are doing this from recovery mode, you will need to remount the root filesystem in read-write mode first i.e.

mount -o remount,rw /

You will also need a working internet connection if the package has not already been downloaded into the cache - if you have a wired ethernet connection to a router that's running a full DHCP connection, that should be possible by running

ifconfig eth0 up

dhclient -v eth0

Alternatively, you can try exiting back to the recovery mode menu and choosing 'Enable networking' - which should have the side effect of remounting in rw mode as well. Then

apt-get install mdadm

That should create a default /etc/mdadm/mdadm.conf file, however in order for the system to assemble the array on boot, you need to append the details of your new array to that file

mdadm --detail --scan >> /etc/mdadm/mdadm.conf

It may also be necessary to write the array details to the initial ramdisk using

update-initramfs -u

(I think that's only strictly required if you want to boot from a RAID device, but it won't do any harm).

  • I put an edit in the OP that appears to be starting down the same path. I'll see if your manual mount technique allows me to get an external connection so I can download mdadm. – Brian Bauman Sep 13 '14 at 22:41
  • 1
    You will probably need to configure the eth0 interface (to get a valid IP address and DNS configuration) - if your router runs a full DHCP server that should be as simple as running dhclient -v eth0. Another option is to try the Enable networking recovery mode menu item instead of dropping to a root shell straight away. – steeldriver Sep 13 '14 at 22:46
  • That definitely fixed the ethernet issue. Installing mdadm - will report back with final results. – Brian Bauman Sep 13 '14 at 22:48
  • This was the solution! For some reason, an Ubuntu installation that relies on a pre-built RAID array will not install mdadm automatically. It is necessary to: 1. Get into the root terminal of the new installation. 2. Remount the root file system. 3. Activate ethernet and configure an external connection. 4. Install mdadm. 5. Update the mdadm configuration file with a scan of the current RAID arrays. 6. Update the boot drive with RAID information (possibly optional). Thanks for all the help! – Brian Bauman Sep 13 '14 at 22:56
  • Also - fair warning, it required two restarts after updating the mdadm configuration before it "took". – Brian Bauman Sep 13 '14 at 23:02

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.