Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: src/scripts/build_image

Issue 2090006: Use new grub2 variables to boot from the device with the bootloader (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: respond to feedback Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/installer/chromeos-setimage ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_image
diff --git a/src/scripts/build_image b/src/scripts/build_image
index 3eb32e4a8c41e44a01b6d66d3824a4fa0c95e2bf..55ae297eb308f58590f45fe88b1ca8a01b43f917 100755
--- a/src/scripts/build_image
+++ b/src/scripts/build_image
@@ -367,25 +367,18 @@ sudo mount "${ESP_LOOP_DEV}" "${ESP_DIR}"
sudo mkdir -p "${ESP_DIR}/efi/boot"
sudo grub-mkimage -p /efi/boot -o "${ESP_DIR}/efi/boot/bootx64.efi" \
part_gpt fat ext2 normal boot sh chain configfile linux
-sudo cp "${ROOT_FS_DIR}/boot/vmlinuz" "${ESP_DIR}/efi/boot/vmlinuz"
-cat <<EOF | sudo dd of="${ESP_DIR}/efi/boot/grub.cfg"
-set timeout=2
+cat <<'EOF' | sudo dd of="${ESP_DIR}/efi/boot/grub.cfg"
set default=0
+set timeout=2
-menuentry "boot from disk" {
- linux /efi/boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait root=/dev/sda3 ro noresume noswap i915.modeset=1 loglevel=1
-}
-
-menuentry "boot from disk with serial debug" {
- linux /efi/boot/vmlinuz earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 init=/sbin/init boot=local rootwait root=/dev/sda3 ro noresume noswap i915.modeset=1 loglevel=7
-}
+# NOTE: These magic grub variables are a Chrome OS hack. They are not portable.
-menuentry "boot from usb" {
- linux /efi/boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait root=/dev/sdb3 ro noresume noswap i915.modeset=1 loglevel=1
+menuentry "local image A" {
+ linux $grubpartA/boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait root=/dev/$linuxpartA ro noresume noswap i915.modeset=1 loglevel=1
}
-menuentry "boot from usb with serial debug" {
- linux /efi/boot/vmlinuz earlyprintk=serial,ttyS0,115200 console=ttyS0,115200 init=/sbin/init boot=local rootwait root=/dev/sdb3 ro noresume noswap i915.modeset=1 loglevel=7
+menuentry "local image B" {
+ linux $grubpartB/boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait root=/dev/$linuxpartB ro noresume noswap i915.modeset=1 loglevel=1
}
EOF
« no previous file with comments | « src/platform/installer/chromeos-setimage ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698