5

I am reading a link that explains what partitions exist in Android.

Can someone tell what is the purpose of ramdisk in Android ?

The link says ramdisk is present (along with the kernel) in /boot partition. However, when I try to do some searching based on that, I encounter pages where people try to copy boot.img and ramdisk.img to the phone.

Is ramdisk part of boot ?

Thanks.

2

Ramdisk

ramdisk.img is a small partition image that is mounted read-only by the kernel at boot time. It only contains /init and a few config files. It is used to start to init which will mount the rest of the system images properly and run the init procedure. A Ramdisk is a standard Linux feature.

The ramdisk is in the boot image and also in the recovery image which is kind of boot image

Here is the tree for unpacked the boot image (Inside the boot.img):

.
├── dt.img
├── img_info
├── kernel
├── ramdisk
│   ├── data
│   ├── default.prop
│   ├── dev
│   ├── file_contexts
│   ├── fstab.goldfish
│   ├── fstab.ranchu
│   ├── fstab.universal3475
│   ├── init
│   ├── init.baseband.rc
│   ├── init.carrier.rc
│   ├── init.container.rc
│   ├── init.environ.rc
│   ├── init.fac.rc
│   ├── init.goldfish.rc
│   ├── init.ranchu.rc
│   ├── init.rc
│   ├── init.rilcarrier.rc
│   ├── init.rilchip.rc
│   ├── init.rilcommon.rc
│   ├── init.trace.rc
│   ├── init.universal3475.rc
│   ├── init.universal3475.usb.rc
│   ├── init.usb.configfs.rc
│   ├── init.usb.rc
│   ├── init.wifi.rc
│   ├── init.zygote32.rc
│   ├── lib
│   │   └── modules
│   ├── oem
│   ├── postrecovery.do
│   ├── proc
│   ├── property_contexts
│   ├── publiccert.pem
│   ├── sbin
│   │   ├── adbd
│   │   ├── bgcompact
│   │   ├── cbd
│   │   ├── emmc_quickverify
│   │   ├── ffu
│   │   ├── firmware_key.cer
│   │   ├── healthd
│   │   ├── knox_changer
│   │   ├── sverifysignature
│   │   ├── ueventd -> ../init
│   │   └── watchdogd -> ../init
│   ├── seapp_contexts
│   ├── sepolicy
│   ├── sepolicy_version
│   ├── service_contexts
│   ├── sys
│   ├── system
│   ├── ueventd.goldfish.rc
│   ├── ueventd.ranchu.rc
│   ├── ueventd.rc
│   └── ueventd.universal3475.rc
└── ramdisk.packed
1

The Android ramdisk is the same as the normal linux ramdisk. It's used to start init which then mounts all the normal partitions (normal linux boot procedure).

Have a look here for more details: https://www.ibm.com/developerworks/library/l-initrd/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.