2 # Copyright (C) 2010 Vertical Communications
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # Determine if we are requested to mount external root
9 external_root_pivot() {
10 check_skip || [ "$pi_extroot_mount_success" != "true" ] || {
11 echo "switching to external rootfs"
12 if [ "$ER_OVERLAY_ROM" = "/overlay" ]; then
13 if [ "$ER_IS_SQUASHFS" = "true" ]; then
16 mount -o remount,ro / && fopivot /overlay /rom && pi_mount_skip_next=true
17 elif [ "$ER_OVERLAY_ROM" = "/rom" ]; then
18 if [ "$ER_IS_SQUASHFS" = "true" ]; then
21 mount -o remount,ro / && pivot_rom /rom /rom && pi_mount_skip_next=true
26 boot_hook_add preinit_mount_root external_root_pivot