~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to util/grub.d/10_windows.in

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
 
1
#! /bin/sh
 
2
set -e
2
3
 
3
4
# grub-mkconfig helper script.
4
 
# Copyright (C) 2008  Free Software Foundation, Inc.
 
5
# Copyright (C) 2008,2009,2010  Free Software Foundation, Inc.
5
6
#
6
7
# GRUB is free software: you can redistribute it and/or modify
7
8
# it under the terms of the GNU General Public License as published by
28
29
 
29
30
# Try C: even if current system is on other partition.
30
31
case "$SYSTEMDRIVE" in
31
 
  [Cc]:)     dirlist="C:"              ;;
32
 
  [D-Zd-z]:) dirlist="C: $SYSTEMDRIVE" ;;
 
32
  [Cc]:)     drives="C:"              ;;
 
33
  [D-Zd-z]:) drives="C: $SYSTEMDRIVE" ;;
33
34
  *) exit 0 ;;
34
35
esac
35
36
 
51
52
}
52
53
 
53
54
 
54
 
for dir in $dirlist ; do
 
55
for drv in $drives ; do
 
56
 
 
57
  # Convert to Cygwin path.
 
58
  dir=`cygpath "$drv"`
 
59
  test -n "$dir" || continue
 
60
 
 
61
  needmap=
55
62
 
56
63
  # Check for Vista bootmgr.
57
64
  if [ -f "$dir"/bootmgr -a -f "$dir"/boot/bcd ] ; then
60
67
  # Check for NTLDR.
61
68
  elif [ -f "$dir"/ntldr -a -f "$dir"/ntdetect.com -a -f "$dir"/boot.ini ] ; then
62
69
    OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="Windows NT/2000/XP loader"
 
70
    needmap=t
63
71
 
64
72
  else
65
73
    continue
68
76
  # Get boot /dev/ice.
69
77
  dev=`${grub_probe} -t device "$dir" 2>/dev/null` || continue
70
78
 
71
 
  echo "Found $OS on $dir ($dev)" >&2
 
79
  echo "Found $OS on $drv ($dev)" >&2
72
80
  cat << EOF
73
81
menuentry "$OS" {
74
82
EOF
75
83
 
76
84
  save_default_entry | sed -e 's,^,\t,'
77
85
  prepare_grub_to_access_device "$dev" | sed 's,^,\t,'
78
 
 
 
86
  test -z "$needmap" || cat <<EOF
 
87
        drivemap -s (hd0) \$root
 
88
EOF
79
89
  cat << EOF
80
90
        chainloader +1
81
91
}