@@ -47,18 +47,16 @@ REFKIT_INSTALLER_UEFI_COMBO () {
47
47
48
48
# Might be with or without p in the middle (sda1 vs mmcblk0p1).
49
49
partition =
50
- for i in $output * $gdisk_pnum ; do
50
+ for i in $output $ gdisk_pnum $ output 'p' $gdisk_pnum ; do
51
51
if [ -e "$i" ]; then
52
52
if [ "$partition" ]; then
53
53
fatal "partition #$gdisk_pnum in $output not unique?!"
54
54
fi
55
55
partition = $i
56
- else
57
- fatal "$output*$gdisk_pnum not found in $output"
58
56
fi
59
57
done
60
58
if [ ! "$partition" ]; then
61
- fatal "could not identify parition #$gdisk_pnum in $output"
59
+ fatal "could not identify partition #$gdisk_pnum in $output"
62
60
fi
63
61
64
62
if [ "$uuid" ]; then
@@ -146,6 +144,9 @@ REFKIT_INSTALLER_UEFI_COMBO () {
146
144
if ! execute cp -r "$rootfs/boot/EFI_internal_storage" "$output_mountpoint/EFI" ; then
147
145
fatal "copying EFI files failed"
148
146
fi
147
+ if ! execute cp "$rootfs/boot/rmc.db" "$output_mountpoint/" ; then
148
+ fatal "copying RMC db failed"
149
+ fi
149
150
fi
150
151
if ! sync ; then
151
152
fatal "syncing data failed"
@@ -160,13 +161,14 @@ REFKIT_INSTALLER_UEFI_COMBO () {
160
161
161
162
confirm_install || return 1
162
163
164
+ input_loopdev =
163
165
input_mountpoint =
164
166
input_mounted =
165
167
166
168
cleanup_install_image () {
167
169
[ "$input_mounted" ] && execute umount "$input_mountpoint"
168
170
[ "$input_mountpoint" ] && rmdir "$input_mountpoint"
169
- [ "$input " ] && execute kpartx -d "$input "
171
+ [ "$input_loopdev " ] && execute kpartx -d "$input_loopdev" && losetup - d "$input_loopdev "
170
172
remove_cleanup cleanup_install_image
171
173
}
172
174
add_cleanup cleanup_install_image
@@ -176,6 +178,8 @@ REFKIT_INSTALLER_UEFI_COMBO () {
176
178
loopdev = $(execute kpartx -sav "$input" | tail -1 | sed -e 's/^\(add map \)*\([^ ]*\).*/\2/' )
177
179
if [ ! "$loopdev" ]; then
178
180
fatal "kpartx failed for $input"
181
+ else
182
+ input_loopdev = "/dev/${loopdev%%p[0-9]} "
179
183
fi
180
184
if ! input_mountpoint = $(mktemp -dt input -rootfs . XXXXXX ); then
181
185
fatal "could not create mount point"
0 commit comments