[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Root is in RO after boot



Kenneth Parker wrote:

> I've been wrong before.  So are you saying that initrd is called without /
> being mounted at all!
> 

there is init script inside the initrd (which is an archive that gets
extracted into memory)

the init script there is a complex set of scripts that do various tasks,
before the boot process can be handed over to the system installed on disk.

this includes loading of drivers and mounting the root file system.

initially (when this init script loads the drivers, probably asks for luks
passphrase and enables logical volumes) it is mounted ro and when it hands
over it remounts to rw. from there on, the init (binary or systemd) is
executed and handles the second stage of the boot process.

https://wiki.debian.org/initramfs

you can check also
        /etc/initramfs-tools/scripts/
or
        /usr/share/initramfs-tools/scripts/


you can extract the initrd and study it, it is very interesting

regards


Reply to: