Merge lp:~hakuna-matata/wubi/upstart into lp:wubi

Proposed by hakuna_matata on 2015-05-16
Status: Needs review
Proposed branch: lp:~hakuna-matata/wubi/upstart
Merge into: lp:wubi
Diff against target: 998 lines (+729/-35)
14 files modified
Makefile (+5/-0)
data/custom-installation/hooks/early-command.sh (+21/-1)
data/custom-installation/hooks/post-installer.sh (+19/-0)
data/custom-installation/patch/autopartition-loop (+379/-0)
data/custom-installation/patch/grub-install (+13/-0)
data/custom-installation/patch/grub-install-efi (+126/-0)
data/custom-installation/patch/loop-remount (+14/-0)
data/isolist.ini (+30/-27)
data/preseed.lupin (+2/-1)
data/preseed.mythbuntu (+2/-1)
data/wubildr.cfg (+1/-0)
debian/changelog (+38/-0)
src/wubi/application.py (+0/-5)
src/wubi/backends/win32/backend.py (+79/-0)
To merge this branch: bzr merge lp:~hakuna-matata/wubi/upstart
Reviewer Review Type Date Requested Status
Ubuntu Installer Team 2015-05-16 Pending
Review via email: mp+259318@code.launchpad.net

Commit message

Description of the change

  * systemd fix for not working mount-move commands in /bin/autopartition-loop
  * EFI support
  * Windows: BCD entries for UEFI, disable Hibernate and Fast Startup
  * Ubuntu: GRUB for x86_64-efi platform
  * Bypass Ubiquity bug (LP: #1385930):
    Use libparted and parted_server version of 14.04
  * loop-remount (LP: #1317437):
    allow remounting of loop device as read-write
    patch is necessary because of unreleased fix
    https://code.launchpad.net/~noorez-kassam/ubuntu/utopic/initramfs-tools/fix-for-1317437
  * Bump to 15.04
  * Use vmlinuz.efi on all amd64 ISOs except Ubuntu Studio
  * Set confirm_nooverwrite on preseeds

To post a comment you must log in.
Martin Wimpress (flexiondotorg) wrote :

Could a sponsor please look at this? @hakuna_matata has provided a good selection of fixes here :-)

Unmerged revisions

295. By hakuna_matata on 2015-04-09

Fix for upstart->systemd

294. By hakuna_matata on 2015-04-09

EFI support

293. By hakuna_matata on 2015-04-03

Bypass Ubiquity bug

292. By hakuna_matata on 2015-04-03

Allow remounting of loop device as rw

291. By hakuna_matata on 2015-04-03

Bump to 15.04

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2014-10-20 15:31:24 +0000
+++ Makefile 2015-05-16 19:21:21 +0000
@@ -81,6 +81,11 @@
81 loadenv biosdisk part_msdos part_gpt fat ntfs ext2 ntfscomp iso9660 loopback search linux boot minicmd cat cpuid chain halt help ls reboot \81 loadenv biosdisk part_msdos part_gpt fat ntfs ext2 ntfscomp iso9660 loopback search linux boot minicmd cat cpuid chain halt help ls reboot \
82 echo test configfile gzio normal sleep memdisk tar font gfxterm gettext true vbe vga video_bochs video_cirrus probe82 echo test configfile gzio normal sleep memdisk tar font gfxterm gettext true vbe vga video_bochs video_cirrus probe
83 cat /usr/lib/grub/i386-pc/lnxboot.img build/grubutil/core.img > build/winboot/wubildr83 cat /usr/lib/grub/i386-pc/lnxboot.img build/grubutil/core.img > build/winboot/wubildr
84 mkdir -p build/winboot/EFI
85 grub-mkimage -O x86_64-efi -c build/winboot/wubildr-bootstrap.cfg -m build/winboot/wubildr.tar -o build/winboot/EFI/grubx64.efi \
86 loadenv part_msdos part_gpt fat ntfs ext2 ntfscomp iso9660 loopback search linux linuxefi boot minicmd cat cpuid chain halt help ls reboot \
87 echo test configfile gzio normal sleep memdisk tar font gfxterm gettext true efi_gop efi_uga video_bochs video_cirrus probe efifwsetup
88 cp /usr/lib/shim/shim.efi.signed build/winboot/EFI/shimx64.efi
8489
85winboot: grub4dos grubutil90winboot: grub4dos grubutil
86 mkdir -p build/winboot91 mkdir -p build/winboot
8792
=== modified file 'data/custom-installation/hooks/early-command.sh'
--- data/custom-installation/hooks/early-command.sh 2009-01-14 01:33:45 +0000
+++ data/custom-installation/hooks/early-command.sh 2015-05-16 19:21:21 +0000
@@ -1,2 +1,22 @@
1#!/bin/sh1#!/bin/sh
2#Add early commands here2set -x
3
4if [ -f /custom-installation/hooks/post-installer.sh ]; then
5 mkdir -p /root/usr/lib/ubiquity/target-config
6 cp /custom-installation/hooks/post-installer.sh /root/usr/lib/ubiquity/target-config/10post-installer
7 chmod +x /root/usr/lib/ubiquity/target-config/10post-installer
8fi
9
10architecture=$(uname -m | sed s/i6/i3/)
11if [ -f /custom-installation/patch/$architecture/parted_server ]; then
12 cp /custom-installation/patch/$architecture/parted_server /root/usr/bin/parted_server
13 cp /custom-installation/patch/$architecture/libparted.so.0.0.1 /root/lib/$architecture-linux-gnu/libparted.so.0.0.1
14 ln -s libparted.so.0.0.1 /root/lib/$architecture-linux-gnu/libparted.so.0
15fi
16
17if [ -f /custom-installation/patch/autopartition-loop ]; then
18 cp /custom-installation/patch/autopartition-loop /root/bin/autopartition-loop
19fi
20
21
22
323
=== added file 'data/custom-installation/hooks/post-installer.sh'
--- data/custom-installation/hooks/post-installer.sh 1970-01-01 00:00:00 +0000
+++ data/custom-installation/hooks/post-installer.sh 2015-05-16 19:21:21 +0000
@@ -0,0 +1,19 @@
1#!/bin/sh
2set -x
3
4if [ -f /custom-installation/patch/loop-remount ]; then
5 mkdir -p /target/etc/initramfs-tools/hooks
6 cp /custom-installation/patch/loop-remount /target/etc/initramfs-tools/hooks/loop-remount
7 chmod +x /target/etc/initramfs-tools/hooks/loop-remount
8fi
9
10if [ -f /custom-installation/patch/grub-install ] && [ -f /custom-installation/patch/grub-install-efi ] ; then
11 if [ -d /target/boot/efi ]; then
12 mkdir -p /target/usr/local/sbin
13 cp /custom-installation/patch/grub-install /target/usr/local/sbin/grub-install
14 chmod +x /target/usr/local/sbin/grub-install
15 cp /custom-installation/patch/grub-install-efi /target/usr/local/sbin/grub-install-efi
16 chmod +x /target/usr/local/sbin/grub-install-efi
17 fi
18fi
19
020
=== added directory 'data/custom-installation/patch'
=== added file 'data/custom-installation/patch/autopartition-loop'
--- data/custom-installation/patch/autopartition-loop 1970-01-01 00:00:00 +0000
+++ data/custom-installation/patch/autopartition-loop 2015-05-16 19:21:21 +0000
@@ -0,0 +1,379 @@
1#! /bin/sh
2
3. /lib/partman/lib/base.sh
4. /lib/partman/lib/resize.sh
5. /lib/partman/lib/recipes.sh
6
7# busybox wants mount -o move; util-linux wants mount --move. Sigh.
8if [ -d /lib/debian-installer ]; then
9 mount_private='-o private'
10 mount_move='-o move'
11else
12 mount_move='--move'
13 mount_private='--make-private'
14fi
15
16mount $mount_private /
17
18modprobe loop >/dev/null 2>&1 || true
19
20# Set up working directory.
21
22if type mktemp >/dev/null 2>&1; then
23 recipe_dir="$(mktemp -d /tmp/partman-auto-loop.XXXXXX)"
24 trap "rm -rf $recipe_dir" EXIT HUP INT QUIT TERM
25else
26 recipe_dir=/tmp
27fi
28
29# Fetch parameters.
30
31disk="$1"
32
33cd $disk
34
35if ! db_get partman-auto-loop/partition || [ -z "$RET" ]; then
36 logger -t partman-auto-loop "Error: No partition number specified in partman-auto-loop/partition"
37 exit 1
38fi
39partition="$RET"
40
41if ! db_get partman-auto-loop/recipe || [ -z "$RET" ]; then
42 logger -t partman-auto-loop "Error: No recipe specified in partman-auto-loop/recipe"
43 exit 1
44fi
45recipe="$RET"
46echo "$recipe" >"$recipe_dir/loop_recipe"
47
48# Find the requested partition.
49
50db_progress START 0 5 partman-auto/text/automatically_partition
51db_progress INFO partman-auto/progress/info
52
53partition_id=
54partition_fs=
55open_dialog PARTITIONS
56while { read_line num id size type fs path name; [ "$id" ]; }; do
57 if [ "$num" = "$partition" ]; then
58 partition_id="$id"
59 partition_fs="$fs"
60 # go ahead and read all remaining input
61 fi
62done
63close_dialog
64if [ -z "$partition_id" ]; then
65 logger -t partman-auto-loop "Error: Partition number $partition not found in $disk"
66 exit 1
67fi
68
69# Set up the requested partition in partman.
70
71existing=no
72for j in $(
73 for i in /lib/partman/valid_filesystems/*; do
74 [ -x $i ] || continue
75 $i $disk $partition_id existing
76 done
77); do
78 if [ "$j" = "$partition_fs" ]; then
79 existing=yes
80 fi
81done
82
83if [ "$existing" = no ]; then
84 logger -t partman-auto-loop "Error: No filesystem on $disk/$partition_id"
85 exit 1
86fi
87
88echo keep >$partition_id/method
89rm -f $partition_id/format
90>$partition_id/use_filesystem
91echo $partition_fs >$partition_id/filesystem
92mkdir -p $partition_id/options
93echo / >$partition_id/mountpoint
94update_partition $disk $partition_id
95
96# Is there enough space to perform the recipe?
97
98dev="$disk"
99oldid="$partition_id"
100
101recipe_new=
102firstword=
103imagepaths=
104for word in $(cat "$recipe_dir/loop_recipe"); do
105 case $word in
106 .)
107 recipe_new="${recipe_new:+$recipe_new }\$imagepath{ $firstword } $word"
108 firstword=
109 ;;
110 *)
111 if [ "$firstword" ]; then
112 recipe_new="${recipe_new:+$recipe_new }$word"
113 else
114 firstword="$word"
115 imagepaths="${imagepaths:+$imagepaths }$word"
116 fi
117 ;;
118 esac
119done
120echo "$recipe_new" >"$recipe_dir/loop_recipe_new"
121decode_recipe "$recipe_dir/loop_recipe_new" loop
122
123db_progress STEP 1
124
125fstab="$(
126 for i in /lib/partman/fstab.d/*; do
127 [ -x "$i" ] || continue
128 $i
129 done |
130 while read fs mp type options dump pass; do
131 case $mp in
132 (/)
133 echo $fs $mp $type $options $dump $pass
134 ;;
135 esac
136 done
137)"
138
139if [ -z "$fstab" ]; then
140 logger -t partman-auto-loop "Error: No fstab output for $disk/$partition_id"
141 exit 1
142fi
143
144mkdir -p /target
145
146mountpoint="$(grep "^${fstab%% *} [^ ]* [^ ]* [^ ]*rw" /proc/mounts | cut -d ' ' -f2 | head -n1)" || mountpoint=
147if [ "$mountpoint" = /target ]; then
148 # nothing to do
149 :
150elif [ "$mountpoint" ]; then
151 if ! mount $mount_move "$mountpoint" /target; then
152 logger -t partman-auto-loop "Error: Failed to move $mountpoint to /target"
153 exit 1
154 fi
155 unmount_cmd='umount /target'
156else
157 for m in /lib/partman/mount.d/*; do
158 [ -x "$m" ] || continue
159
160 unmount_cmd="$($m "$fstab")"
161 if [ "$?" = 0 ]; then
162 break
163 fi
164 done
165fi
166if [ -d /run ]; then
167 mkdir -p /run/sendsigs.omit.d
168 pidof mount.ntfs >> /run/sendsigs.omit.d/ntfs-3g
169 pidof mount.ntfs-3g >> /run/sendsigs.omit.d/ntfs-3g
170fi
171
172# TODO: handle errors if no mount succeeded
173mkdir -p /host
174mount $mount_move /target /host # TODO error handling
175
176# Don't try to mount this again later.
177rm -f $partition_id/mountpoint
178
179# Ensure there is enough free space.
180check_free_space=false
181requires_disk_space(){
182 [ "$1" != 0 ] || return
183 path="$(echo "$*" | sed 's/.*\$imagepath{ *\([^ }]*\) *}.*/\1/')"
184 [ "$path" != "$*" ] || return
185 case $path in
186 /*) ;;
187 *) path="/$path" ;;
188 esac
189 [ -f "/host$path" ] && return
190 check_free_space=true
191}
192foreach_partition 'requires_disk_space $*'
193
194# Skip resize_range check if images are already created.
195if [ $check_free_space = true ]; then
196 case $partition_fs in
197 linux-swap|fat16|fat32|hfs|hfs+|hfsx)
198 get_resize_range
199 ;;
200 ext2|ext3|ext4)
201 if ! search-path tune2fs; then
202 logger -t partman-auto-loop "Error: tune2fs not found"
203 exit 1
204 fi
205 if ! search-path resize2fs; then
206 logger -t partman-auto-loop "Error: resize2fs not found"
207 exit 1
208 fi
209 if ! get_ext2_resize_range; then
210 logger -t partman-auto-loop "Error: Failed to get ext2 resize range for $disk/$partition_id"
211 exit 1
212 fi
213 ;;
214 ntfs)
215 if ! search-path ntfsresize; then
216 logger -t partman-auto-loop "Error: ntfsresize not found"
217 exit 1
218 fi
219 if ! get_ntfs_resize_range; then
220 db_input critical partman-auto-loop/unclean_ntfs || true
221 db_go || true
222 logger -t partman-auto-loop "Error: Failed to get NTFS resize range for $disk/$partition_id"
223 reboot
224 exit 1
225 fi
226 ;;
227 *)
228 logger -t partman-auto-loop "Cannot calculate free space on filesystems of type $partition_fs"
229 exit 1
230 ;;
231 esac
232 free_size="$(expr \( "$cursize" - "$minsize" \) \* 9 / 10)"
233 # convert to megabytes
234 free_size="$(expr 0000000"$free_size" : '0*\(..*\)......$')"
235 if [ $(min_size) -gt $free_size ]; then
236 logger -t partman-auto-loop "Error: partman-auto-loop/recipe too large ($(min_size) > $free_size)"
237 exit 1
238 fi
239fi
240
241# Ensure that no old loop images are present and mountable.
242found_images=
243mkdir -p /tmpmountpoint
244for path in $imagepaths; do
245 case $path in
246 /*) ;;
247 *) path="/$path" ;;
248 esac
249 if [ -e "/host$path" ]; then
250 if mount -t auto -o loop,ro /host$path /tmpmountpoint 2>/dev/null 3>&-; then
251 found_images="${found_images:+$found_images }$path"
252 umount /tmpmountpoint || true
253 rmdir /tmpmountpoint || true
254 fi
255 fi
256done
257if [ "$found_images" ]; then
258 db_progress STOP
259 db_subst partman-auto-loop/unclean_host PARTITION "$partition"
260 db_subst partman-auto-loop/unclean_host DISK "$disk"
261 db_subst partman-auto-loop/unclean_host IMAGES "$found_images"
262 db_input critical partman-auto-loop/unclean_host || true
263 db_capb
264 db_go || true
265 db_capb backup
266 umount /host || true
267 exit 1
268fi
269
270db_progress STEP 1
271
272expand_scheme
273
274db_progress STEP 1
275
276clean_method
277
278db_progress STEP 1
279
280setup_loop () {
281 [ "$1" != 0 ] || return
282 path="$(echo "$*" | sed 's/.*\$imagepath{ *\([^ }]*\) *}.*/\1/')"
283 [ "$path" != "$*" ] || return
284
285 case $path in
286 /*) ;;
287 *) path="/$path" ;;
288 esac
289 if [ ! -f "/host$path" ]; then
290 mkdir -p "/host${path%/*}"
291 if [ "$4" = "linux-swap" ]; then
292 # swap requires a file with no holes
293 dd if=/dev/zero of="/host$path" bs="1000000" count="$1"
294 else
295 dd if=/dev/zero of="/host$path" bs="1000000" seek="$1" count=0
296 fi
297 fi
298 if ! losetup -f "/host$path"; then
299 shift
300 continue
301 fi
302 if [ "$4" = linux-swap ]; then
303 loops="/host$path"
304 else
305 loops="$(echo /dev/loop* /dev/loop/*)"
306 fi
307 for loop in $loops; do
308 [ -e "$loop" ] || continue
309 case $loop in
310 /dev/loop*)
311 loopfile="$(losetup "$loop")" || continue
312 # The following works with both busybox's
313 # losetup and util-linux's losetup. Yes,
314 # this is ugly.
315 loopfile="$(echo "$loopfile" | sed 's,.*\(/host/[^)]*\).*,\1,')"
316 ;;
317 *)
318 loopfile="$loop"
319 ;;
320 esac
321 [ "$loopfile" = "/host$path" ] || continue
322
323 dirname="$(echo "$loop" | sed 's:/:=:g')"
324 dev="$DEVICES/$dirname"
325
326 rm -rf "$dev"
327 mkdir "$dev" || autopartitioning_failed
328 printf "%s" "$loop" >"$dev/device"
329 printf "%s" "$1" >"$dev/size"
330 echo "Loopback on $loopfile" >"$dev/model"
331 echo "$loopfile" >"$dev/loop"
332
333 cd "$dev"
334 open_dialog OPEN "$(cat "$dev/device")"
335 read_line response
336 close_dialog
337 if [ "$response" = failed ]; then
338 cd /
339 rm -rf "$dev"
340 autopartitioning_failed
341 fi
342
343 open_dialog NEW_LABEL loop
344 close_dialog
345
346 # find the free space
347 open_dialog PARTITIONS
348 free_space=
349 while { read_line num id size type fs path name; [ "$id" ]; }; do
350 if [ "$fs" = free ]; then
351 free_space=$id
352 free_size=$size
353 fi
354 done
355 close_dialog
356
357 # create partition in the free space
358 [ "$free_space" ] || autopartitioning_failed
359 open_dialog NEW_PARTITION primary $4 $free_space full ${1}000001
360 read_line num id size type fs path name
361 close_dialog
362
363 shift; shift; shift; shift
364 setup_partition $id $*
365 break
366 done
367}
368
369foreach_partition 'setup_loop $*'
370
371db_progress STEP 1
372
373update_all
374
375apt-install lupin-support
376
377db_progress STOP
378
379exit 0
0380
=== added file 'data/custom-installation/patch/grub-install'
--- data/custom-installation/patch/grub-install 1970-01-01 00:00:00 +0000
+++ data/custom-installation/patch/grub-install 2015-05-16 19:21:21 +0000
@@ -0,0 +1,13 @@
1#! /bin/sh
2set -e
3
4if [ -f /usr/sbin/grub-install.real ]; then
5 if cat /usr/sbin/grub-install | grep "will only work on BIOS" >/dev/null; then
6 if [ -f /usr/local/sbin/grub-install-efi ]; then
7 cp -f /usr/local/sbin/grub-install-efi /usr/sbin/grub-install
8 fi
9 fi
10fi
11
12/usr/sbin/grub-install "$@"
13exit $?
014
=== added file 'data/custom-installation/patch/grub-install-efi'
--- data/custom-installation/patch/grub-install-efi 1970-01-01 00:00:00 +0000
+++ data/custom-installation/patch/grub-install-efi 2015-05-16 19:21:21 +0000
@@ -0,0 +1,126 @@
1#! /bin/sh
2set -e
3
4# grub-install replacement for use in Wubi installations. This arranges for
5# the grub bootloader installed on the host (wubildr) to be reinstalled
6# rather than installing it to a boot sector.
7#
8# To get at the real MBR if you wish to do so, use grub-install.real
9# instead.
10#
11# Copyright (C) 2009, 2013 Canonical Ltd.
12#
13# Lupin is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# Lupin is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with Lupin; if not, write to the Free Software
25# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26# 02110-1301, USA.
27
28want_passthrough () {
29 while [ $# -gt 0 ]; do
30 option="$1"
31 shift
32
33 case $option in
34 -h|--help|-v|--version)
35 return 0
36 ;;
37 --debug-image)
38 debug_image="$1"
39 shift
40 ;;
41 --debug-image=*)
42 debug_image="${option#--debug-image=}"
43 ;;
44 esac
45 done
46 return 1
47}
48
49if want_passthrough "$@" || ! /usr/share/lupin-support/grub-mkimage --test; then
50 grub-install.real "$@"
51 exit $?
52fi
53
54# The C rewrite of grub-install no longer offers --grub-probe or
55# --grub-mkimage options, so we now have to roll our own installation. This
56# is arguably clearer anyway, although it's unfortunately verbose.
57# On the other hand, there is relatively little need to track the real
58# grub-install code, as it's now in a different language and most of it is
59# unused here anyway.
60
61pkgdatadir=/usr/share/grub
62localedir=/usr/share/locale
63grubdir=/boot/grub
64source_grubdir=/usr/lib/grub
65
66# delete existing files in /boot/grub
67for file in "$grubdir"/*.mod "$grubdir"/*.lst "$grubdir"/*.img "$grubdir"/efiemu??.o; do
68 if [ -f "$file" ] && [ "$(basename "$file")" != menu.lst ]; then
69 rm -f "$file"
70 fi
71done
72
73# delete existing files in /boot/grub/*-pc or /boot/grub/*-efi and install new ones
74for source_dir in "$source_grubdir"/*-pc "$source_grubdir"/*-efi; do
75 if [ -d "$source_dir" ]; then
76 echo "Installing for "$(basename "$source_dir")" platform." >&2
77 dest_grubdir="$grubdir"/"$(basename "$source_dir")"
78 mkdir -p "$dest_grubdir"
79 for file in "$dest_grubdir"/*.mod "$dest_grubdir"/*.lst "$dest_grubdir"/*.img "$dest_grubdir"/efiemu??.o; do
80 if [ -f "$file" ] && [ "$(basename "$file")" != menu.lst ]; then
81 rm -f "$file"
82 fi
83 done
84 for file in "$source_dir"/*.mod "$source_dir"/*.lst "$source_dir"/*.img "$source_dir"/efiemu??.o; do
85 if [ -f "$file" ]; then
86 cp -f "$file" "$dest_grubdir"
87 fi
88 done
89 fi
90done
91
92mkdir -p "$grubdir/locale"
93for dir in "$localedir"/* "$localedir-langpack"/*; do
94 if [ -f "$dir/LC_MESSAGES/grub.mo" ]; then
95 cp -f "$dir/LC_MESSAGES/grub.mo" "$grubdir/locale/${dir##*/}.mo"
96 fi
97done
98
99if [ -f "$pkgdatadir/themes/starfield/theme.txt" ]; then
100 mkdir -p "$grubdir/themes/starfield"
101 cp "$pkgdatadir/themes/starfield"/* "$grubdir/themes/starfield/"
102fi
103
104if [ -f "$pkgdatadir/unicode.pf2" ]; then
105 mkdir -p "$grubdir/fonts"
106 cp "$pkgdatadir/unicode.pf2" "$grubdir/fonts/"
107fi
108
109if [ ! -f "$grubdir/grubenv" ]; then
110 grub-editenv "$grubdir/grubenv" create
111fi
112
113if [ -d "$source_grubdir"/i386-pc ]; then
114 /usr/share/lupin-support/grub-mkimage
115fi
116
117# If vestiges of GRUB Legacy still exist, tell the Debian packaging that
118# they can ignore them.
119if [ -e /boot/grub/stage2 ] && [ -e /boot/grub/menu.lst ]; then
120 touch /boot/grub/grub2-installed
121fi
122
123echo "Installation finished. No error reported." >&2
124echo >&2
125
126exit 0
0127
=== added directory 'data/custom-installation/patch/i386'
=== added file 'data/custom-installation/patch/i386/libparted.so.0.0.1'
1Binary files data/custom-installation/patch/i386/libparted.so.0.0.1 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/i386/libparted.so.0.0.1 2015-05-16 19:21:21 +0000 differ128Binary files data/custom-installation/patch/i386/libparted.so.0.0.1 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/i386/libparted.so.0.0.1 2015-05-16 19:21:21 +0000 differ
=== added file 'data/custom-installation/patch/i386/parted_server'
2Binary files data/custom-installation/patch/i386/parted_server 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/i386/parted_server 2015-05-16 19:21:21 +0000 differ129Binary files data/custom-installation/patch/i386/parted_server 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/i386/parted_server 2015-05-16 19:21:21 +0000 differ
=== added file 'data/custom-installation/patch/loop-remount'
--- data/custom-installation/patch/loop-remount 1970-01-01 00:00:00 +0000
+++ data/custom-installation/patch/loop-remount 2015-05-16 19:21:21 +0000
@@ -0,0 +1,14 @@
1#! /bin/sh
2set -e
3
4filename="/usr/share/initramfs-tools/scripts/local"
5oldvalue='mount ${roflag} -o loop -t ${FSTYPE} ${LOOPFLAGS} "/host/${LOOP#/}" ${rootmnt}'
6newvalue='loopdev=`losetup -f`; losetup ${loopdev} "/host/${LOOP#/}"; mount ${roflag} -t ${FSTYPE} ${LOOPFLAGS} ${loopdev} ${rootmnt}'
7
8if [ -f $filename ]; then
9 if cat $filename | grep "$oldvalue" >/dev/null; then
10 sed -i "s%$oldvalue%$newvalue%g" $filename
11 fi
12fi
13
14exit 0
015
=== added directory 'data/custom-installation/patch/x86_64'
=== added file 'data/custom-installation/patch/x86_64/libparted.so.0.0.1'
1Binary files data/custom-installation/patch/x86_64/libparted.so.0.0.1 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/x86_64/libparted.so.0.0.1 2015-05-16 19:21:21 +0000 differ16Binary files data/custom-installation/patch/x86_64/libparted.so.0.0.1 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/x86_64/libparted.so.0.0.1 2015-05-16 19:21:21 +0000 differ
=== added file 'data/custom-installation/patch/x86_64/parted_server'
2Binary files data/custom-installation/patch/x86_64/parted_server 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/x86_64/parted_server 2015-05-16 19:21:21 +0000 differ17Binary files data/custom-installation/patch/x86_64/parted_server 1970-01-01 00:00:00 +0000 and data/custom-installation/patch/x86_64/parted_server 2015-05-16 19:21:21 +0000 differ
=== modified file 'data/isolist.ini'
--- data/isolist.ini 2014-10-16 14:21:48 +0000
+++ data/isolist.ini 2015-05-16 19:21:21 +0000
@@ -1,5 +1,5 @@
1[DEFAULT]1[DEFAULT]
2version=14.102version=15.04
3info_file=.disk/info3info_file=.disk/info
4kernel=casper/vmlinuz4kernel=casper/vmlinuz
5initrd=casper/initrd.lz5initrd=casper/initrd.lz
@@ -20,9 +20,9 @@
20arch=i38620arch=i386
21name=Ubuntu21name=Ubuntu
22packages=ubuntu-desktop22packages=ubuntu-desktop
23metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-i386.metalink23metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-desktop-i386.metalink
24#metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-beta-desktop-i386.metalink24#metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-beta-desktop-i386.metalink
25metalink2=http://cdimage.ubuntu.com/daily-live/current/utopic-desktop-i386.metalink25metalink2=http://cdimage.ubuntu.com/daily-live/current/vivid-desktop-i386.metalink
26website=http://www.ubuntu.com26website=http://www.ubuntu.com
27ordering=127ordering=1
2828
@@ -31,9 +31,9 @@
31name=Ubuntu31name=Ubuntu
32packages=ubuntu-desktop32packages=ubuntu-desktop
33kernel=casper/vmlinuz.efi33kernel=casper/vmlinuz.efi
34metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-amd64.metalink34metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-desktop-amd64.metalink
35#metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-beta-desktop-amd64.metalink35#metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-beta-desktop-amd64.metalink
36metalink2=http://cdimage.ubuntu.com/daily-live/current/utopic-desktop-amd64.metalink36metalink2=http://cdimage.ubuntu.com/daily-live/current/vivid-desktop-amd64.metalink
37website=http://www.ubuntu.com37website=http://www.ubuntu.com
38ordering=138ordering=1
3939
@@ -41,8 +41,8 @@
41arch=i38641arch=i386
42name=Kubuntu42name=Kubuntu
43packages=kubuntu-desktop43packages=kubuntu-desktop
44metalink=http://cdimage.ubuntu.com/kubuntu/releases/14.10/release/kubuntu-14.10-desktop-i386.metalink44metalink=http://cdimage.ubuntu.com/kubuntu/releases/15.04/release/kubuntu-15.04-desktop-i386.metalink
45metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/utopic-desktop-i386.metalink45metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/vivid-desktop-i386.metalink
46website=http://www.kubuntu.org46website=http://www.kubuntu.org
47ordering=347ordering=3
4848
@@ -50,8 +50,9 @@
50arch=amd6450arch=amd64
51name=Kubuntu51name=Kubuntu
52packages=kubuntu-desktop52packages=kubuntu-desktop
53metalink=http://cdimage.ubuntu.com/kubuntu/releases/14.10/release/kubuntu-14.10-desktop-amd64.metalink53kernel=casper/vmlinuz.efi
54metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/utopic-desktop-amd64.metalink54metalink=http://cdimage.ubuntu.com/kubuntu/releases/15.04/release/kubuntu-15.04-desktop-amd64.metalink
55metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/vivid-desktop-amd64.metalink
55website=http://www.kubuntu.org56website=http://www.kubuntu.org
56ordering=357ordering=3
5758
@@ -59,8 +60,8 @@
59arch=i38660arch=i386
60name=Mythbuntu61name=Mythbuntu
61packages=ubuntu-standard62packages=ubuntu-standard
62metalink=http://cdimage.ubuntu.com/mythbuntu/releases/14.10/release/mythbuntu-14.10-desktop-i386.metalink63metalink=http://cdimage.ubuntu.com/mythbuntu/releases/15.04/release/mythbuntu-15.04-desktop-i386.metalink
63metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/utopic-desktop-i386.metalink64metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/vivid-desktop-i386.metalink
64website=http://www.mythbuntu.org65website=http://www.mythbuntu.org
65ordering=566ordering=5
6667
@@ -68,8 +69,9 @@
68arch=amd6469arch=amd64
69name=Mythbuntu70name=Mythbuntu
70packages=ubuntu-standard71packages=ubuntu-standard
71metalink=http://cdimage.ubuntu.com/mythbuntu/releases/14.10/release/mythbuntu-14.10-desktop-amd64.metalink72kernel=casper/vmlinuz.efi
72metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/utopic-desktop-amd64.metalink73metalink=http://cdimage.ubuntu.com/mythbuntu/releases/15.04/release/mythbuntu-15.04-desktop-amd64.metalink
74metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/vivid-desktop-amd64.metalink
73website=http://www.mythbuntu.org75website=http://www.mythbuntu.org
74ordering=576ordering=5
7577
@@ -81,8 +83,8 @@
81arch=i38683arch=i386
82name=Edubuntu84name=Edubuntu
83packages=edubuntu-desktop85packages=edubuntu-desktop
84metalink=http://cdimage.ubuntu.com/edubuntu/releases/14.10/release/edubuntu-14.10-dvd-i386.metalink86metalink=http://cdimage.ubuntu.com/edubuntu/releases/15.04/release/edubuntu-15.04-dvd-i386.metalink
85metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/utopic-dvd-i386.metalink87metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/vivid-dvd-i386.metalink
86website=http://www.edubuntu.org88website=http://www.edubuntu.org
87ordering=689ordering=6
8890
@@ -95,8 +97,8 @@
95name=Edubuntu97name=Edubuntu
96packages=edubuntu-desktop98packages=edubuntu-desktop
97kernel=casper/vmlinuz.efi99kernel=casper/vmlinuz.efi
98metalink=http://cdimage.ubuntu.com/edubuntu/releases/14.10/release/edubuntu-14.10-dvd-amd64.metalink100metalink=http://cdimage.ubuntu.com/edubuntu/releases/15.04/release/edubuntu-15.04-dvd-amd64.metalink
99metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/utopic-dvd-amd64.metalink101metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/vivid-dvd-amd64.metalink
100website=http://www.edubuntu.org102website=http://www.edubuntu.org
101ordering=6103ordering=6
102104
@@ -104,8 +106,8 @@
104arch=i386106arch=i386
105name=Lubuntu107name=Lubuntu
106packages=lubuntu-desktop108packages=lubuntu-desktop
107metalink=http://cdimage.ubuntu.com/lubuntu/releases/14.10/release/lubuntu-14.10-desktop-i386.metalink109metalink=http://cdimage.ubuntu.com/lubuntu/releases/15.04/release/lubuntu-15.04-desktop-i386.metalink
108metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/utopic-desktop-i386.metalink110metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/vivid-desktop-i386.metalink
109website=http://lubuntu.net111website=http://lubuntu.net
110ordering=7112ordering=7
111113
@@ -113,8 +115,9 @@
113arch=amd64115arch=amd64
114name=Lubuntu116name=Lubuntu
115packages=lubuntu-desktop117packages=lubuntu-desktop
116metalink=http://cdimage.ubuntu.com/lubuntu/releases/14.10/release/lubuntu-14.10-desktop-amd64.metalink118kernel=casper/vmlinuz.efi
117metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/utopic-desktop-amd64.metalink119metalink=http://cdimage.ubuntu.com/lubuntu/releases/15.04/release/lubuntu-15.04-desktop-amd64.metalink
120metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/vivid-desktop-amd64.metalink
118website=http://lubuntu.net121website=http://lubuntu.net
119ordering=7122ordering=7
120123
@@ -126,8 +129,8 @@
126arch=i386129arch=i386
127name=Ubuntu Studio130name=Ubuntu Studio
128packages=ubuntustudio-desktop131packages=ubuntustudio-desktop
129metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/14.10/release/ubuntustudio-14.10-dvd-i386.metalink132metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/15.04/release/ubuntustudio-15.04-dvd-i386.metalink
130metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/utopic-dvd-i386.metalink133metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/vivid-dvd-i386.metalink
131website=http://ubuntustudio.org134website=http://ubuntustudio.org
132ordering=8135ordering=8
133136
@@ -139,8 +142,8 @@
139arch=amd64142arch=amd64
140name=Ubuntu Studio143name=Ubuntu Studio
141packages=ubuntustudio-desktop144packages=ubuntustudio-desktop
142metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/14.10/release/ubuntustudio-14.10-dvd-amd64.metalink145metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/15.04/release/ubuntustudio-15.04-dvd-amd64.metalink
143metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/utopic-dvd-amd64.metalink146metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/vivid-dvd-amd64.metalink
144website=http://ubuntustudio.org147website=http://ubuntustudio.org
145ordering=8148ordering=8
146149
147150
=== modified file 'data/preseed.lupin' (properties changed: -x to +x)
--- data/preseed.lupin 2014-10-16 14:21:48 +0000
+++ data/preseed.lupin 2015-05-16 19:21:21 +0000
@@ -29,13 +29,14 @@
29d-i mirror/http/proxy string29d-i mirror/http/proxy string
3030
31## SUITE31## SUITE
32d-i mirror/suite string utopic32d-i mirror/suite string vivid
3333
34## PARTITIONING34## PARTITIONING
35$(partitioning)35$(partitioning)
36d-i partman/confirm_write_new_label boolean true36d-i partman/confirm_write_new_label boolean true
37d-i partman/choose_partition select finish37d-i partman/choose_partition select finish
38d-i partman/confirm boolean true38d-i partman/confirm boolean true
39d-i partman/confirm_nooverwrite select continue
39d-i partman/filter_mounted boolean false40d-i partman/filter_mounted boolean false
40d-i ubiquity/partman-skip-unmount boolean true41d-i ubiquity/partman-skip-unmount boolean true
4142
4243
=== modified file 'data/preseed.mythbuntu' (properties changed: -x to +x)
--- data/preseed.mythbuntu 2014-10-16 14:21:48 +0000
+++ data/preseed.mythbuntu 2015-05-16 19:21:21 +0000
@@ -29,13 +29,14 @@
29d-i mirror/http/proxy string29d-i mirror/http/proxy string
3030
31## SUITE31## SUITE
32d-i mirror/suite string utopic32d-i mirror/suite string vivid
3333
34## PARTITIONING34## PARTITIONING
35$(partitioning)35$(partitioning)
36d-i partman/confirm_write_new_label boolean true36d-i partman/confirm_write_new_label boolean true
37d-i partman/choose_partition select finish37d-i partman/choose_partition select finish
38d-i partman/confirm boolean true38d-i partman/confirm boolean true
39d-i partman/confirm_nooverwrite select continue
39d-i partman/filter_mounted boolean false40d-i partman/filter_mounted boolean false
40d-i ubiquity/partman-skip-unmount boolean true41d-i ubiquity/partman-skip-unmount boolean true
4142
4243
=== modified file 'data/wubildr.cfg'
--- data/wubildr.cfg 2011-07-26 19:32:51 +0000
+++ data/wubildr.cfg 2015-05-16 19:21:21 +0000
@@ -4,6 +4,7 @@
4 if loopback loop0 /ubuntu/disks/root.disk; then4 if loopback loop0 /ubuntu/disks/root.disk; then
5 set root=(loop0)5 set root=(loop0)
6 if [ -e /boot/grub/grub.cfg ]; then6 if [ -e /boot/grub/grub.cfg ]; then
7 set prefix=($root)'/boot/grub'
7 if configfile /boot/grub/grub.cfg; then8 if configfile /boot/grub/grub.cfg; then
8 set show_panic_message=false9 set show_panic_message=false
9 fi10 fi
1011
=== modified file 'debian/changelog'
--- debian/changelog 2014-10-20 15:31:24 +0000
+++ debian/changelog 2015-05-16 19:21:21 +0000
@@ -1,3 +1,41 @@
1wubi (15.04) vivid; urgency=low
2
3 [Hakuna Matata]
4
5 * systemd fix for not working mount-move commands in /bin/autopartition-loop
6
7wubi (15.04) vivid; urgency=low
8
9 [Hakuna Matata]
10
11 * EFI support
12 * Windows: BCD entries for UEFI, disable Hibernate and Fast Startup
13 * Ubuntu: GRUB for x86_64-efi platform
14
15wubi (15.04) vivid; urgency=low
16
17 [Hakuna Matata]
18
19 * Bypass Ubiquity bug (LP: #1385930):
20 Use libparted and parted_server version of 14.04
21
22wubi (15.04) vivid; urgency=low
23
24 [Hakuna Matata]
25
26 * loop-remount (LP: #1317437):
27 allow remounting of loop device as read-write
28 patch is necessary because of unreleased fix
29 https://code.launchpad.net/~noorez-kassam/ubuntu/utopic/initramfs-tools/fix-for-1317437
30
31wubi (15.04) vivid; urgency=low
32
33 [Hakuna Matata]
34
35 * Bump to 15.04
36 * Use vmlinuz.efi on all amd64 ISOs except Ubuntu Studio
37 * Set confirm_nooverwrite on preseeds
38
1wubi (14.10) utopic; urgency=medium39wubi (14.10) utopic; urgency=medium
240
3 [ St├ęphane Graber ]41 [ St├ęphane Graber ]
442
=== modified file 'src/wubi/application.py'
--- src/wubi/application.py 2013-04-23 04:44:13 +0000
+++ src/wubi/application.py 2015-05-16 19:21:21 +0000
@@ -151,11 +151,6 @@
151 log.error(message)151 log.error(message)
152 self.get_frontend().show_error_message(message)152 self.get_frontend().show_error_message(message)
153 self.quit()153 self.quit()
154 if self.info.efi:
155 message = "Wubi does not currently support EFI"
156 log.error(message)
157 self.get_frontend().show_error_message(message)
158 self.quit()
159 log.info("Running the installer...")154 log.info("Running the installer...")
160 self.frontend = self.get_frontend()155 self.frontend = self.get_frontend()
161 self.frontend.show_installation_settings()156 self.frontend.show_installation_settings()
162157
=== modified file 'src/wubi/backends/win32/backend.py'
--- src/wubi/backends/win32/backend.py 2013-04-23 04:44:13 +0000
+++ src/wubi/backends/win32/backend.py 2015-05-16 19:21:21 +0000
@@ -569,6 +569,62 @@
569 efi = True569 efi = True
570 log.debug('EFI boot = %s' % efi)570 log.debug('EFI boot = %s' % efi)
571 return efi571 return efi
572
573 def modify_EFI_folder(self, associated_task,bcdedit):
574 command = [bcdedit, '/enum', '{bootmgr}']
575 boot_drive = run_command(command)
576 boot_drive = boot_drive[boot_drive.index('partition=')+10:]
577 boot_drive = boot_drive[:boot_drive.index('\r')]
578 log.debug("EFI boot partition %s" % boot_drive)
579 # if EFI boot partition is mounted we use it
580 if boot_drive[1]==':':
581 efi_drive = boot_drive
582 else:
583 for efi_drive in 'HIJKLMNOPQRSTUVWXYZ':
584 drive = Drive(efi_drive)
585 if not drive.type:
586 break
587 efi_drive = efi_drive + ':'
588 log.debug("Temporary EFI drive %s" % efi_drive)
589 if efi_drive != boot_drive:
590 run_command(['mountvol', efi_drive, '/s'])
591 src = join_path(self.info.root_dir, 'winboot','EFI')
592 src.replace(' ', '_')
593 src.replace('__', '_')
594 dest = join_path(efi_drive, 'EFI',self.info.target_dir[3:])
595 dest.replace(' ', '_')
596 dest.replace('__', '_')
597 if not os.path.exists(dest):
598 shutil.os.mkdir(dest)
599 dest = join_path(dest,'wubildr')
600 if os.path.exists(dest):
601 shutil.rmtree(dest)
602 log.debug('Copying EFI folder %s -> %s' % (src, dest))
603 shutil.copytree(src, dest)
604 if efi_drive != boot_drive:
605 run_command(['mountvol', efi_drive, '/d'])
606 efi_path = join_path(dest, 'shimx64.efi')[2:]
607 return efi_path
608
609 def undo_EFI_folder(self, associated_task):
610 for efi_drive in 'HIJKLMNOPQRSTUVWXYZ':
611 drive = Drive(efi_drive)
612 if not drive.type:
613 break
614 efi_drive = efi_drive + ':'
615 log.debug("Temporary EFI drive %s" % efi_drive)
616 try:
617 run_command(['mountvol', efi_drive, '/s'])
618 dest = join_path(efi_drive, 'EFI',self.info.previous_target_dir[3:],'wubildr')
619 dest.replace(' ', '_')
620 dest.replace('__', '_')
621 if os.path.exists(dest):
622 log.debug('Removing EFI folder %s' % dest)
623 shutil.rmtree(dest)
624 run_command(['mountvol', efi_drive, '/d'])
625 except Exception, err: #this shouldn't be fatal
626 log.error(err)
627 return
572628
573 def modify_bootloader(self, associated_task):629 def modify_bootloader(self, associated_task):
574 for drive in self.info.drives:630 for drive in self.info.drives:
@@ -597,6 +653,11 @@
597 if os.path.isfile(f):653 if os.path.isfile(f):
598 os.unlink(f)654 os.unlink(f)
599655
656 if self.info.efi:
657 log.debug("Undo EFI boot")
658 self.undo_EFI_folder(associated_task)
659 run_command(['powercfg', '/h', 'on'])
660
600 def modify_bootini(self, drive, associated_task):661 def modify_bootini(self, drive, associated_task):
601 log.debug("modify_bootini %s" % drive.path)662 log.debug("modify_bootini %s" % drive.path)
602 bootini = join_path(drive.path, 'boot.ini')663 bootini = join_path(drive.path, 'boot.ini')
@@ -712,6 +773,24 @@
712 log.debug("BCD has already been modified")773 log.debug("BCD has already been modified")
713 return774 return
714775
776 if self.info.efi:
777 log.debug("EFI boot")
778 efi_path = self.modify_EFI_folder(associated_task,bcdedit)
779 run_command(['powercfg', '/h', 'off'])
780 command = [bcdedit, '/copy', '{bootmgr}', '/d', '%s' % self.info.distro.name]
781 id = run_command(command)
782 id = id[id.index('{'):id.index('}')+1]
783 run_command([bcdedit, '/set', id, 'path', efi_path])
784 run_command([bcdedit, '/set', '{fwbootmgr}', 'displayorder', id, '/addlast'])
785 run_command([bcdedit, '/set', '{fwbootmgr}', 'timeout', '10'])
786 run_command([bcdedit, '/set', '{fwbootmgr}', 'bootsequence', id])
787 registry.set_value(
788 'HKEY_LOCAL_MACHINE',
789 self.info.registry_key,
790 'VistaBootDrive',
791 id)
792 return
793
715 command = [bcdedit, '/create', '/d', '%s' % self.info.distro.name, '/application', 'bootsector']794 command = [bcdedit, '/create', '/d', '%s' % self.info.distro.name, '/application', 'bootsector']
716 id = run_command(command)795 id = run_command(command)
717 id = id[id.index('{'):id.index('}')+1]796 id = id[id.index('{'):id.index('}')+1]

Subscribers

People subscribed via source and target branches

to status/vote changes: