| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,78 +0,0 @@ |
| 1 |
-%define debug_package %{nil}
|
|
| 2 |
-%define __os_install_post %{nil}
|
|
| 3 |
-Summary: GRand Unified Bootloader |
|
| 4 |
-Name: grub |
|
| 5 |
-Version: 2.02 |
|
| 6 |
-Release: 1%{?dist}
|
|
| 7 |
-License: GPLv3+ |
|
| 8 |
-URL: http://www.gnu.org/software/grub |
|
| 9 |
-Group: Applications/System |
|
| 10 |
-Vendor: VMware, Inc. |
|
| 11 |
-Distribution: Photon |
|
| 12 |
-Source0: http://alpha.gnu.org/gnu/grub/grub-2.02~beta2.tar.gz |
|
| 13 |
-%define sha1 grub=b2c9227f9a54587532ae3f727d197ab112cdbbb3 |
|
| 14 |
-BuildRequires: device-mapper-devel |
|
| 15 |
-BuildRequires: xz-devel |
|
| 16 |
-Requires: xz |
|
| 17 |
-Requires: device-mapper |
|
| 18 |
-%description |
|
| 19 |
-The GRUB package contains the GRand Unified Bootloader. |
|
| 20 |
- |
|
| 21 |
-%package lang |
|
| 22 |
-Summary: Additional language files for grub |
|
| 23 |
-Group: System Environment/Programming |
|
| 24 |
-Requires: grub >= 2.00 |
|
| 25 |
-%description lang |
|
| 26 |
-These are the additional language files of grub. |
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-%prep |
|
| 30 |
-%setup -qn grub-2.02~beta2 |
|
| 31 |
-#sed -i -e '/gets is a/d' grub-core/gnulib/stdio.in.h |
|
| 32 |
-%build |
|
| 33 |
-./configure \ |
|
| 34 |
- --prefix=%{_prefix} \
|
|
| 35 |
- --sbindir=/sbin \ |
|
| 36 |
- --sysconfdir=%{_sysconfdir} \
|
|
| 37 |
- --disable-grub-emu-usb \ |
|
| 38 |
- --disable-efiemu \ |
|
| 39 |
- --disable-werror |
|
| 40 |
-make %{?_smp_mflags}
|
|
| 41 |
-%install |
|
| 42 |
-make DESTDIR=%{buildroot} install
|
|
| 43 |
-mkdir %{buildroot}%{_sysconfdir}/default
|
|
| 44 |
-touch %{buildroot}%{_sysconfdir}/default/grub
|
|
| 45 |
-mkdir %{buildroot}%{_sysconfdir}/sysconfig
|
|
| 46 |
-ln -sf %{_sysconfdir}/default/grub %{buildroot}%{_sysconfdir}/sysconfig/grub
|
|
| 47 |
-rm -rf %{buildroot}%{_infodir}
|
|
| 48 |
-%check |
|
| 49 |
-make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
|
|
| 50 |
-%post -p /sbin/ldconfig |
|
| 51 |
-%postun -p /sbin/ldconfig |
|
| 52 |
-%files |
|
| 53 |
-%defattr(-,root,root) |
|
| 54 |
-%dir %{_sysconfdir}/grub.d
|
|
| 55 |
-%config() %{_sysconfdir}/bash_completion.d/grub
|
|
| 56 |
-%config() %{_sysconfdir}/grub.d/00_header
|
|
| 57 |
-%config() %{_sysconfdir}/grub.d/10_linux
|
|
| 58 |
-%config() %{_sysconfdir}/grub.d/20_linux_xen
|
|
| 59 |
-%config() %{_sysconfdir}/grub.d/30_os-prober
|
|
| 60 |
-%config() %{_sysconfdir}/grub.d/40_custom
|
|
| 61 |
-%config() %{_sysconfdir}/grub.d/41_custom
|
|
| 62 |
-%config() %{_sysconfdir}/grub.d/README
|
|
| 63 |
-/sbin/* |
|
| 64 |
-%{_bindir}/*
|
|
| 65 |
-%{_libdir}/grub/*
|
|
| 66 |
-%{_datarootdir}/%{name}/*
|
|
| 67 |
-%{_sysconfdir}/sysconfig/grub
|
|
| 68 |
-%{_sysconfdir}/default/grub
|
|
| 69 |
- |
|
| 70 |
-%files lang |
|
| 71 |
-%defattr(-,root,root) |
|
| 72 |
-/usr/share/locale/* |
|
| 73 |
- |
|
| 74 |
-%changelog |
|
| 75 |
-* Mon Jun 29 2015 Divya Thaluru <dthaluru@vmware.com> 2.02-1 |
|
| 76 |
-- Updating grub to 2.02 |
|
| 77 |
-* Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 2.00-1 |
|
| 78 |
-- Initial build. First version |
| 79 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,86 @@ |
| 0 |
+%define debug_package %{nil}
|
|
| 1 |
+%define __os_install_post %{nil}
|
|
| 2 |
+Summary: GRand Unified Bootloader |
|
| 3 |
+Name: grub2 |
|
| 4 |
+Version: 2.02 |
|
| 5 |
+Release: 2%{?dist}
|
|
| 6 |
+License: GPLv3+ |
|
| 7 |
+URL: http://www.gnu.org/software/grub |
|
| 8 |
+Group: Applications/System |
|
| 9 |
+Vendor: VMware, Inc. |
|
| 10 |
+Distribution: Photon |
|
| 11 |
+Source0: http://alpha.gnu.org/gnu/grub/grub-2.02~beta2.tar.gz |
|
| 12 |
+%define sha1 grub=b2c9227f9a54587532ae3f727d197ab112cdbbb3 |
|
| 13 |
+BuildRequires: device-mapper-devel |
|
| 14 |
+BuildRequires: xz-devel |
|
| 15 |
+Requires: xz |
|
| 16 |
+Requires: device-mapper |
|
| 17 |
+%description |
|
| 18 |
+The GRUB package contains the GRand Unified Bootloader. |
|
| 19 |
+ |
|
| 20 |
+%package lang |
|
| 21 |
+Summary: Additional language files for grub |
|
| 22 |
+Group: System Environment/Programming |
|
| 23 |
+Requires: grub2 >= 2.00 |
|
| 24 |
+%description lang |
|
| 25 |
+These are the additional language files of grub. |
|
| 26 |
+ |
|
| 27 |
+ |
|
| 28 |
+%prep |
|
| 29 |
+%setup -qn grub-2.02~beta2 |
|
| 30 |
+#sed -i -e '/gets is a/d' grub-core/gnulib/stdio.in.h |
|
| 31 |
+%build |
|
| 32 |
+./configure \ |
|
| 33 |
+ --prefix=%{_prefix} \
|
|
| 34 |
+ --sbindir=/sbin \ |
|
| 35 |
+ --sysconfdir=%{_sysconfdir} \
|
|
| 36 |
+ --disable-grub-emu-usb \ |
|
| 37 |
+ --disable-efiemu \ |
|
| 38 |
+ --disable-werror \ |
|
| 39 |
+ --program-transform-name=s,grub,%{name}, \
|
|
| 40 |
+ --with-grubdir=%{name}
|
|
| 41 |
+make %{?_smp_mflags}
|
|
| 42 |
+ |
|
| 43 |
+%install |
|
| 44 |
+make DESTDIR=%{buildroot} install
|
|
| 45 |
+mkdir %{buildroot}%{_sysconfdir}/default
|
|
| 46 |
+touch %{buildroot}%{_sysconfdir}/default/grub
|
|
| 47 |
+mkdir %{buildroot}%{_sysconfdir}/sysconfig
|
|
| 48 |
+ln -sf %{_sysconfdir}/default/grub %{buildroot}%{_sysconfdir}/sysconfig/grub
|
|
| 49 |
+mkdir -p %{buildroot}/boot/%{name}
|
|
| 50 |
+touch %{buildroot}/boot/%{name}/grub.cfg
|
|
| 51 |
+rm -rf %{buildroot}%{_infodir}
|
|
| 52 |
+%check |
|
| 53 |
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
|
|
| 54 |
+%post -p /sbin/ldconfig |
|
| 55 |
+%postun -p /sbin/ldconfig |
|
| 56 |
+%files |
|
| 57 |
+%defattr(-,root,root) |
|
| 58 |
+%dir %{_sysconfdir}/grub.d
|
|
| 59 |
+%config() %{_sysconfdir}/bash_completion.d/grub
|
|
| 60 |
+%config() %{_sysconfdir}/grub.d/00_header
|
|
| 61 |
+%config() %{_sysconfdir}/grub.d/10_linux
|
|
| 62 |
+%config() %{_sysconfdir}/grub.d/20_linux_xen
|
|
| 63 |
+%config() %{_sysconfdir}/grub.d/30_os-prober
|
|
| 64 |
+%config() %{_sysconfdir}/grub.d/40_custom
|
|
| 65 |
+%config() %{_sysconfdir}/grub.d/41_custom
|
|
| 66 |
+%config() %{_sysconfdir}/grub.d/README
|
|
| 67 |
+/sbin/* |
|
| 68 |
+%{_bindir}/*
|
|
| 69 |
+%{_libdir}/grub/*
|
|
| 70 |
+%{_datarootdir}/grub/*
|
|
| 71 |
+%{_sysconfdir}/sysconfig/grub
|
|
| 72 |
+%{_sysconfdir}/default/grub
|
|
| 73 |
+%ghost %config(noreplace) /boot/%{name}/grub.cfg
|
|
| 74 |
+ |
|
| 75 |
+%files lang |
|
| 76 |
+%defattr(-,root,root) |
|
| 77 |
+/usr/share/locale/* |
|
| 78 |
+ |
|
| 79 |
+%changelog |
|
| 80 |
+* Wed Jul 22 2015 Divya Thaluru <dthaluru@vmware.com> 2.02-2 |
|
| 81 |
+- Changing program name from grub to grub2. |
|
| 82 |
+* Mon Jun 29 2015 Divya Thaluru <dthaluru@vmware.com> 2.02-1 |
|
| 83 |
+- Updating grub to 2.02 |
|
| 84 |
+* Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 2.00-1 |
|
| 85 |
+- Initial build. First version |
| ... | ... |
@@ -10,7 +10,7 @@ |
| 10 | 10 |
"kubernetes", "cyrus-sasl", "openldap", "binutils-devel", "python-iniparse", "psmisc", "etcd", "openssl-devel", |
| 11 | 11 |
"util-linux-lang", "db-docs", "linux-dev", "linux-docs", "mpc", "json-glib", "json-glib-devel", |
| 12 | 12 |
"automake", "libpcap", "tcpdump", "elfutils-libelf-devel", "elfutils", "elfutils-devel", "elfutils-devel-static", "elfutils-libelf-devel-static", |
| 13 |
- "go", "grub-lang", "diffutils", "groff", "man-db", "mpfr-devel", "man-pages", |
|
| 13 |
+ "go", "grub2","grub2-lang", "diffutils", "groff", "man-db", "mpfr-devel", "man-pages", |
|
| 14 | 14 |
"hawkey-devel", "python-hawkey", "libxml2-devel", "ruby", "readline-devel", "wget", |
| 15 | 15 |
"Linux-PAM-lang", "make", "bindutils", "gperf", "lua-devel", "less", |
| 16 | 16 |
"cmake", "gpgme-devel", "parted", "nano", "xz-devel", "xerces-c-devel", "xml-security-c-devel", |
| ... | ... |
@@ -4,7 +4,7 @@ |
| 4 | 4 |
"bzip2", "pkg-config", "ncurses", "cracklib", "cracklib-dicts", "shadow", "procps-ng", "e2fsprogs", |
| 5 | 5 |
"iana-etc", "readline", "coreutils", "bash", "bc", "libtool", |
| 6 | 6 |
"inetutils", |
| 7 |
- "xz", "grub", "iproute2", "kbd", "kmod", "libpipeline", |
|
| 7 |
+ "xz", "grub2", "iproute2", "kbd", "kmod", "libpipeline", |
|
| 8 | 8 |
"util-linux", |
| 9 | 9 |
"openssl", "libffi", "expat", |
| 10 | 10 |
"linux", "curl", |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
{
|
| 2 | 2 |
"packages":["glibc", "zlib", "filesystem", "binutils", "gmp", "mpfr", "libgcc", "libstdc++","libgomp", |
| 3 | 3 |
"pkg-config", "ncurses", "readline", "bash", "bzip2", "cracklib", "cracklib-dicts", "shadow", "procps-ng", "iana-etc", "coreutils", "bc", "libtool", "inetutils", |
| 4 |
- "findutils", "xz", "grub", "iproute2", "util-linux", "openssl", "kmod", "linux", "ca-certificates", "curl", "iptables", "Linux-PAM", |
|
| 4 |
+ "findutils", "xz", "grub2", "iproute2", "util-linux", "openssl", "kmod", "linux", "ca-certificates", "curl", "iptables", "Linux-PAM", |
|
| 5 | 5 |
"attr", "libcap", "systemd", "expat", "dbus", "file", "e2fsprogs", "elfutils-libelf", "lua", "popt", "sqlite-autoconf", "nspr", "nss", "rpm", |
| 6 | 6 |
"openssh", "libffi", "gdbm", "python2", "python2-libs", "pcre", "glib", "libxml2", "libxml2-python", |
| 7 | 7 |
"photon-release", |
| ... | ... |
@@ -34,7 +34,7 @@ Following is the list (extracted from [this link](https://cloud.google.com/compu |
| 34 | 34 |
|
| 35 | 35 |
# Change partition table to MBR from GPT |
| 36 | 36 |
sgdisk -m 1:2 /dev/sda |
| 37 |
- grub-install /dev/sda |
|
| 37 |
+ grub2-install /dev/sda |
|
| 38 | 38 |
|
| 39 | 39 |
# Enable serial console on grub for GCE. |
| 40 | 40 |
cat << EOF >> /etc/default/grub |
| ... | ... |
@@ -44,7 +44,7 @@ Following is the list (extracted from [this link](https://cloud.google.com/compu |
| 44 | 44 |
EOF |
| 45 | 45 |
|
| 46 | 46 |
# Create new grub.cfg based on the settings in /etc/default/grub |
| 47 |
- grub-mkconfig -o /boot/grub/grub.cfg |
|
| 47 |
+ grub2-mkconfig -o /boot/grub2/grub.cfg |
|
| 48 | 48 |
|
| 49 | 49 |
##### 2. Install Google Cloud SDK and GCE Packages |
| 50 | 50 |
yum install google-daemon google-startup-scripts |
| ... | ... |
@@ -32,21 +32,21 @@ if [ $# -eq 2 ] |
| 32 | 32 |
fi |
| 33 | 33 |
|
| 34 | 34 |
# |
| 35 |
-# Install grub. |
|
| 35 |
+# Install grub2. |
|
| 36 | 36 |
# |
| 37 | 37 |
UUID=$(blkid -s UUID -o value $PARTITION) |
| 38 |
-grub-install --force --boot-directory=$BUILDROOT/boot "$HDD" |
|
| 39 |
-cp boot/unifont.pf2 ${BUILDROOT}/boot/grub/
|
|
| 40 |
-mkdir -p ${BUILDROOT}/boot/grub/themes/photon
|
|
| 41 |
-cp boot/splash.tga ${BUILDROOT}/boot/grub/themes/photon/photon.tga
|
|
| 42 |
-cp boot/terminal_*.tga ${BUILDROOT}/boot/grub/themes/photon/
|
|
| 43 |
-cp boot/theme.txt ${BUILDROOT}/boot/grub/themes/photon/
|
|
| 44 |
-cat > "$BUILDROOT"/boot/grub/grub.cfg << "EOF" |
|
| 45 |
-# Begin /boot/grub/grub.cfg |
|
| 38 |
+grub2-install --force --boot-directory=$BUILDROOT/boot "$HDD" |
|
| 39 |
+cp boot/unifont.pf2 ${BUILDROOT}/boot/grub2/
|
|
| 40 |
+mkdir -p ${BUILDROOT}/boot/grub2/themes/photon
|
|
| 41 |
+cp boot/splash.tga ${BUILDROOT}/boot/grub2/themes/photon/photon.tga
|
|
| 42 |
+cp boot/terminal_*.tga ${BUILDROOT}/boot/grub2/themes/photon/
|
|
| 43 |
+cp boot/theme.txt ${BUILDROOT}/boot/grub2/themes/photon/
|
|
| 44 |
+cat > "$BUILDROOT"/boot/grub2/grub.cfg << "EOF" |
|
| 45 |
+# Begin /boot/grub2/grub.cfg |
|
| 46 | 46 |
set default=0 |
| 47 | 47 |
set timeout=5 |
| 48 | 48 |
set root=(hd0,2) |
| 49 |
-loadfont /boot/grub/unifont.pf2 |
|
| 49 |
+loadfont /boot/grub2/unifont.pf2 |
|
| 50 | 50 |
|
| 51 | 51 |
insmod gfxterm |
| 52 | 52 |
insmod vbe |
| ... | ... |
@@ -57,7 +57,7 @@ gfxpayload=keep |
| 57 | 57 |
|
| 58 | 58 |
terminal_output gfxterm |
| 59 | 59 |
|
| 60 |
-set theme=/boot/grub/themes/photon/theme.txt |
|
| 60 |
+set theme=/boot/grub2/themes/photon/theme.txt |
|
| 61 | 61 |
|
| 62 | 62 |
menuentry "Photon" {
|
| 63 | 63 |
insmod ext2 |
| ... | ... |
@@ -65,10 +65,10 @@ menuentry "Photon" {
|
| 65 | 65 |
linux /boot/vmlinuz-3.19.2 init=/lib/systemd/systemd root=UUID=UUID_PLACEHOLDER loglevel=3 ro |
| 66 | 66 |
initrd /boot/initrd.img-no-kmods |
| 67 | 67 |
} |
| 68 |
-# End /boot/grub/grub.cfg |
|
| 68 |
+# End /boot/grub2/grub.cfg |
|
| 69 | 69 |
EOF |
| 70 | 70 |
|
| 71 |
-sed -i "s/UUID_PLACEHOLDER/$UUID/" "$BUILDROOT"/boot/grub/grub.cfg > ${LOGFILE}
|
|
| 71 |
+sed -i "s/UUID_PLACEHOLDER/$UUID/" "$BUILDROOT"/boot/grub2/grub.cfg > ${LOGFILE}
|
|
| 72 | 72 |
|
| 73 | 73 |
#Cleanup the workspace directory |
| 74 | 74 |
rm -rf "$BUILDROOT"/tools |