[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: howto install Debian on software RAID1 when UEFI?



On Sun, Nov 13, 2022 at 05:29:17PM +0100, hw wrote:
> On Sun, 2022-11-13 at 14:32 +0000, Andrew M.A. Cater wrote:
> > On Sun, Nov 13, 2022 at 02:49:28PM +0100, hw wrote:
> > > 
> > > Hi,
> > > 
> > > the Debian installer is horrible.  It won't let me install on software RAID1
> > > on
> > > a server with an UEFI BIOS.  I can't find any good guide about that, either.
> > > 
> > 
> > Hi hw
> > 
> > You might want to *start* with using the expert install - found under the 
> > advanced menu option. That will give you more control, including advanced
> > partitioning.
> 
> That's where I kept ending up.  I didn't want that, it needs to be easy to
> install on software RAID.  Not everyone has hardware RAID to boot from.
> 

And that's why I suggested the advanced partitioning. I only have software
RAID - as do most people now.

I'm about to try this on a VM with two disks. I'm going to initially partition
as if I were using LVM and all in one partition on one disk, then on the other.
That should give me identically sized partitions.

At that point, I'll change the type on the LVM partitions to RAID, and use
use the RAID partitioner to make a RAID1 device.

After that, I'll use one of the ESP partitons and tell the partitioner
to install all in one partition on the RAID device.

[I'm fairly sure Fedora also installs LVM by default as it makes it a lot
easier to resize partitions if necessary when adding more storage.]
I'll then change the type of the partition installed to btrfs.

That should give me EFI - RAID - swap on each of two disks.
The RAID should be RAID1 and will be mounted as /

> > > I want root on brtfs with RAID1.  How do I get Debian installed?
> > 
> > I'd suggest that you partition one disk with "all files in one partition"
> > as a test run to see the sizes you'll need and then rerun the partitioner.
> 
> Yeah that failed.  The installer was unable to install grub, then it was unable
> to mount /boot/efi ...  It's not working right at all.
> 

Let me run through the process: I'm reformatting a spare machine so that its
running Stable then I'll run through in a KVM/QEMU machine with virt-manager.

> > > From memory, I think you end up with something like an EFI partition of
> > > 512M,
> > a root partition of (the rest - 1G) and then a 1G swap.
> > 
> > If you partition both disks to have an EFI partition at the beginning, then
> > a RAID partition, then 2 x 1G swap at the end.
> 
> Yeah that's what I tried.
> 
> > Then use the RAID manager to set up RAID1 and LVM over the top.
> 
> There's no way that I would use LVM.  That's yet another layer of complexitiy
> with no advantages whatsoever and a nightmare to deal with.  I used it once and
> I'll never do that again.
> 
> >  I'm unsure how
> > you would install GRUB to the second disk of the RAID - it might be that you'd
> > need to restart once the install is complete, use the rescue option and
> > specifically install GRUB on the second disk of the RAID.
> 
> It used to be possible to just install it on the other disk.  But I didn't get
> that far.
> 
> After over half a day and some reboots, I finally got it to install on a single
> disk without any redundancy.  I'll have to partition the 2nd disk later after I
> figured out how to add another IPv6 address to one of the interfaces --- easy
> with network manager on Fedora (which also installs on software RAID),
> impossible with Debian.
> 
> I won't be able to boot when the disk I installed on failed.  In this case, it
> doesn't matter too much, but if that was a remote server there would be no way
> to get it installed without hardware RAID.
> 
> Debian really needs to work a lot on the installer.  It used to be easy to
> install Debian, but now it's a nightmare.
> 
> > > 
> > > The graphical version crashes with a kernel panic when booting from an USB
> > > stick, so I need to use the normal installer.
> > 
> > Then you have wider problems than just installation, perhaps?
> > 
> 
> No, why would you say that.
> 

If you can't boot the graphical installer but you can boot the text
installer, there's something wrong somewhere. How did you write the USB
stick and did you test the integrity of the media?

> > > There's even not a way to select RAID1 for btrfs.  What an anachronism ...
> > > 
> > 
> > You do know that this is a general purpose installer that covers 12 or so
> > filesystem types and allows for flexibility?
> 
> Fedoras installer does a better much job.  I didn't want endless flexibility but
> a simple standard installation on software RAID.  That used to be easy with
> Debian.
> 

Your "standard" installation may not be everyone's standard, especially with
RAID and btrfs. If you want us to add it to the various installation methods
we try with each point release, we might be persuaded, though we already
have a combinatorial explosion of options to test each time. (I help with
CD/DVD media testing on point release days).

> > With every good wish, as ever,
> > 
> > Andy Cater 
> > 
> 


Reply to: