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
1=== modified file 'Makefile'
2--- Makefile 2014-10-20 15:31:24 +0000
3+++ Makefile 2015-05-16 19:21:21 +0000
4@@ -81,6 +81,11 @@
5 loadenv biosdisk part_msdos part_gpt fat ntfs ext2 ntfscomp iso9660 loopback search linux boot minicmd cat cpuid chain halt help ls reboot \
6 echo test configfile gzio normal sleep memdisk tar font gfxterm gettext true vbe vga video_bochs video_cirrus probe
7 cat /usr/lib/grub/i386-pc/lnxboot.img build/grubutil/core.img > build/winboot/wubildr
8+ mkdir -p build/winboot/EFI
9+ grub-mkimage -O x86_64-efi -c build/winboot/wubildr-bootstrap.cfg -m build/winboot/wubildr.tar -o build/winboot/EFI/grubx64.efi \
10+ loadenv part_msdos part_gpt fat ntfs ext2 ntfscomp iso9660 loopback search linux linuxefi boot minicmd cat cpuid chain halt help ls reboot \
11+ echo test configfile gzio normal sleep memdisk tar font gfxterm gettext true efi_gop efi_uga video_bochs video_cirrus probe efifwsetup
12+ cp /usr/lib/shim/shim.efi.signed build/winboot/EFI/shimx64.efi
13
14 winboot: grub4dos grubutil
15 mkdir -p build/winboot
16
17=== modified file 'data/custom-installation/hooks/early-command.sh'
18--- data/custom-installation/hooks/early-command.sh 2009-01-14 01:33:45 +0000
19+++ data/custom-installation/hooks/early-command.sh 2015-05-16 19:21:21 +0000
20@@ -1,2 +1,22 @@
21 #!/bin/sh
22-#Add early commands here
23+set -x
24+
25+if [ -f /custom-installation/hooks/post-installer.sh ]; then
26+ mkdir -p /root/usr/lib/ubiquity/target-config
27+ cp /custom-installation/hooks/post-installer.sh /root/usr/lib/ubiquity/target-config/10post-installer
28+ chmod +x /root/usr/lib/ubiquity/target-config/10post-installer
29+fi
30+
31+architecture=$(uname -m | sed s/i6/i3/)
32+if [ -f /custom-installation/patch/$architecture/parted_server ]; then
33+ cp /custom-installation/patch/$architecture/parted_server /root/usr/bin/parted_server
34+ cp /custom-installation/patch/$architecture/libparted.so.0.0.1 /root/lib/$architecture-linux-gnu/libparted.so.0.0.1
35+ ln -s libparted.so.0.0.1 /root/lib/$architecture-linux-gnu/libparted.so.0
36+fi
37+
38+if [ -f /custom-installation/patch/autopartition-loop ]; then
39+ cp /custom-installation/patch/autopartition-loop /root/bin/autopartition-loop
40+fi
41+
42+
43+
44
45=== added file 'data/custom-installation/hooks/post-installer.sh'
46--- data/custom-installation/hooks/post-installer.sh 1970-01-01 00:00:00 +0000
47+++ data/custom-installation/hooks/post-installer.sh 2015-05-16 19:21:21 +0000
48@@ -0,0 +1,19 @@
49+#!/bin/sh
50+set -x
51+
52+if [ -f /custom-installation/patch/loop-remount ]; then
53+ mkdir -p /target/etc/initramfs-tools/hooks
54+ cp /custom-installation/patch/loop-remount /target/etc/initramfs-tools/hooks/loop-remount
55+ chmod +x /target/etc/initramfs-tools/hooks/loop-remount
56+fi
57+
58+if [ -f /custom-installation/patch/grub-install ] && [ -f /custom-installation/patch/grub-install-efi ] ; then
59+ if [ -d /target/boot/efi ]; then
60+ mkdir -p /target/usr/local/sbin
61+ cp /custom-installation/patch/grub-install /target/usr/local/sbin/grub-install
62+ chmod +x /target/usr/local/sbin/grub-install
63+ cp /custom-installation/patch/grub-install-efi /target/usr/local/sbin/grub-install-efi
64+ chmod +x /target/usr/local/sbin/grub-install-efi
65+ fi
66+fi
67+
68
69=== added directory 'data/custom-installation/patch'
70=== added file 'data/custom-installation/patch/autopartition-loop'
71--- data/custom-installation/patch/autopartition-loop 1970-01-01 00:00:00 +0000
72+++ data/custom-installation/patch/autopartition-loop 2015-05-16 19:21:21 +0000
73@@ -0,0 +1,379 @@
74+#! /bin/sh
75+
76+. /lib/partman/lib/base.sh
77+. /lib/partman/lib/resize.sh
78+. /lib/partman/lib/recipes.sh
79+
80+# busybox wants mount -o move; util-linux wants mount --move. Sigh.
81+if [ -d /lib/debian-installer ]; then
82+ mount_private='-o private'
83+ mount_move='-o move'
84+else
85+ mount_move='--move'
86+ mount_private='--make-private'
87+fi
88+
89+mount $mount_private /
90+
91+modprobe loop >/dev/null 2>&1 || true
92+
93+# Set up working directory.
94+
95+if type mktemp >/dev/null 2>&1; then
96+ recipe_dir="$(mktemp -d /tmp/partman-auto-loop.XXXXXX)"
97+ trap "rm -rf $recipe_dir" EXIT HUP INT QUIT TERM
98+else
99+ recipe_dir=/tmp
100+fi
101+
102+# Fetch parameters.
103+
104+disk="$1"
105+
106+cd $disk
107+
108+if ! db_get partman-auto-loop/partition || [ -z "$RET" ]; then
109+ logger -t partman-auto-loop "Error: No partition number specified in partman-auto-loop/partition"
110+ exit 1
111+fi
112+partition="$RET"
113+
114+if ! db_get partman-auto-loop/recipe || [ -z "$RET" ]; then
115+ logger -t partman-auto-loop "Error: No recipe specified in partman-auto-loop/recipe"
116+ exit 1
117+fi
118+recipe="$RET"
119+echo "$recipe" >"$recipe_dir/loop_recipe"
120+
121+# Find the requested partition.
122+
123+db_progress START 0 5 partman-auto/text/automatically_partition
124+db_progress INFO partman-auto/progress/info
125+
126+partition_id=
127+partition_fs=
128+open_dialog PARTITIONS
129+while { read_line num id size type fs path name; [ "$id" ]; }; do
130+ if [ "$num" = "$partition" ]; then
131+ partition_id="$id"
132+ partition_fs="$fs"
133+ # go ahead and read all remaining input
134+ fi
135+done
136+close_dialog
137+if [ -z "$partition_id" ]; then
138+ logger -t partman-auto-loop "Error: Partition number $partition not found in $disk"
139+ exit 1
140+fi
141+
142+# Set up the requested partition in partman.
143+
144+existing=no
145+for j in $(
146+ for i in /lib/partman/valid_filesystems/*; do
147+ [ -x $i ] || continue
148+ $i $disk $partition_id existing
149+ done
150+); do
151+ if [ "$j" = "$partition_fs" ]; then
152+ existing=yes
153+ fi
154+done
155+
156+if [ "$existing" = no ]; then
157+ logger -t partman-auto-loop "Error: No filesystem on $disk/$partition_id"
158+ exit 1
159+fi
160+
161+echo keep >$partition_id/method
162+rm -f $partition_id/format
163+>$partition_id/use_filesystem
164+echo $partition_fs >$partition_id/filesystem
165+mkdir -p $partition_id/options
166+echo / >$partition_id/mountpoint
167+update_partition $disk $partition_id
168+
169+# Is there enough space to perform the recipe?
170+
171+dev="$disk"
172+oldid="$partition_id"
173+
174+recipe_new=
175+firstword=
176+imagepaths=
177+for word in $(cat "$recipe_dir/loop_recipe"); do
178+ case $word in
179+ .)
180+ recipe_new="${recipe_new:+$recipe_new }\$imagepath{ $firstword } $word"
181+ firstword=
182+ ;;
183+ *)
184+ if [ "$firstword" ]; then
185+ recipe_new="${recipe_new:+$recipe_new }$word"
186+ else
187+ firstword="$word"
188+ imagepaths="${imagepaths:+$imagepaths }$word"
189+ fi
190+ ;;
191+ esac
192+done
193+echo "$recipe_new" >"$recipe_dir/loop_recipe_new"
194+decode_recipe "$recipe_dir/loop_recipe_new" loop
195+
196+db_progress STEP 1
197+
198+fstab="$(
199+ for i in /lib/partman/fstab.d/*; do
200+ [ -x "$i" ] || continue
201+ $i
202+ done |
203+ while read fs mp type options dump pass; do
204+ case $mp in
205+ (/)
206+ echo $fs $mp $type $options $dump $pass
207+ ;;
208+ esac
209+ done
210+)"
211+
212+if [ -z "$fstab" ]; then
213+ logger -t partman-auto-loop "Error: No fstab output for $disk/$partition_id"
214+ exit 1
215+fi
216+
217+mkdir -p /target
218+
219+mountpoint="$(grep "^${fstab%% *} [^ ]* [^ ]* [^ ]*rw" /proc/mounts | cut -d ' ' -f2 | head -n1)" || mountpoint=
220+if [ "$mountpoint" = /target ]; then
221+ # nothing to do
222+ :
223+elif [ "$mountpoint" ]; then
224+ if ! mount $mount_move "$mountpoint" /target; then
225+ logger -t partman-auto-loop "Error: Failed to move $mountpoint to /target"
226+ exit 1
227+ fi
228+ unmount_cmd='umount /target'
229+else
230+ for m in /lib/partman/mount.d/*; do
231+ [ -x "$m" ] || continue
232+
233+ unmount_cmd="$($m "$fstab")"
234+ if [ "$?" = 0 ]; then
235+ break
236+ fi
237+ done
238+fi
239+if [ -d /run ]; then
240+ mkdir -p /run/sendsigs.omit.d
241+ pidof mount.ntfs >> /run/sendsigs.omit.d/ntfs-3g
242+ pidof mount.ntfs-3g >> /run/sendsigs.omit.d/ntfs-3g
243+fi
244+
245+# TODO: handle errors if no mount succeeded
246+mkdir -p /host
247+mount $mount_move /target /host # TODO error handling
248+
249+# Don't try to mount this again later.
250+rm -f $partition_id/mountpoint
251+
252+# Ensure there is enough free space.
253+check_free_space=false
254+requires_disk_space(){
255+ [ "$1" != 0 ] || return
256+ path="$(echo "$*" | sed 's/.*\$imagepath{ *\([^ }]*\) *}.*/\1/')"
257+ [ "$path" != "$*" ] || return
258+ case $path in
259+ /*) ;;
260+ *) path="/$path" ;;
261+ esac
262+ [ -f "/host$path" ] && return
263+ check_free_space=true
264+}
265+foreach_partition 'requires_disk_space $*'
266+
267+# Skip resize_range check if images are already created.
268+if [ $check_free_space = true ]; then
269+ case $partition_fs in
270+ linux-swap|fat16|fat32|hfs|hfs+|hfsx)
271+ get_resize_range
272+ ;;
273+ ext2|ext3|ext4)
274+ if ! search-path tune2fs; then
275+ logger -t partman-auto-loop "Error: tune2fs not found"
276+ exit 1
277+ fi
278+ if ! search-path resize2fs; then
279+ logger -t partman-auto-loop "Error: resize2fs not found"
280+ exit 1
281+ fi
282+ if ! get_ext2_resize_range; then
283+ logger -t partman-auto-loop "Error: Failed to get ext2 resize range for $disk/$partition_id"
284+ exit 1
285+ fi
286+ ;;
287+ ntfs)
288+ if ! search-path ntfsresize; then
289+ logger -t partman-auto-loop "Error: ntfsresize not found"
290+ exit 1
291+ fi
292+ if ! get_ntfs_resize_range; then
293+ db_input critical partman-auto-loop/unclean_ntfs || true
294+ db_go || true
295+ logger -t partman-auto-loop "Error: Failed to get NTFS resize range for $disk/$partition_id"
296+ reboot
297+ exit 1
298+ fi
299+ ;;
300+ *)
301+ logger -t partman-auto-loop "Cannot calculate free space on filesystems of type $partition_fs"
302+ exit 1
303+ ;;
304+ esac
305+ free_size="$(expr \( "$cursize" - "$minsize" \) \* 9 / 10)"
306+ # convert to megabytes
307+ free_size="$(expr 0000000"$free_size" : '0*\(..*\)......$')"
308+ if [ $(min_size) -gt $free_size ]; then
309+ logger -t partman-auto-loop "Error: partman-auto-loop/recipe too large ($(min_size) > $free_size)"
310+ exit 1
311+ fi
312+fi
313+
314+# Ensure that no old loop images are present and mountable.
315+found_images=
316+mkdir -p /tmpmountpoint
317+for path in $imagepaths; do
318+ case $path in
319+ /*) ;;
320+ *) path="/$path" ;;
321+ esac
322+ if [ -e "/host$path" ]; then
323+ if mount -t auto -o loop,ro /host$path /tmpmountpoint 2>/dev/null 3>&-; then
324+ found_images="${found_images:+$found_images }$path"
325+ umount /tmpmountpoint || true
326+ rmdir /tmpmountpoint || true
327+ fi
328+ fi
329+done
330+if [ "$found_images" ]; then
331+ db_progress STOP
332+ db_subst partman-auto-loop/unclean_host PARTITION "$partition"
333+ db_subst partman-auto-loop/unclean_host DISK "$disk"
334+ db_subst partman-auto-loop/unclean_host IMAGES "$found_images"
335+ db_input critical partman-auto-loop/unclean_host || true
336+ db_capb
337+ db_go || true
338+ db_capb backup
339+ umount /host || true
340+ exit 1
341+fi
342+
343+db_progress STEP 1
344+
345+expand_scheme
346+
347+db_progress STEP 1
348+
349+clean_method
350+
351+db_progress STEP 1
352+
353+setup_loop () {
354+ [ "$1" != 0 ] || return
355+ path="$(echo "$*" | sed 's/.*\$imagepath{ *\([^ }]*\) *}.*/\1/')"
356+ [ "$path" != "$*" ] || return
357+
358+ case $path in
359+ /*) ;;
360+ *) path="/$path" ;;
361+ esac
362+ if [ ! -f "/host$path" ]; then
363+ mkdir -p "/host${path%/*}"
364+ if [ "$4" = "linux-swap" ]; then
365+ # swap requires a file with no holes
366+ dd if=/dev/zero of="/host$path" bs="1000000" count="$1"
367+ else
368+ dd if=/dev/zero of="/host$path" bs="1000000" seek="$1" count=0
369+ fi
370+ fi
371+ if ! losetup -f "/host$path"; then
372+ shift
373+ continue
374+ fi
375+ if [ "$4" = linux-swap ]; then
376+ loops="/host$path"
377+ else
378+ loops="$(echo /dev/loop* /dev/loop/*)"
379+ fi
380+ for loop in $loops; do
381+ [ -e "$loop" ] || continue
382+ case $loop in
383+ /dev/loop*)
384+ loopfile="$(losetup "$loop")" || continue
385+ # The following works with both busybox's
386+ # losetup and util-linux's losetup. Yes,
387+ # this is ugly.
388+ loopfile="$(echo "$loopfile" | sed 's,.*\(/host/[^)]*\).*,\1,')"
389+ ;;
390+ *)
391+ loopfile="$loop"
392+ ;;
393+ esac
394+ [ "$loopfile" = "/host$path" ] || continue
395+
396+ dirname="$(echo "$loop" | sed 's:/:=:g')"
397+ dev="$DEVICES/$dirname"
398+
399+ rm -rf "$dev"
400+ mkdir "$dev" || autopartitioning_failed
401+ printf "%s" "$loop" >"$dev/device"
402+ printf "%s" "$1" >"$dev/size"
403+ echo "Loopback on $loopfile" >"$dev/model"
404+ echo "$loopfile" >"$dev/loop"
405+
406+ cd "$dev"
407+ open_dialog OPEN "$(cat "$dev/device")"
408+ read_line response
409+ close_dialog
410+ if [ "$response" = failed ]; then
411+ cd /
412+ rm -rf "$dev"
413+ autopartitioning_failed
414+ fi
415+
416+ open_dialog NEW_LABEL loop
417+ close_dialog
418+
419+ # find the free space
420+ open_dialog PARTITIONS
421+ free_space=
422+ while { read_line num id size type fs path name; [ "$id" ]; }; do
423+ if [ "$fs" = free ]; then
424+ free_space=$id
425+ free_size=$size
426+ fi
427+ done
428+ close_dialog
429+
430+ # create partition in the free space
431+ [ "$free_space" ] || autopartitioning_failed
432+ open_dialog NEW_PARTITION primary $4 $free_space full ${1}000001
433+ read_line num id size type fs path name
434+ close_dialog
435+
436+ shift; shift; shift; shift
437+ setup_partition $id $*
438+ break
439+ done
440+}
441+
442+foreach_partition 'setup_loop $*'
443+
444+db_progress STEP 1
445+
446+update_all
447+
448+apt-install lupin-support
449+
450+db_progress STOP
451+
452+exit 0
453
454=== added file 'data/custom-installation/patch/grub-install'
455--- data/custom-installation/patch/grub-install 1970-01-01 00:00:00 +0000
456+++ data/custom-installation/patch/grub-install 2015-05-16 19:21:21 +0000
457@@ -0,0 +1,13 @@
458+#! /bin/sh
459+set -e
460+
461+if [ -f /usr/sbin/grub-install.real ]; then
462+ if cat /usr/sbin/grub-install | grep "will only work on BIOS" >/dev/null; then
463+ if [ -f /usr/local/sbin/grub-install-efi ]; then
464+ cp -f /usr/local/sbin/grub-install-efi /usr/sbin/grub-install
465+ fi
466+ fi
467+fi
468+
469+/usr/sbin/grub-install "$@"
470+exit $?
471
472=== added file 'data/custom-installation/patch/grub-install-efi'
473--- data/custom-installation/patch/grub-install-efi 1970-01-01 00:00:00 +0000
474+++ data/custom-installation/patch/grub-install-efi 2015-05-16 19:21:21 +0000
475@@ -0,0 +1,126 @@
476+#! /bin/sh
477+set -e
478+
479+# grub-install replacement for use in Wubi installations. This arranges for
480+# the grub bootloader installed on the host (wubildr) to be reinstalled
481+# rather than installing it to a boot sector.
482+#
483+# To get at the real MBR if you wish to do so, use grub-install.real
484+# instead.
485+#
486+# Copyright (C) 2009, 2013 Canonical Ltd.
487+#
488+# Lupin is free software; you can redistribute it and/or modify
489+# it under the terms of the GNU General Public License as published by
490+# the Free Software Foundation; either version 2 of the License, or
491+# (at your option) any later version.
492+#
493+# Lupin is distributed in the hope that it will be useful,
494+# but WITHOUT ANY WARRANTY; without even the implied warranty of
495+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
496+# GNU General Public License for more details.
497+#
498+# You should have received a copy of the GNU General Public License
499+# along with Lupin; if not, write to the Free Software
500+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
501+# 02110-1301, USA.
502+
503+want_passthrough () {
504+ while [ $# -gt 0 ]; do
505+ option="$1"
506+ shift
507+
508+ case $option in
509+ -h|--help|-v|--version)
510+ return 0
511+ ;;
512+ --debug-image)
513+ debug_image="$1"
514+ shift
515+ ;;
516+ --debug-image=*)
517+ debug_image="${option#--debug-image=}"
518+ ;;
519+ esac
520+ done
521+ return 1
522+}
523+
524+if want_passthrough "$@" || ! /usr/share/lupin-support/grub-mkimage --test; then
525+ grub-install.real "$@"
526+ exit $?
527+fi
528+
529+# The C rewrite of grub-install no longer offers --grub-probe or
530+# --grub-mkimage options, so we now have to roll our own installation. This
531+# is arguably clearer anyway, although it's unfortunately verbose.
532+# On the other hand, there is relatively little need to track the real
533+# grub-install code, as it's now in a different language and most of it is
534+# unused here anyway.
535+
536+pkgdatadir=/usr/share/grub
537+localedir=/usr/share/locale
538+grubdir=/boot/grub
539+source_grubdir=/usr/lib/grub
540+
541+# delete existing files in /boot/grub
542+for file in "$grubdir"/*.mod "$grubdir"/*.lst "$grubdir"/*.img "$grubdir"/efiemu??.o; do
543+ if [ -f "$file" ] && [ "$(basename "$file")" != menu.lst ]; then
544+ rm -f "$file"
545+ fi
546+done
547+
548+# delete existing files in /boot/grub/*-pc or /boot/grub/*-efi and install new ones
549+for source_dir in "$source_grubdir"/*-pc "$source_grubdir"/*-efi; do
550+ if [ -d "$source_dir" ]; then
551+ echo "Installing for "$(basename "$source_dir")" platform." >&2
552+ dest_grubdir="$grubdir"/"$(basename "$source_dir")"
553+ mkdir -p "$dest_grubdir"
554+ for file in "$dest_grubdir"/*.mod "$dest_grubdir"/*.lst "$dest_grubdir"/*.img "$dest_grubdir"/efiemu??.o; do
555+ if [ -f "$file" ] && [ "$(basename "$file")" != menu.lst ]; then
556+ rm -f "$file"
557+ fi
558+ done
559+ for file in "$source_dir"/*.mod "$source_dir"/*.lst "$source_dir"/*.img "$source_dir"/efiemu??.o; do
560+ if [ -f "$file" ]; then
561+ cp -f "$file" "$dest_grubdir"
562+ fi
563+ done
564+ fi
565+done
566+
567+mkdir -p "$grubdir/locale"
568+for dir in "$localedir"/* "$localedir-langpack"/*; do
569+ if [ -f "$dir/LC_MESSAGES/grub.mo" ]; then
570+ cp -f "$dir/LC_MESSAGES/grub.mo" "$grubdir/locale/${dir##*/}.mo"
571+ fi
572+done
573+
574+if [ -f "$pkgdatadir/themes/starfield/theme.txt" ]; then
575+ mkdir -p "$grubdir/themes/starfield"
576+ cp "$pkgdatadir/themes/starfield"/* "$grubdir/themes/starfield/"
577+fi
578+
579+if [ -f "$pkgdatadir/unicode.pf2" ]; then
580+ mkdir -p "$grubdir/fonts"
581+ cp "$pkgdatadir/unicode.pf2" "$grubdir/fonts/"
582+fi
583+
584+if [ ! -f "$grubdir/grubenv" ]; then
585+ grub-editenv "$grubdir/grubenv" create
586+fi
587+
588+if [ -d "$source_grubdir"/i386-pc ]; then
589+ /usr/share/lupin-support/grub-mkimage
590+fi
591+
592+# If vestiges of GRUB Legacy still exist, tell the Debian packaging that
593+# they can ignore them.
594+if [ -e /boot/grub/stage2 ] && [ -e /boot/grub/menu.lst ]; then
595+ touch /boot/grub/grub2-installed
596+fi
597+
598+echo "Installation finished. No error reported." >&2
599+echo >&2
600+
601+exit 0
602
603=== added directory 'data/custom-installation/patch/i386'
604=== added file 'data/custom-installation/patch/i386/libparted.so.0.0.1'
605Binary 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
606=== added file 'data/custom-installation/patch/i386/parted_server'
607Binary 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
608=== added file 'data/custom-installation/patch/loop-remount'
609--- data/custom-installation/patch/loop-remount 1970-01-01 00:00:00 +0000
610+++ data/custom-installation/patch/loop-remount 2015-05-16 19:21:21 +0000
611@@ -0,0 +1,14 @@
612+#! /bin/sh
613+set -e
614+
615+filename="/usr/share/initramfs-tools/scripts/local"
616+oldvalue='mount ${roflag} -o loop -t ${FSTYPE} ${LOOPFLAGS} "/host/${LOOP#/}" ${rootmnt}'
617+newvalue='loopdev=`losetup -f`; losetup ${loopdev} "/host/${LOOP#/}"; mount ${roflag} -t ${FSTYPE} ${LOOPFLAGS} ${loopdev} ${rootmnt}'
618+
619+if [ -f $filename ]; then
620+ if cat $filename | grep "$oldvalue" >/dev/null; then
621+ sed -i "s%$oldvalue%$newvalue%g" $filename
622+ fi
623+fi
624+
625+exit 0
626
627=== added directory 'data/custom-installation/patch/x86_64'
628=== added file 'data/custom-installation/patch/x86_64/libparted.so.0.0.1'
629Binary 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
630=== added file 'data/custom-installation/patch/x86_64/parted_server'
631Binary 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
632=== modified file 'data/isolist.ini'
633--- data/isolist.ini 2014-10-16 14:21:48 +0000
634+++ data/isolist.ini 2015-05-16 19:21:21 +0000
635@@ -1,5 +1,5 @@
636 [DEFAULT]
637-version=14.10
638+version=15.04
639 info_file=.disk/info
640 kernel=casper/vmlinuz
641 initrd=casper/initrd.lz
642@@ -20,9 +20,9 @@
643 arch=i386
644 name=Ubuntu
645 packages=ubuntu-desktop
646-metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-i386.metalink
647-#metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-beta-desktop-i386.metalink
648-metalink2=http://cdimage.ubuntu.com/daily-live/current/utopic-desktop-i386.metalink
649+metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-desktop-i386.metalink
650+#metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-beta-desktop-i386.metalink
651+metalink2=http://cdimage.ubuntu.com/daily-live/current/vivid-desktop-i386.metalink
652 website=http://www.ubuntu.com
653 ordering=1
654
655@@ -31,9 +31,9 @@
656 name=Ubuntu
657 packages=ubuntu-desktop
658 kernel=casper/vmlinuz.efi
659-metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-amd64.metalink
660-#metalink=http://releases.ubuntu.com/14.10/ubuntu-14.10-beta-desktop-amd64.metalink
661-metalink2=http://cdimage.ubuntu.com/daily-live/current/utopic-desktop-amd64.metalink
662+metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-desktop-amd64.metalink
663+#metalink=http://releases.ubuntu.com/15.04/ubuntu-15.04-beta-desktop-amd64.metalink
664+metalink2=http://cdimage.ubuntu.com/daily-live/current/vivid-desktop-amd64.metalink
665 website=http://www.ubuntu.com
666 ordering=1
667
668@@ -41,8 +41,8 @@
669 arch=i386
670 name=Kubuntu
671 packages=kubuntu-desktop
672-metalink=http://cdimage.ubuntu.com/kubuntu/releases/14.10/release/kubuntu-14.10-desktop-i386.metalink
673-metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/utopic-desktop-i386.metalink
674+metalink=http://cdimage.ubuntu.com/kubuntu/releases/15.04/release/kubuntu-15.04-desktop-i386.metalink
675+metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/vivid-desktop-i386.metalink
676 website=http://www.kubuntu.org
677 ordering=3
678
679@@ -50,8 +50,9 @@
680 arch=amd64
681 name=Kubuntu
682 packages=kubuntu-desktop
683-metalink=http://cdimage.ubuntu.com/kubuntu/releases/14.10/release/kubuntu-14.10-desktop-amd64.metalink
684-metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/utopic-desktop-amd64.metalink
685+kernel=casper/vmlinuz.efi
686+metalink=http://cdimage.ubuntu.com/kubuntu/releases/15.04/release/kubuntu-15.04-desktop-amd64.metalink
687+metalink2=http://cdimage.ubuntu.com/kubuntu/daily-live/current/vivid-desktop-amd64.metalink
688 website=http://www.kubuntu.org
689 ordering=3
690
691@@ -59,8 +60,8 @@
692 arch=i386
693 name=Mythbuntu
694 packages=ubuntu-standard
695-metalink=http://cdimage.ubuntu.com/mythbuntu/releases/14.10/release/mythbuntu-14.10-desktop-i386.metalink
696-metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/utopic-desktop-i386.metalink
697+metalink=http://cdimage.ubuntu.com/mythbuntu/releases/15.04/release/mythbuntu-15.04-desktop-i386.metalink
698+metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/vivid-desktop-i386.metalink
699 website=http://www.mythbuntu.org
700 ordering=5
701
702@@ -68,8 +69,9 @@
703 arch=amd64
704 name=Mythbuntu
705 packages=ubuntu-standard
706-metalink=http://cdimage.ubuntu.com/mythbuntu/releases/14.10/release/mythbuntu-14.10-desktop-amd64.metalink
707-metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/utopic-desktop-amd64.metalink
708+kernel=casper/vmlinuz.efi
709+metalink=http://cdimage.ubuntu.com/mythbuntu/releases/15.04/release/mythbuntu-15.04-desktop-amd64.metalink
710+metalink2=http://cdimage.ubuntu.com/mythbuntu/daily-live/current/vivid-desktop-amd64.metalink
711 website=http://www.mythbuntu.org
712 ordering=5
713
714@@ -81,8 +83,8 @@
715 arch=i386
716 name=Edubuntu
717 packages=edubuntu-desktop
718-metalink=http://cdimage.ubuntu.com/edubuntu/releases/14.10/release/edubuntu-14.10-dvd-i386.metalink
719-metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/utopic-dvd-i386.metalink
720+metalink=http://cdimage.ubuntu.com/edubuntu/releases/15.04/release/edubuntu-15.04-dvd-i386.metalink
721+metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/vivid-dvd-i386.metalink
722 website=http://www.edubuntu.org
723 ordering=6
724
725@@ -95,8 +97,8 @@
726 name=Edubuntu
727 packages=edubuntu-desktop
728 kernel=casper/vmlinuz.efi
729-metalink=http://cdimage.ubuntu.com/edubuntu/releases/14.10/release/edubuntu-14.10-dvd-amd64.metalink
730-metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/utopic-dvd-amd64.metalink
731+metalink=http://cdimage.ubuntu.com/edubuntu/releases/15.04/release/edubuntu-15.04-dvd-amd64.metalink
732+metalink2=http://cdimage.ubuntu.com/edubuntu/dvd/current/vivid-dvd-amd64.metalink
733 website=http://www.edubuntu.org
734 ordering=6
735
736@@ -104,8 +106,8 @@
737 arch=i386
738 name=Lubuntu
739 packages=lubuntu-desktop
740-metalink=http://cdimage.ubuntu.com/lubuntu/releases/14.10/release/lubuntu-14.10-desktop-i386.metalink
741-metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/utopic-desktop-i386.metalink
742+metalink=http://cdimage.ubuntu.com/lubuntu/releases/15.04/release/lubuntu-15.04-desktop-i386.metalink
743+metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/vivid-desktop-i386.metalink
744 website=http://lubuntu.net
745 ordering=7
746
747@@ -113,8 +115,9 @@
748 arch=amd64
749 name=Lubuntu
750 packages=lubuntu-desktop
751-metalink=http://cdimage.ubuntu.com/lubuntu/releases/14.10/release/lubuntu-14.10-desktop-amd64.metalink
752-metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/utopic-desktop-amd64.metalink
753+kernel=casper/vmlinuz.efi
754+metalink=http://cdimage.ubuntu.com/lubuntu/releases/15.04/release/lubuntu-15.04-desktop-amd64.metalink
755+metalink2=http://cdimage.ubuntu.com/lubuntu/daily-live/current/vivid-desktop-amd64.metalink
756 website=http://lubuntu.net
757 ordering=7
758
759@@ -126,8 +129,8 @@
760 arch=i386
761 name=Ubuntu Studio
762 packages=ubuntustudio-desktop
763-metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/14.10/release/ubuntustudio-14.10-dvd-i386.metalink
764-metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/utopic-dvd-i386.metalink
765+metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/15.04/release/ubuntustudio-15.04-dvd-i386.metalink
766+metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/vivid-dvd-i386.metalink
767 website=http://ubuntustudio.org
768 ordering=8
769
770@@ -139,8 +142,8 @@
771 arch=amd64
772 name=Ubuntu Studio
773 packages=ubuntustudio-desktop
774-metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/14.10/release/ubuntustudio-14.10-dvd-amd64.metalink
775-metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/utopic-dvd-amd64.metalink
776+metalink=http://cdimage.ubuntu.com/ubuntustudio/releases/15.04/release/ubuntustudio-15.04-dvd-amd64.metalink
777+metalink2=http://cdimage.ubuntu.com/ubuntustudio/dvd/current/vivid-dvd-amd64.metalink
778 website=http://ubuntustudio.org
779 ordering=8
780
781
782=== modified file 'data/preseed.lupin' (properties changed: -x to +x)
783--- data/preseed.lupin 2014-10-16 14:21:48 +0000
784+++ data/preseed.lupin 2015-05-16 19:21:21 +0000
785@@ -29,13 +29,14 @@
786 d-i mirror/http/proxy string
787
788 ## SUITE
789-d-i mirror/suite string utopic
790+d-i mirror/suite string vivid
791
792 ## PARTITIONING
793 $(partitioning)
794 d-i partman/confirm_write_new_label boolean true
795 d-i partman/choose_partition select finish
796 d-i partman/confirm boolean true
797+d-i partman/confirm_nooverwrite select continue
798 d-i partman/filter_mounted boolean false
799 d-i ubiquity/partman-skip-unmount boolean true
800
801
802=== modified file 'data/preseed.mythbuntu' (properties changed: -x to +x)
803--- data/preseed.mythbuntu 2014-10-16 14:21:48 +0000
804+++ data/preseed.mythbuntu 2015-05-16 19:21:21 +0000
805@@ -29,13 +29,14 @@
806 d-i mirror/http/proxy string
807
808 ## SUITE
809-d-i mirror/suite string utopic
810+d-i mirror/suite string vivid
811
812 ## PARTITIONING
813 $(partitioning)
814 d-i partman/confirm_write_new_label boolean true
815 d-i partman/choose_partition select finish
816 d-i partman/confirm boolean true
817+d-i partman/confirm_nooverwrite select continue
818 d-i partman/filter_mounted boolean false
819 d-i ubiquity/partman-skip-unmount boolean true
820
821
822=== modified file 'data/wubildr.cfg'
823--- data/wubildr.cfg 2011-07-26 19:32:51 +0000
824+++ data/wubildr.cfg 2015-05-16 19:21:21 +0000
825@@ -4,6 +4,7 @@
826 if loopback loop0 /ubuntu/disks/root.disk; then
827 set root=(loop0)
828 if [ -e /boot/grub/grub.cfg ]; then
829+ set prefix=($root)'/boot/grub'
830 if configfile /boot/grub/grub.cfg; then
831 set show_panic_message=false
832 fi
833
834=== modified file 'debian/changelog'
835--- debian/changelog 2014-10-20 15:31:24 +0000
836+++ debian/changelog 2015-05-16 19:21:21 +0000
837@@ -1,3 +1,41 @@
838+wubi (15.04) vivid; urgency=low
839+
840+ [Hakuna Matata]
841+
842+ * systemd fix for not working mount-move commands in /bin/autopartition-loop
843+
844+wubi (15.04) vivid; urgency=low
845+
846+ [Hakuna Matata]
847+
848+ * EFI support
849+ * Windows: BCD entries for UEFI, disable Hibernate and Fast Startup
850+ * Ubuntu: GRUB for x86_64-efi platform
851+
852+wubi (15.04) vivid; urgency=low
853+
854+ [Hakuna Matata]
855+
856+ * Bypass Ubiquity bug (LP: #1385930):
857+ Use libparted and parted_server version of 14.04
858+
859+wubi (15.04) vivid; urgency=low
860+
861+ [Hakuna Matata]
862+
863+ * loop-remount (LP: #1317437):
864+ allow remounting of loop device as read-write
865+ patch is necessary because of unreleased fix
866+ https://code.launchpad.net/~noorez-kassam/ubuntu/utopic/initramfs-tools/fix-for-1317437
867+
868+wubi (15.04) vivid; urgency=low
869+
870+ [Hakuna Matata]
871+
872+ * Bump to 15.04
873+ * Use vmlinuz.efi on all amd64 ISOs except Ubuntu Studio
874+ * Set confirm_nooverwrite on preseeds
875+
876 wubi (14.10) utopic; urgency=medium
877
878 [ St├ęphane Graber ]
879
880=== modified file 'src/wubi/application.py'
881--- src/wubi/application.py 2013-04-23 04:44:13 +0000
882+++ src/wubi/application.py 2015-05-16 19:21:21 +0000
883@@ -151,11 +151,6 @@
884 log.error(message)
885 self.get_frontend().show_error_message(message)
886 self.quit()
887- if self.info.efi:
888- message = "Wubi does not currently support EFI"
889- log.error(message)
890- self.get_frontend().show_error_message(message)
891- self.quit()
892 log.info("Running the installer...")
893 self.frontend = self.get_frontend()
894 self.frontend.show_installation_settings()
895
896=== modified file 'src/wubi/backends/win32/backend.py'
897--- src/wubi/backends/win32/backend.py 2013-04-23 04:44:13 +0000
898+++ src/wubi/backends/win32/backend.py 2015-05-16 19:21:21 +0000
899@@ -569,6 +569,62 @@
900 efi = True
901 log.debug('EFI boot = %s' % efi)
902 return efi
903+
904+ def modify_EFI_folder(self, associated_task,bcdedit):
905+ command = [bcdedit, '/enum', '{bootmgr}']
906+ boot_drive = run_command(command)
907+ boot_drive = boot_drive[boot_drive.index('partition=')+10:]
908+ boot_drive = boot_drive[:boot_drive.index('\r')]
909+ log.debug("EFI boot partition %s" % boot_drive)
910+ # if EFI boot partition is mounted we use it
911+ if boot_drive[1]==':':
912+ efi_drive = boot_drive
913+ else:
914+ for efi_drive in 'HIJKLMNOPQRSTUVWXYZ':
915+ drive = Drive(efi_drive)
916+ if not drive.type:
917+ break
918+ efi_drive = efi_drive + ':'
919+ log.debug("Temporary EFI drive %s" % efi_drive)
920+ if efi_drive != boot_drive:
921+ run_command(['mountvol', efi_drive, '/s'])
922+ src = join_path(self.info.root_dir, 'winboot','EFI')
923+ src.replace(' ', '_')
924+ src.replace('__', '_')
925+ dest = join_path(efi_drive, 'EFI',self.info.target_dir[3:])
926+ dest.replace(' ', '_')
927+ dest.replace('__', '_')
928+ if not os.path.exists(dest):
929+ shutil.os.mkdir(dest)
930+ dest = join_path(dest,'wubildr')
931+ if os.path.exists(dest):
932+ shutil.rmtree(dest)
933+ log.debug('Copying EFI folder %s -> %s' % (src, dest))
934+ shutil.copytree(src, dest)
935+ if efi_drive != boot_drive:
936+ run_command(['mountvol', efi_drive, '/d'])
937+ efi_path = join_path(dest, 'shimx64.efi')[2:]
938+ return efi_path
939+
940+ def undo_EFI_folder(self, associated_task):
941+ for efi_drive in 'HIJKLMNOPQRSTUVWXYZ':
942+ drive = Drive(efi_drive)
943+ if not drive.type:
944+ break
945+ efi_drive = efi_drive + ':'
946+ log.debug("Temporary EFI drive %s" % efi_drive)
947+ try:
948+ run_command(['mountvol', efi_drive, '/s'])
949+ dest = join_path(efi_drive, 'EFI',self.info.previous_target_dir[3:],'wubildr')
950+ dest.replace(' ', '_')
951+ dest.replace('__', '_')
952+ if os.path.exists(dest):
953+ log.debug('Removing EFI folder %s' % dest)
954+ shutil.rmtree(dest)
955+ run_command(['mountvol', efi_drive, '/d'])
956+ except Exception, err: #this shouldn't be fatal
957+ log.error(err)
958+ return
959
960 def modify_bootloader(self, associated_task):
961 for drive in self.info.drives:
962@@ -597,6 +653,11 @@
963 if os.path.isfile(f):
964 os.unlink(f)
965
966+ if self.info.efi:
967+ log.debug("Undo EFI boot")
968+ self.undo_EFI_folder(associated_task)
969+ run_command(['powercfg', '/h', 'on'])
970+
971 def modify_bootini(self, drive, associated_task):
972 log.debug("modify_bootini %s" % drive.path)
973 bootini = join_path(drive.path, 'boot.ini')
974@@ -712,6 +773,24 @@
975 log.debug("BCD has already been modified")
976 return
977
978+ if self.info.efi:
979+ log.debug("EFI boot")
980+ efi_path = self.modify_EFI_folder(associated_task,bcdedit)
981+ run_command(['powercfg', '/h', 'off'])
982+ command = [bcdedit, '/copy', '{bootmgr}', '/d', '%s' % self.info.distro.name]
983+ id = run_command(command)
984+ id = id[id.index('{'):id.index('}')+1]
985+ run_command([bcdedit, '/set', id, 'path', efi_path])
986+ run_command([bcdedit, '/set', '{fwbootmgr}', 'displayorder', id, '/addlast'])
987+ run_command([bcdedit, '/set', '{fwbootmgr}', 'timeout', '10'])
988+ run_command([bcdedit, '/set', '{fwbootmgr}', 'bootsequence', id])
989+ registry.set_value(
990+ 'HKEY_LOCAL_MACHINE',
991+ self.info.registry_key,
992+ 'VistaBootDrive',
993+ id)
994+ return
995+
996 command = [bcdedit, '/create', '/d', '%s' % self.info.distro.name, '/application', 'bootsector']
997 id = run_command(command)
998 id = id[id.index('{'):id.index('}')+1]

Subscribers

People subscribed via source and target branches

to status/vote changes: