The system is Fedora 20. There are two environments, the first is the booted environment. It is LVM based and is labeled 'fedora'. The second is LVM based as is labeled 'vg_raidrootbu-server'. The grub.cfg and initramfs were built under chroot into the second environmnet. Below is the linux line from the chroot grub.cfg. It shows the chroot environment was chosen for the 'root' directive; however it shows the external, booted environment, 'fedora', was chosen for swap and lvm.

linux /vmlinuz-3.18.7-100.fc20.x86_64 root=/dev/mapper/vg_raidrootbu-server_root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8

Below are the commands used to load the chroot environment.

mount /dev/mapper/vg_raidrootbu-server_root /mnt/root/
mount /dev/mapper/vg_home-home /mnt/root/home/
mount /dev/mapper/vg_home-extended /mnt/root/home/extended
mount /dev/mapper/vg_home-owncdata /mnt/root/home/owncloud
mount /dev/sdb1 /mnt/root/boot/
mount -t proc none /mnt/root/proc/
mount -t sysfs sys /mnt/root/sys/
mount -o bind /dev /mnt/root/dev/

How can the chroot environment for grub2 be set up to only use the chroot environment. Are there config files that control grub2 that need to be edited.

| |
  • There is a file /etc/default/grub that contains the default grub command line config. editing it corrects grub.cfg. – dan sawyer Mar 27 '15 at 2:24

There is a configuration file /etc/defaults/grub which defines aspects of the environment used by grub to construct grub.cfg. This is one of them. A simple edit removing the references to original lvm environment and replacing them with references to the new lvm environment fixed the issue. The new grub.cfg booted cleanly to the new lvm file system.

| |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.