Android 10과 11에서는 1단계 램디스크에 fstab 항목에 의해 지정된 대로 초기 마운트를 실행하는 1단계 init 바이너리와 공급업체 fstab 파일이 포함되어 있습니다. Android 9 이하에서와 마찬가지로 system.img에는 $TARGET_ROOT_OUT의 콘텐츠가 포함되어 있습니다.
부팅 램디스크가 있고 A/B 이외의 기기인 경우 1단계 init은 /init에 있는 정적 실행 파일입니다. 이러한 기기는 system.img를 /system으로 마운트한 다음 루트를 전환하는 작업을 실행하여 /system의 마운트를 /로 이동합니다.
마운트가 완료되면 램디스크 콘텐츠는 해제됩니다.
램디스크로 복구를 사용하는 기기의 경우 1단계 init은 복구 램디스크 내의 /init에 있습니다. 이러한 기기는 먼저 루트를 /first_stage_ramdisk로 전환하여 환경에서 복구 구성요소를 삭제한 후 부팅 램디스크를 사용하는 기기와 동일하게 진행합니다. 즉, system.img를 /system으로 마운트하여 루트를 전환함으로써 해당 마운트를 /로 이동하고 마운트 후 램디스크 콘텐츠를 해제합니다. androidboot.force_normal_boot=1이 커널 명령줄(또는 Android 12 이상의 bootconfig)에 있으면 기기는 복구 모드로 부팅되지 않고 Android로 정상적으로 부팅됩니다.
1단계 init이 끝나면 selinux_setup 인수로 /system/bin/init을 실행하여 SELinux를 컴파일하고 시스템에 로드합니다. 마지막으로 init은 second_stage 인수로 /system/bin/init을 다시 실행합니다. 이 시점에서 init의 주요 단계가 실행되고 init.rc 스크립트를 사용하여 부팅 프로세스를 계속 진행합니다.
다음 섹션에서는 Android 10 이전과 이후, A/B 이외의 기기의 파티션 레이아웃 차이를 설명합니다.
파티션 레이아웃(A/B 이외의 기기)
다음 섹션에서는 Android 10 이전과 이후, A/B 이외의 기기의 파티션 레이아웃 차이를 설명합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Ramdisk partitions\n\n| **Note:** This page applies to Android 11 and lower. For Android 12 and greater, see [Generic boot\n| partition](/docs/core/architecture/bootloader/partitions/generic-boot).\n\nIn Android 10 and 11,\nthe first stage ramdisk\ncontains the first stage init binary (which performs early mounting as specified\nby fstab entries) and vendor fstab files. (As in Android 9 and lower,\n`system.img` contains the contents of `$TARGET_ROOT_OUT`.)\n\n- For devices with a boot-ramdisk (non-A/B), first stage init is a static\n executable located at `/init`. These devices mount `system.img` as `/system`,\n then perform a switch root operation to move the mount at `/system` to `/`.\n The contents of the ramdisk are freed after mounting has completed.\n\n- For devices that use recovery as a ramdisk, first stage init is located at\n `/init` within the recovery ramdisk. These devices first switch root to\n `/first_stage_ramdisk` to remove the recovery components from the environment,\n then proceed the same as devices with a boot-ramdisk (that is, mount\n `system.img` as `/system`, switch root to move that mount to `/`, and free\n ramdisk contents after mounting). If `androidboot.force_normal_boot=1` is\n present in the kernel command line (or bootconfig from Android\n 12 onward), devices boot normally (into Android)\n instead of booting into recovery mode.\n\nAfter first stage init finishes, it executes `/system/bin/init` with the\n`selinux_setup` argument to compile and load SELinux onto the system. Finally,\ninit executes `/system/bin/init` again with the `second_stage` argument. At this\npoint, the main phase of init runs and continues the boot process using the\n`init.rc` scripts.\n| **Note:** Android 10 replaces ramdisk contents with a first stage init executable, which is incompatible with how previous ramdisks booted the system.\n\nThe following sections detail differences in partition layouts for non-A/B\ndevices before and after Android 10.\n\nPartition layouts (non-A/B devices)\n-----------------------------------\n\nThe following sections detail differences in partition layouts for non-A/B\ndevices before and after Android 10.\n\n### boot.img\n\n| Ramdisk *(Android 8.x and lower)* | System as root *(Android 9)* | Ramdisk *(Android 10 and 11)* |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Contains a kernel and a `ramdisk.img`. ``` ramdisk.img -/ - init.rc - init - etc -\u003e /system/etc - system/ (mount point) - vendor/ (mount point) - odm/ (mount point) ... ``` | Contains a normal boot kernel only. | Contains a kernel and `ramdisk.img`. ``` ramdisk.img -/ - init - vendor fstab files - system/ (mount point) - vendor/ (mount point) - odm/ (mount point) ... ``` |\n\n### recovery.img\n\nContains a recovery kernel and a recovery `ramdisk.img`\n\n### system.img\n\n| Ramdisk *(Android 8.x and lower)* | System as root *(Android 9)* | Ramdisk *(Android 10 and 11)* |\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Contains a `system.img`. ``` system.img -/ - bin/ - etc - vendor -\u003e /vendor - ... ``` | Contains the merged contents of `$TARGET_SYSTEM_OUT` and `$TARGET_ROOT_OUT`. ``` system.img -/ - init.rc - init - etc -\u003e /system/etc - system/ - bin/ - etc/ - vendor -\u003e /vendor - ... - vendor/ (mount point) - odm/ (mount point) ... ``` | Contains the merged contents of `$TARGET_SYSTEM_OUT` and `$TARGET_ROOT_OUT`. ``` system.img -/ - init.rc - init -\u003e /system/bin/init - etc -\u003e /system/etc - system/ - bin/ - etc/ - vendor -\u003e /vendor - ... - vendor/ (mount point) - odm/ (mount point) ... ``` |\n\nPartition layouts (A/B devices)\n-------------------------------\n\nThe following sections detail differences in partition layouts for A/B devices\nbefore and after Android 10.\n\n### boot.img\n\n| System as root *(Android 9)* | Ramdisk *(Android 10 and 11)* |\n|------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Contains normal boot kernel and recovery-ramdisk (`BOARD_USES_RECOVERY_AS_BOOT := true`). Recovery-ramdisk is used only to boot into recovery. | Contains normal boot kernel and recovery-ramdisk (`BOARD_USES_RECOVERY_AS_BOOT := true`). Recovery-ramdisk is used to boot into both recovery and Android. ``` ramdisk.img -/ - init -\u003e /system/bin/init - first_stage_ramdisk - vendor fstab files - etc -\u003e /system/etc - system/ (mount point) - vendor/ (mount point) - odm/ (mount point) ... ``` |\n\n### system.img\n\nContains the merged contents of `$TARGET_SYSTEM_OUT` and `$TARGET_ROOT_OUT`. \n\n system.img\n -/\n - init.rc\n - init -\u003e /system/bin/init\n - etc -\u003e /system/etc\n - system/\n - bin/\n - etc/\n - vendor -\u003e /vendor\n - ...\n - vendor/ (mount point)\n - odm/ (mount point)\n ..."]]