Skip to content

Commit

Permalink
mk-setup-grub.sh: Use root=PARTUUID=
Browse files Browse the repository at this point in the history
Change-Id: I0ea787e31d662126be77ce448d51793d51991e75
Reviewed-on: http://photon-jenkins.eng.vmware.com/809
Tested-by: jenkins-photon <[email protected]>
Reviewed-by: Sharath George
  • Loading branch information
Alexey Makhalov authored and Sharath George committed May 6, 2016
1 parent d45b740 commit 4b093b7
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions installer/mk-setup-grub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fi
#
# Install grub2.
#
UUID=$(blkid -s UUID -o value $ROOT_PARTITION_PATH)
PARTUUID=$(blkid -s PARTUUID -o value $ROOT_PARTITION_PATH)
BOOT_UUID=$(blkid -s UUID -o value $BOOT_PARTITION_PATH)

grubInstallCmd=""
Expand Down Expand Up @@ -91,18 +91,6 @@ cp boot/theme.txt ${BUILDROOT}/boot/grub2/themes/photon/
cat > $BUILDROOT/boot/grub2/grub.cfg << EOF
# Begin /boot/grub2/grub.cfg
function set_rootpartition {
if [ "\$photon_initrd" ]; then
set rootpartition=UUID=$UUID
else
search -n -u $UUID -s rootpartition_device
regexp -s dev '.{2}(.)' \$rootpartition_device
regexp -s part '.*(.)' \$rootpartition_device
regexp -s char '.{'\$dev'}(.)' abcdefghij
set rootpartition=/dev/sd\$char\$part
fi
}
set default=0
set timeout=5
search -n -u $BOOT_UUID -s
Expand All @@ -122,7 +110,7 @@ terminal_output gfxterm
set theme="$BOOT_DIRECTORY"grub2/themes/photon/theme.txt
load_env -f "$BOOT_DIRECTORY"photon.cfg
set_rootpartition
set rootpartition=PARTUUID=$PARTUUID
menuentry "Photon" {
linux "$BOOT_DIRECTORY"\$photon_linux root=\$rootpartition net.ifnames=0 \$photon_cmdline
Expand Down

0 comments on commit 4b093b7

Please sign in to comment.