On 23/12/16 03:29, Carlos E. R. wrote:
On 2016-12-23 04:24, Andrei Borzenkov wrote:
23.12.2016 06:12, Carlos E. R. пишет:
I did not mean that the special partition had to be in /boot, but that Grub would have to be in a /boot partition outside of the LVM or Raid.
grub does *not* need to be outside of LVM or RAID. Do not spread town legends.
No? Well, things have improved. I read it was the case in raid howto, ages ago.
The RAID howto is obsolete. Has been for a long time, but you know how stuff never dies on the web :-) It was obsolete when the raid wiki was created for Grub 1 and kernel 2.6 - disclaimer - I'm now updating the wiki to Grub 2 and kernel 4. The problem with booting a system now is there are so many options, and in fact, Andrei is wrong here - Andrei, how on earth is the bios supposed to read a raid or lvm disk to find grub? Although I think Carlos is also confused here - there is no need for /boot to be on its own partition. Grub isn't installed in /boot, although that's where all its user-space files live. Historically, grub was ALWAYS installed in either the MBR, or a partition boot record. With an MBR partition table, this is still the case. With a GPT, you need to give grub its own partition. Let's take a totally modern, up-to-date system. You use UEFI, which boots the kernel directly, and grub is obsolete. UEFI needs a partition on disk where it can store all its secure-boot files, its keystore stuff, the hardware drivers it needs, etc etc. And it also stores the linux kernel there. Now let's look at mbr/gpt. Back in the old days, grub was stored in the mbr, and your first partition would typically start in sector 2. That's why boot-loaders had to be tiny. And why lilo always had to be regenerated every time you updated the kernel. And why, if you try to install grub2 on an old system it will fail. And why the MS bootloader and the linux bootloaders used to stomp on each other so often by accident or design. And why any modern fdisk now starts your first partition at sector 2048 or thereabouts! That leaves a meg of free space at the start of your disk for all the elementary system startup stuff you need! When GPT came along, I suspect they decided that even leaving a meg of space at the start of the disk was asking for trouble - different programs could try use the - allegedly - unallocated space in different ways stomping over each other and causing havoc. So now if you want to install grub on a GPT disk, you have to give it its own small partition. Which means, if you have a raid setup, you should install grub on EVERY disk. I run a 2-disk raid-1 mirror, and that's my setup. If the first drive fails, the second drive should be an exact copy right down to the boot code and grub, so it'll come straight back up on that. The other thing to watch out for now is that, with a modern setup, you MUST use an initramfs to boot a grub raid setup (with one minor exception, namely a v1.0 superblock and raid-1). Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org