Commit Graph

10 Commits (a6b7c3e672764858fd294998406ae791f5964b4a)

Author SHA1 Message Date
李国 a6b7c3e672 x86: generate EFI platform bootable images
Add EFI platform bootable images for x86 platforms. These images can
also boot from legacy BIOS platform.

EFI System Partition need to be fat12/fat16/fat32 (not need to load
filesystem drivers), so the first partition of EFI images are not ext4
filesystem any more.

GPT partition table has an alternate partition table, we did not
generate it. This may cause problems when use these images as qemu disk
(kernel can not find rootfs), we pad enough sectors will be ok.

Signed-off-by: 李国 <uxgood.org@gmail.com>
[part_magic_* refactoring, removed genisoimage checks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Rafał Miłecki bf39047872 treewide: don't hardcode "sysupgrade.tgz" file name
1) Add BACKUP_FILE and use it when copying an archive to be restored
   after sysupgrade (on the next preinit).
2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Tomasz Maciej Nowak c288ad9c2b x86: make sysupgrade.tgz reachable again
Moving binding mount before check for saved sysupgrade configuration
made it unreachable. Fix it by moving binding mount after the check.

Fixes: f78b2616 (x86: mount writable bootfs)
Reported-by: Lucian Cristian <luci@powerneth.ro>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Tomasz Maciej Nowak f78b261637 x86: mount writable bootfs
Mount boot file system with rw option to allow installation of packages
which install files to /boot directory.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
6 years ago
Daniel Golle 63571cb56c x86: keep /boot mounted for kexec
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Yousong Zhou 6f61d8511e base-files: export x86 platform upgrade functions to common.sh
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years ago
Yousong Zhou fa37bdc05a x86: move sysupgrade.tgz only if it exists
To squash error messages at boot time

    mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years ago
Jo-Philipp Wich 1012701014 x86: generalize partition discovery for sysupgrade
Generalize the partition discovery in sysupgrade in order to fix sysupgrade
and config backup/recovery on MMC block devices which use a different naming
scheme compared to mtdblock or sd* devices.

The change also adds the find applet to the ramdisk utilities so that upgrade
code can rely on it.

The commit is based on the initial submission by Russell Senior at
http://patchwork.ozlabs.org/patch/625440/ .

Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
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
9 years ago
Felix Fietkau a14437024c x86: fix sysupgrade
Function move_config should be called after or during preinit_mount_root
hook in do_mount_root function. At this state sysupgrade.tgz is not in its
place during that time when do_mount_root is called. Function move_config
is called later so the sysupgrade.tgz stays in root directory to the second
restart when it is unpacked properly.

This patch adds move_config function to preinit_mount_root hook instead
of preinit_main and changes the filename of script to be called before
80_mount_root is called. It will prepare the sysupgrade archive for do_mount_root
within preinit_mount_root hook.

This patch solves ticket #15042 and #14088.

Signed-off-by: Jiri Slachta <slachta@cesnet.cz>

SVN-Revision: 39996
10 years ago