[PLUG] Mounting RAID partition with live CD

Quentin Hartman qhartman at gmail.com
Mon Apr 30 02:42:23 UTC 2007


On 4/29/07, John Jason Jordan <johnxj at comcast.net> wrote:
>
> My new desktop has two 320 GB drives. I set up three RAID 1 partitions,
> two when I installed Etch amd64 from the Alternate CD and one more when
> I installed Feisty, leaving 249 GB as free space in which to store
> backups. Currently md0 is swap, md1 is Feisty, md3 has an aborted
> version of Etch and I will just leave it there in case I want to
> install a trial version of something else some day. All was well,
> except I wanted to create the backup storage partition as RAID 1 also
> (249 GB). I have asked and searched everywhere for a tool that can
> create partitions and set up a Linux software RAID 1, but have come up
> empty. Gparted can see RAID partitions, but cannot create or delete
> them.


Generally in this case, you need to create them by hand. The tool to do this
with by default in Ubuntu is "mdadm". doing a "man mdadm" will give you the
gory details, and there are numerous tutorials online that can give concrete
examples. Most new-ish software raid howto's should talk about mdadm at some
point.

So today I decided the only way to create the new partition was with an
> install CD. I used the Feisty amd64 Alternate CD. It refused to set up
> the partition unless I gave it a mount point, so I did. After it
> formatted the new 249 GB RAID 1 partition with ext3 I aborted the
> installation. But when I rebooted I discovered that it had messed up
> something on md1 -- got an intramfs prompt with the error message that
> it couldn't find tty. Note that is is not a command line; Linux did not
> finish booting, so all the intramfs prompt gives me is a very limited
> list of commands.


It sounds like the bootloader is able to load the kernel, but the kernel
can't see the root partition. I have seen this before when the initramfs for
the kernel you are running does not have the proper raid configuration
and/or tools on it. Given your description of your installation and the
process you went through either is possible. One way to solve this is to
chroot into your installation and fix it from there:

1- Boot an Ubuntu Live CD
2- Get your root partition mounted somewhere (say, /mnt/my_root)
3- mount your boot partition in the appropriate place (say,
/mnt/my_root/boot)
4- mount /proc and /dev in an appropriate place ("mount -o bind /dev
/mnt/my_root/dev" and "mount proc proc /mnt/my_root/proc")
5- change root (chroot) into your installation ( "chroot /mnt/my_root
/bin/bash")
6- issue the command that updates the initramfs ("sudo update-initramfs")
7- hit ctrl-d to get out the chroot environment and then unmount and reboot
the system.
8- Get a tasty beverage and enjoy your freshly fixed system.

Hopefully this helps. If you have problems, the Gentoo installation
documents are a good resource for this kind of thing. Check them out and
refer to the sections that talk about "chrooting into the install
environment" or something similar. Oh, and double-check my syntax in the
above commands, I'm just pulling them from memory...

-- 
-Regards-

-Quentin Hartman-



More information about the PLUG mailing list