things i want to remember, things i want to share

Développeur Python et adepte Linux depuis 2005, Core développeur Kivy, passionné par beaucoup trop de choses.
Profil Github gpg signature bitcoin address

Entries tagged “raid”

Install ubuntu desktop on software raid

written by tshirtman, on 5/4/14 1:55 PM.

Being a bit naive about raid systems, i had to look up a bit at how to reinstall my ubuntu system on a raid1 on my two new SSDs.

Googling reveal much confusion and not very up to date information, so i ended up learning a bit about mdadm and the installer.

So here are the simple^W steps i followed.

  1. boot on your live cd/usb, chose “try ubuntu without installing”

  2. when booted up, fire a terminal, and install mdadm

    sudo apt-get install mdadm
  3. if you already have your raid devices created, assemble them

    sudo mdadm --assemble /dev/md0

    (repeat and adjust for each device)

    If you, as me, though it was a good idea to have a swap raid device (raid0 :3), be sure to swapoff the two partitions before trying to assemble the device, for me it was:

    sudo swapoff /dev/sda2
    sudo swapoff /dev/sdb2
    sudo mdadm --assemble /dev/md1
  4. if you need to create the devices, use mdadm too

    sudo mdadm --create --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1

    (repeat and adjust for each device, level 1 is mirroring)

  5. start the installer, at the partition step, select “do something else” and be careful that no partition used by a device is directly mounted (including swap ones, that are automatically mounted, use “no dot use this partition” on them, they should be switch type from “swap” to “linux-swap”).

  6. select your mdXpY and other partitions just like you would use /dev/sdXY partitions.

  7. don’t forget to select the correct boot device (grub install).

    Install should happen cleanly.

  8. After the install is complete, you still need to make your system, able to work with raid, as mdadm is not installed by default, it won’t boot currently, so when the install is complete, select “continue testing”, then chroot to the installed system.

    cd /media/ubuntu/*/
    sudo mount -o bind /proc proc
    sudo mount -o bind /sys sys
    sudo mount -o bind /dev dev
    sudo chroot .
    sudo apt-get install mdadm

    if you have issues with network, try to copy /etc/resolv.conf from the host system

    sudo cp /etc/resolv.conf etc/
  9. Still in the chroot, reinstall and update grub

    sudo grub-install /dev/sda
    sudo update-grub
  10. You can now leave the chroot and reboot to your new system.

    sudo reboot

And voilà! You should have a bootable software-raid ubuntu desktop install.

Now, really, this should be much simpler, i really don’t see any reason that the desktop install image doesn’t have the raid configuration options in the partition choices, and is not aware enought to fix all these little annoyances.


#FIXME 3G absurd ad_sense alterway aléatoire android animation anonymity atheism bach backlog bash bitcoins blog blogging boldness book books boulot bricolage bépo C canvas captcha captures carte SD censure christianity chroot CI CLI cli cloudwatt code colors comfort zone command line community company life conferences contest copwatch copwatchnord-idf core-devs cours ct705 culture deb debian debug deformation dehors dessin dev distribute distribution docker débutant déploiement développement ebooks eeepad eeepc effect ego empty en escher event firefly flappy bird flask fosdem foss fr fun game garden gdb geek culture git github goals graphics grrr gödel hack hackathon hacked hacking health hooks i3 images IMAP inspirational install isync java jenkins jeu jeu video jinja2 jni keyboard keynav kivy kv lame learning lib libre life linux lol macosx magnet mail mailing-list mails maths mbsync meetings memory leak mesh meta mint mirroir MIT module motivational mouse museomix mutt nexus7 no-mouse notmuch nottoomuch offlineimap onycroit opencourseware osc packaging paris passphrase password patch pentacatyl people perte de données ping pip planning plugin positioning pr procrastination programmation progress project projet property proudhon proxy psf publisher/consumer pull-down pygame pyjnius pypi python pythonar qtile raid rapsberry pi reading recorder references release religion responsive review reviews réseau réseaux sociaux résurection salon screenshots script self service shows shutil shyness sizing solib sortie sousous!!! spam spritz stash status systeme système templating terminal texture texture coordinates Thomas Paine thread thème tiling time time management. tip tips tools transformer tutorial tv twitter typematrix typing ubuntu ubuntu-fr ultimate-smash-friends unity update upload images useless usf utils value VDM video vie/mort vim virtualenv visite widget windows wm wmii work workflow workflow. zine études