Comment 0 for bug 175772

Revision history for this message
Agostino Russo (ago) wrote :

Binary package hint: grub

Update-grub does not set kopt correctly in loopinstallations, the following patch should improve the situation. This bug blocks https://blueprints.launchpad.net/ubuntu/+spec/installer-for-windows

300,311c300
< loop_file=$(awk '$2=="/" && $4~"loop" {print $1}' /etc/fstab)
< host_device=$(awk '"'${loop_file}'"~"^"$2 && $2!="/" {print $1}' /proc/mounts)
< host_mountpoint=$(awk '$1=="'${host_device}'" {print $2}' /proc/mounts)
< loop_file=${loop_file#$host_mountpoint}
< if [ -n "$host_device" ]; then
< boot_device=
< root_device="$host_device"
< default_kopt="root=$host_device loop=$loop_file ro"
< else
< default_kopt="root=$root_device ro"
< fi
< kopt="$default_kopt"
---
> kopt="root=$(awk '$2 == "/" {print $1}' /etc/fstab) ro"
836c825
< kopt_2_6="$default_kopt"
---
> kopt_2_6="root=$root_device ro"