Mailinglist Archive: opensuse (929 mails)

< Previous Next >
Re: [opensuse] Moving / and /boot partitions
В Sun, 23 Mar 2014 11:13:05 -0400
James Knott <james.knott@xxxxxxxxxx> пишет:

Andrey Borzenkov wrote:
Do you want to install grub2 in MBR or on partition?

I though the usual practice with Linux was to have grub on the boot
partition, with the MBR pointing to it. That's the way it's configured

a) mount your new boot partition anywhere; e.g. /newboot
b) run "grub2-install --force
--boot-directory=/newboot /dev/your-boot-partion"
c) use fdisk to mark your boot partition as active. I assume you have
valid MBR on this disk ...

This will make your new boot partition bootable with grub2 as
bootloader and grub2 will use new boot partition to search for
executable and configuration files. Assuming your BIOS is set to boot
from this disk.

To properly create grub.cfg and initrd for new configuration:

mount /dev/new-root-device /mnt
mount /dev/new-boot-device /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /run /mnt/run
chroot /mnt
grub2-mkconfig > /boot/grub2/grub.cfg

Do not do it from openSUSE DVD rescue boot, it has weird links in /dev
that may screw device detection (at least for LVM or anything that uses
device mapper). Having duplicate filesystem labels or uuids may be a
problem as well.

Probably grub-mkconfig needs better support for off-root rescue root.
Patch was floating upstream, need to get a look once more.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups