install on usb drive

Asked by BrianH

I'd like to install Ubuntu Desktop or Server on a new system using software raid.

I have 4 sata disks.
Ideally I'd like a raid1 boot partition across all four at /dev/md1
Then I'd have four 1GB swap partitions, one on each disk.
Then the rest of the space would be for the root partition raid5 across the four disks at /dev/md2.

I've gotten to the point of the installation where it wants to partition the disks, but I don't see any options for setting up software raid. Is it possible to leave the installation and set it up myself in a terminal and then come back into the installation? Will the installer know that the software raid exists? What is the best way to get Ubuntu to install on a software raid setup?

Also, do I need to use Ubuntu server, or can Ubuntu desktop work just as well for a server? I'm planning on using the system mainly as a Mythtv backend and a file server with samba.

Thanks,
Brian

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Pope 🍺🐧🐱 🦄
Solved:
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#1

There is a third way, the alternate CD which has the necessary bits to allow you configure raid devices during the installation. You could also use the server CD.

The following link takes you to a page where you can download the install DVD which contains the alternate CD and the live CD

http://cdimage.ubuntu.com/releases/6.06.1/release.1/

Revision history for this message
Óscar Rodríguez Ríos (ingorr01) said :
#2

Yes, you need the Alternate CD. Text instalation.

Then for the swap you doesnt need raid at all:
in /etc/fstab: (after you have your system running)
/dev/hda1 none swap sw,pri=1 0 0
/dev/sdb1 none swap sw,pri=1 0 0
/dev/sda1 none swap sw,pri=1 0 0
.....
(the key is pri (priority), with all the same pri you have perfomance/functionality like raid0)

For the raid5:
Create a partition with the space least (or with the size you want) and format as linux-raid (or software-raid i don't remember) in each drive. When you create the partition on the 4 drives then create a new raid device (in the raid menu), level raid 5 , chunck (the defaulkt 64Kb is good) and no more i think.

Then exit the raid menu, and reutrns to partition menu. In part. menu you find a new drive (/dev/mdX) than format as xfs or ther FS you like (for big filesystems I recommend you XFS) and mount point /.

That's all, I think.

If you wanna do it a bit better, you can create 3 RAID 5 devices:
1 device for / (30GB or more)
1 device for /home (the size you want, then your personal data are safe in updates/reinstalations...)
1 device for /mountpoint/you/like (to store multimedia files, music , distros and other files you wanna share along all users of the computer)

The inconvenient is that you have to make 12 partitions and 3 RAID devices. If you are the only one user of your computer, at least /home should be a separate RAID 5 and / the other.

I tried (a lot) with multipartions RAID devices but I can't get it done with Ubuntu.

Good luck, ;)
If you achive you delight with the performanfe and reliability of a RAID 5
Performance is astonishing, I have 5 drives in RAID 5 and get more than 120 MB/s in secuential read/write.
Realiability, I have had disk crashes, electrical failures (More time that the SAI can sustain) and nothing disturb my data.

Best regards,
neuromancer
P.D. Excuse my poor English

Revision history for this message
BrianH (bahemr) said :
#3

Ok, So I've finally got the alternate cd to set up my raid partitons. The raid setup menu woudn't work at first, but if I changed something in the existing partitioning, then I could get into the raid menu. To be safe, I deleted all my partitions and set them up clean.

I decided to make the /boot partition on /dev/sda1 and /dev/sdb1 as a raid 1.

The install went smoothly, but then upon reboot, Grub simply gives ERROR 17. I've looked up information on ERROR 17 and most people were seeing this because of updating thier MS Windows on the same machine. Since I'm not running any other OS my problem is different. I've tried to re-install grub to both /dev/sda and /dev/sdb by doing this...

grub> device (hd0) /dev/sda
grub> root (hd0,0)
grub> setup (hd0)
grub> device (hd0) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)

This didn't seem to change anything. Still ERROR 17.
I then decided to see if the menu.lst file was correct, and I was able to get the sda1,sdb1 raid1 started using a live cd and I edited the menu.lst file. I commented out the hide menu line and also changed the wait time from 3 secs to 30 secs. Then I rebooted and still nothing changed, so I am thinking that grub isn't even to the part where it reads the menu.lst file.

I'm running out of ideas. Anyone?

Revision history for this message
BrianH (bahemr) said :
#4

It seems as if my SATA devices are in a different order when booting. I found a "Super Grub disk" that I wrote to a cd. When I boot using that it identifies the disk with the stage 1 on it as hd2. While in Linux grub shows it as hd0 as expected.

To get my computer running I've decided to not use raid1 on my boot partition. I installed Ubuntu again. It still wouldn't boot, so then I manually installed grub to the MBR of all of my disks, and pointed the grub setup (menu.lst) to hd2 instead of hd0. This setup allows the computer to boot properly.

Any ideas why the drives get assigned different hd numbers when booting? All four drives are plugged into the nvidia SATA controller on the MB and raid is disabled in the bios. I don't see any options for boot order among individual hard drives.

Revision history for this message
Óscar Rodríguez Ríos (ingorr01) said :
#5

The boot partition CAN'T be in a RAID device cause grub can't mount a raid before the kernel loads (and the kernel is in the boot part.). You must create a partition (with 256MB or 512MB) for the boot partition (format as ext3, grub doesn't go well with xfs) and can't be a RAID device.

Best regards,
neuromancer

Revision history for this message
Óscar Rodríguez Ríos (ingorr01) said :
#6

If these comments have solved your problem, please consider marking this request as answered. https://wiki.ubuntu.com/SupportRequests contains useful information about managing your support request.

If you are still having problems, let us know and we'll keep working on them.

Best Regards,
neuromancer

Revision history for this message
BrianH (bahemr) said :
#7

Although I find conflicting information on the internet whether a /boot partition can setup on a software raid1, I have given up trying to do this because I have better things to spend my time on.

It may be that other Linux distributions can be setup this way (I found a Gentoo How-to that shows step-by-step how to accomplish this) but maybe Ubuntu simply cannot.

I am going to mark this as resolved. Thank you to everyone who helped me out.

Revision history for this message
Brian K. White (bkw777) said :
#8

It's entirely possible to boot grub from software raid1.
Been doing it for years with suse.

I haven't yet tried it with ubuntu, but just when I was about to check out this ubuntu everyone's talking about, and I go to install, I discover I have to go back and download some whole other cd? just to get mdadm and a different version of the installer? Kinda shoots a hole in all the glitz and the claim that "The installer is also the livecd" Um, no, the livecd is only good as a livecd and to install I have to go get the install cd, just like every other "Joes Burgers and Linux". Further, that install cd isn't even graphical like everyone elses? That is rather the opposite of being more advanced than everyone else. (not that a gui installer is better, merely that it's more difficult to produce and everyone else has done so since years ago)
Heck I boot right into a fully functional (including raid) gui suse installer right from a usb stick, or from nothing at all via PXE.

Back to the topic, All that's needed for grub to handle booting on a completely software raid system is that /boot must be mounted on a raid1 array.
Your whole disk can be raid1, in which case there is nothing special to do. Or you can create identical small partitions on each disk, 20 to 100 megs, I usually use 128megs just in case I want room to do something fancy some day. make those into a small raid1 and mount /boot on that, then make the rest of the space into raid0 or raid5 (or 10) and mount it on /. Write the mbr to all disks even if you know which one your bios will boot from, so that you'll be able to boot the day the normal boot disk fails.

/boot must be mounted on a raid1 array, and /boot must include either a kernel with all the necessary sata or whatever drivers and raid0,1,5 etc built-in, or /boot must contain an initrd that has all the same things in the form of modules.
grub simply doesn't know or care or need to know that it's booting from one disk of a raid1 array.

A step-by-step specifically for ubuntu will have to come later since I've been waiting for the other cd to download while I wrote this, and will be trying it shortly.

Not to seem like an ubuntu-basher,
On a completely other note, installing ubuntu 7.04-ppc on a old 350mhz blue&white mac g3, (with a single hard drive), was _effortless_
Suse 10.2 has a ppc version too, and it was possible to boot the cd and get it installed, but it required going to the text rescue mode and doing very manual things with pdisk in order to set up the special apple hfs boot partition. And took several attempts to figure out just what exactly it is that would make the mac's bios happy and agree to boot. And it required another pc to google up the hints.
The ubuntu ppc disk booted right up and ran perfect, installed to the hd effortlessly. (though, I had already done the special partitioning for suse so possibly ubuntu might have had the same issue)
Pleased to the point of amazement with the ubuntu powerpc experience.
It should be noted however that unfortunately linux cannot claim speed bragging rights. OSX 10.4 installed effortlessly of course, but more importantly, runs significantly faster that either suse or ubuntu on the same hardware. Also, only in osx can you have such things as a working flash plugin.
Navigating the web today in a browser without flash is getting to be almost as bad as trying to get by in lynx.
I still have to try YellowDog there. The latest version looks awesome based on enlightenment 17 etc.

If I go any further off topic I might as well start recommending good restaurants around central jersey. Heh, sorry. :)