You are not logged in.
I am trying a new init which does not more than run my script. My script contains these lines :
...
mount -t proc proc /proc -o nosuid,noexec,nodev
mount -t sysfs sysfs /sys -o nosuid,noexec,nodev
mount -t devtmpfs dev /dev -o mode=0755,nosuid
...
On boot they output these messages :
mount: proc is already mounted or /proc busy
proc is already mounted on /proc
mount: sysfs is already mounted or /sys busy
mount: dev is already mounted or /dev busy
dev is already mounted on /dev
What mounted them? Is it mkinitcpio?
Reading mkinitcpio's code, I found this :
mount ${fstype:+-t $fstype} -o ${rwopt:-ro}${rootflags:+,$rootflags} "$root" "$1"
which I think translates to
mount -o rw /dev/sda2 /new_root
Last edited by jpgg (2014-04-04 19:08:47)
Offline
mkinitcpio sets up /proc, /sys, /dev and /run.
Offline
I saw them. But this is not the real root.
The real root is mounted at the end of init on /new_root and and it switches to it with the last command switch_root.
I couldn't not find /proc, /dev and /sys mounted on /new_root before the call to switch_root.
However, I just read the manpage for switch_root and I found this :
switch_root moves already mounted /proc, /dev and /sys to newroot and makes newroot the new root filesystem and starts init process.
So, it was switch_root that was moving them on /new_root. Marked as [Solved] !
Offline