openwrtv3/target/linux/x86/base-files/lib/preinit/79_move_config
Jo-Philipp Wich 02e2548b84 x86: use PARTUUID instead explicitly specifying the device by default
This changes the x86 image generation to match x86_64, using the PARTUUID for
the rootfs instead of explicitly configuring the device.

It unbreaks KVM with VirtIO, which uses /dev/vda2 instead of /dev/sda2.

Tested in QEMU/KVM with VirtIO, VirtualBox and VMware.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 44966
2015-03-24 10:08:12 +00:00

15 lines
273 B
Bash

#!/bin/sh
# Copyright (C) 2012-2015 OpenWrt.org
move_config() {
. /lib/upgrade/platform.sh
if platform_export_bootpart; then
mount -t ext4 -o rw,noatime "$BOOTPART" /mnt
mv -f /mnt/sysupgrade.tgz /
umount /mnt
fi
}
boot_hook_add preinit_mount_root move_config