summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh47
1 files changed, 25 insertions, 22 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 8bd70251cd..34c2ae3066 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -123,34 +123,32 @@ mkfs.ext3 $rootfs
123echo "Formatting swap partition...($swap)" 123echo "Formatting swap partition...($swap)"
124mkswap $swap 124mkswap $swap
125 125
126mkdir /ssd 126mkdir /tgt_root
127mkdir /rootmnt 127mkdir /src_root
128mkdir /bootmnt 128mkdir -p /boot
129
130mount $rootfs /ssd
131mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /rootmnt
132 129
130# Handling of the target root partition
131mount $rootfs /tgt_root
132mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
133echo "Copying rootfs files..." 133echo "Copying rootfs files..."
134cp -a /rootmnt/* /ssd 134cp -a /src_root/* /tgt_root
135 135if [ -d /tgt_root/etc/ ] ; then
136if [ -d /ssd/etc/ ] ; then 136 echo "$swap swap swap defaults 0 0" >> /tgt_root/etc/fstab
137 echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab 137 echo "$bootfs /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
138
139 # We dont want udev to mount our root device while we're booting... 138 # We dont want udev to mount our root device while we're booting...
140 if [ -d /ssd/etc/udev/ ] ; then 139 if [ -d /tgt_root/etc/udev/ ] ; then
141 echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist 140 echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
142 fi 141 fi
143fi 142fi
144 143
145umount /ssd 144umount /src_root
146umount /rootmnt
147 145
146# Handling of the target boot partition
147mount $bootfs /boot
148echo "Preparing boot partition..." 148echo "Preparing boot partition..."
149mount $bootfs /ssd
150 149
151EFIDIR="/ssd/EFI/BOOT" 150EFIDIR="/boot/EFI/BOOT"
152mkdir -p $EFIDIR 151mkdir -p $EFIDIR
153cp /run/media/$1/vmlinuz /ssd
154# Copy the efi loader 152# Copy the efi loader
155cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR 153cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR
156 154
@@ -171,11 +169,11 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
171fi 169fi
172 170
173if [ -d /run/media/$1/loader ]; then 171if [ -d /run/media/$1/loader ]; then
174 GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf" 172 GUMMIBOOT_CFGS="/tgt_root/loader/entries/*.conf"
175 # copy config files for gummiboot 173 # copy config files for gummiboot
176 cp -dr /run/media/$1/loader /ssd 174 cp -dr /run/media/$1/loader /tgt_root
177 # delete the install entry 175 # delete the install entry
178 rm -f /ssd/loader/entries/install.conf 176 rm -f /tgt_root/loader/entries/install.conf
179 # delete the initrd lines 177 # delete the initrd lines
180 sed -i "/initrd /d" $GUMMIBOOT_CFGS 178 sed -i "/initrd /d" $GUMMIBOOT_CFGS
181 # delete any LABEL= strings 179 # delete any LABEL= strings
@@ -186,7 +184,12 @@ if [ -d /run/media/$1/loader ]; then
186 sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS 184 sed -i "s@options *@options root=$rootfs rw $rootwait quiet @" $GUMMIBOOT_CFGS
187fi 185fi
188 186
189umount /ssd 187umount /tgt_root
188
189cp /run/media/$1/vmlinuz /boot
190
191umount /boot
192
190sync 193sync
191 194
192echo "Remove your installation media, and press ENTER" 195echo "Remove your installation media, and press ENTER"