m.roth at 5-cent.us
2017-Jan-25 15:51 UTC
[CentOS] CentOS 7 install on one RAID 1 [not-so-SOLVED]
Let me see if I can, um, reboot this thread.... I made a RAID 1 of two raw disks, /dev/sda and /dev/sdb, *not* /dev/sdax /dev/sdbx. Then I installed CentOS 7 on the RAID, with /boot, /, and swap being partitions on the RAID. My problem is that grub2-install absolutely and resolutely refuses to install on /dev/sda or /dev/sdb. I've currently got it up in a half-assed rescue mode, and have mount -o bind /dev, /proc/ and /sys under /mnt/sysimage, and chrooted there. That's where I'm trying to do my grub2-install. So: 1. *Is* there space for grub2 to install the bootloader under where the mdadm starts? Or do I have to partition the disks (/dev/sda1 100%, ditto /dev/sdb1, then create the RAID 1 with the partitions, and *then* grub2-install? 2. I *think* that one thing that grub2-install is complaining about is that it can't find /boot/grub2. I've tried doing it with $ grub2-install --boot-directory=/boot /dev/sda and $ grub2-install --boot-directory=/dev/md127p1/ /dev/sda and $ grub2-install --boot-directory=/dev/md127pw/boot /dev/sda and it tells me it cannot find the canonical path for the grub2 directory. Is there some way to specify where it should fund /boot/grub2 that I've missed? mark
Valeri Galtsev
2017-Jan-25 16:31 UTC
[CentOS] CentOS 7 install on one RAID 1 [not-so-SOLVED]
On Wed, January 25, 2017 9:51 am, m.roth at 5-cent.us wrote:> Let me see if I can, um, reboot this thread.... > > I made a RAID 1 of two raw disks, /dev/sda and /dev/sdb, *not* /dev/sdax > /dev/sdbx. Then I installed CentOS 7 on the RAID, with /boot, /, and swap > being partitions on the RAID. My problem is that grub2-install absolutely > and resolutely refuses to install on /dev/sda or /dev/sdb. > > I've currently got it up in a half-assed rescue mode, and have mount -o > bind /dev, /proc/ and /sys under /mnt/sysimage, and chrooted there. That's > where I'm trying to do my grub2-install. > > So: > 1. *Is* there space for grub2 to install the bootloader under where the > mdadm starts?To the best of my knowledge: no. To have mdadm started (md devices created) you already need kernel loaded, at this stage you don't have it, you will have it in memory after you load initramdrive, so initramdrive is useless on md devices which do not exist yet at the moment you load initramdrive.> Or do I have to partition the disks (/dev/sda1 100%, ditto > /dev/sdb1, then > create the RAID 1 with the partitions, and *then* grub2-install?Not necessarily, you can have software RAID/mirror of /dev/sda /dev/sdb (without those having disk labels). However, to boot you need regular drive partition present that hosts /boot (and bootloader somewhere on drive that does have disk label). You can have it all on separate tiny drive. Several years back it was done as I and one more poster described in the tread before the thread was "rebooted". Now it is possible grub progressed since, but I doubt that grub supports Linux software RAID devices, for which it would need appropriate Linux portion of code, which is rather large, and GRUB being used to boot other system as well then likely will need to have their implementations of the same... But that might be outdated, I hope someone with current knowledge will chime in. Valeri> 2. I *think* that one thing that grub2-install is complaining about is > that it can't > find /boot/grub2. I've tried doing it with > $ grub2-install --boot-directory=/boot /dev/sda > and > $ grub2-install --boot-directory=/dev/md127p1/ /dev/sda > and > $ grub2-install --boot-directory=/dev/md127pw/boot /dev/sda > and it tells me it cannot find the canonical path for the grub2 > directory. Is > there some way to specify where it should fund /boot/grub2 that > I've missed? > > mark > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
Hi, It's all in the documentation from Red Hat. kickstart snip https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-examples.html manual partitionning https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-disk-partitioning-setup-x86.html#sect-custom-partitioning-x86 scroll down to ? 6.14.4.2. Create Software RAID ymmv, Tru -- Tru Huynh http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBEFA581B -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20170126/d79f0995/attachment-0001.sig>
Maybe Matching Threads
- CentOS 7 install on one RAID 1 [not-so-SOLVED]
- CentOS 7 install on one RAID 1 [not-so-SOLVED]
- [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
- [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
- [PATCH v3 2/2] v2v: ilnux: detect name of grub2-mkconfig