• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Putting /boot on USB key

Red Squirrel

No Lifer
May 24, 2003
70,592
13,808
126
www.anyf.ca
Is it possible to put /boot on a 1Gig USB stick and rest of OS on a raid 5 setup? I was thinking it would be pretty cool to do that as it would probably be faster to boot, and give an extra sata port so I don't need to have a non raid hard drive. What about a SD card or something like that? Has it been done?
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Originally posted by: RedSquirrel
Is it possible to put /boot on a 1Gig USB stick and rest of OS on a raid 5 setup? I was thinking it would be pretty cool to do that as it would probably be faster to boot, and give an extra sata port so I don't need to have a non raid hard drive. What about a SD card or something like that? Has it been done?

Do you know how unbelievably slow that would be? USB would be slow enough, but SD Card - jeez that is borderline insanity to suggest ;)

Not only that, if you ever removed your boot USB Key your system would hang and ask for a system disk since there would be no MBR on the main HDD.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Sure it's possible, you'd probably have to put GRUB on the thing manually if you want to actually boot from it but it would work as long as your BIOS supported booting from it.
 

BlueAcolyte

Platinum Member
Nov 19, 2007
2,793
2
0
I suppose it would work, is there a particular reason for this?

Also, yes you will need the USB (or one with the same GRUB) plugged into the SAME SPOT.
 

Red Squirrel

No Lifer
May 24, 2003
70,592
13,808
126
www.anyf.ca
Only reason I had in mind was because usb sticks are super cheap now, and figured it would be faster but guess it would actually be slower. That and it would also remove the need of taking up a Sata port for the boot drive, so that way I could just make a bigger raid. Or is there a way to raid even the boot drive? (md raid)
 

Red Squirrel

No Lifer
May 24, 2003
70,592
13,808
126
www.anyf.ca
How can the kernel read the md info if it can't read the file system? It needs the md info so it can build the raid file system, or is there something I may be missing?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Only reason I had in mind was because usb sticks are super cheap now, and figured it would be faster but guess it would actually be slower.

It wouldn't be much slower if it was, the only things on there are GRUB, the kernel and initramfs which are all pretty small and completely loaded at the beginning of the boot process.

Or is there a way to raid even the boot drive? (md raid)

Mirroring works fine because it's just the same data on both volumes.

Can't /boot be on Raid 5?

Not software RAID5, GRUB would need to know how to read md RAID5 in order to find it's config file, kernels, etc.

How can the kernel read the md info if it can't read the file system? It needs the md info so it can build the raid file system, or is there something I may be missing?

The problem is GRUB, not the kernel.
 

Red Squirrel

No Lifer
May 24, 2003
70,592
13,808
126
www.anyf.ca
But dosn't the kernel still have to load before the md devices are setup? or does grub actually do that as well?

And even in a mirror, arn't the drives still in a different format? Or are they still bootable at that point?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
But dosn't the kernel still have to load before the md devices are setup? or does grub actually do that as well?

Yea but the kernel is a single file and any modules are stored in the initramfs which is also loaded by GRUB so as long as your initramfs is setup properly it should be fine.

And even in a mirror, arn't the drives still in a different format? Or are they still bootable at that point?

I believe the RAID information is stored at the end of the device, not 100% sure though, so with a mirror there's no difference to the BIOS or bootloader.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
I do not think booting would be all that slow. The kernel is very small as is grub. Once they are in memory the rest is cake. My system doesn't even mount the boot partition after the system is booted. So I think it would work well. If you used dm-crypt on the hard drives, you would technically be able to pull that usb key out and have a very secure un-usable system.