Master node's grub-legacy install code in kickstart file failed to execute and is unnecessary

Bug #1634073 reported by Wei Hui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
In Progress
Low
Wei Hui

Bug Description

After master node install:
[root@fuel ~]# pwd
/root
[root@fuel ~]# ls
anaconda.cmdline.vars anaconda-parse-cmdline.log anaconda-post-configure-autologon.log anaconda-post-configure-sysconfig.log anaconda-post-partition.log
anaconda-ks.cfg anaconda-post-before-chroot.log anaconda-post-configure-repos.log anaconda-post-interface-settings.log
[root@fuel ~]# cat anaconda-post-partition.log
chroot: failed to run command '/sbin/grub': No such file or directory
[root@fuel ~]#

GRUB legacy does not support GPT disks, so it can not work on disks which are >4T.
Since centos 7 and ubuntu after 9.09 have switched to grub2 which support GPT disk partition, and anaconda install grub2 automatically.

We can safely delete those code.

######################################################################
# Anaconda can not install grub 0.97 on disks which are >4T.
# The reason is that grub does not support such large geometries
# and it simply thinks that the cylinder number has negative value.
# Here we just set geometry manually so that grub thinks that disk
# size is equal to 1G.
# 130 cylinders * (16065 * 512 = 8225280 bytes) = 1G
echo "%post --nochroot --log=/mnt/sysimage/root/anaconda-post-partition.log" > /tmp/post_partition.ks
echo "echo \"device (hd0) /dev/${tgtdrive}\" >> /tmp/grub.script" >> /tmp/post_partition.ks
echo "echo \"geometry (hd0) 130 255 63\" >> /tmp/grub.script" >> /tmp/post_partition.ks
echo "echo \"root (hd0,2)\" >> /tmp/grub.script" >> /tmp/post_partition.ks
echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --no-floppy --batch" >> /tmp/post_partition.ks
echo "%end" >> /tmp/post_partition.ks
######################################################################################

Wei Hui (huiweics)
description: updated
Wei Hui (huiweics)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (master)

Fix proposed to branch: master
Review: https://review.openstack.org/387406

Changed in fuel:
assignee: nobody → Wei Hui (huiweics)
status: New → In Progress
Wei Hui (huiweics)
summary: - Master node legacy grub install in kc file fail to execute and is
- redundance
+ Master node's grub-legacy install code in kickstart file failed to
+ execute and is unnecessary
Changed in fuel:
importance: Undecided → Low
milestone: none → 10.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-main (master)

Change abandoned by Wei Hui (<email address hidden>) on branch: master
Review: https://review.opendev.org/387406

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.