Merge lp://qastaging/~csurbhi/upstart/upstart-add-pivot-handling into lp://qastaging/upstart

Proposed by Surbhi Palande
Status: Work in progress
Proposed branch: lp://qastaging/~csurbhi/upstart/upstart-add-pivot-handling
Merge into: lp://qastaging/upstart
Diff against target: 1254 lines (+972/-15)
12 files modified
dbus/com.ubuntu.Upstart.xml (+7/-1)
init/Makefile.am (+12/-11)
init/conf.c (+35/-0)
init/conf.h (+1/-0)
init/control.c (+35/-0)
init/control.h (+3/-0)
init/events.h (+8/-1)
init/paths.h (+8/-0)
init/pivot.c (+616/-0)
init/pivot.h (+66/-0)
init/tests/test_control.c (+106/-1)
util/initctl.c (+75/-1)
To merge this branch: bzr merge lp://qastaging/~csurbhi/upstart/upstart-add-pivot-handling
Reviewer Review Type Date Requested Status
Scott James Remnant Pending
Review via email: mp+64723@code.qastaging.launchpad.net

Description of the change

The pivot command is used for changing the root filesystem in the initramfs from the memory based "/" to the disk based real root filesystem. This command can be issued as follows:

initctl pivot <ROOTFS> <INIT>

where ROOTFS is the root filesystem that we want to move to while in the initramfs. INIT is the first program that we wish to execute once this move to the real root filesystem is made.

This command is intended to be used when upstart is executed in initramfs for making the initramfs event driven.

It is assumed that a user can specify a different ROOTFS, INIT or arguments to this new INIT at the grub command prompt. The console used for logging the messages is /dev/console and is a not a boot argument which can be changed.

This command has no effect when it is executed from a non memory based root filesystem.

This change shall enable upstart to be used as init in the initramfs for making the initramfs event driven. Please do let me know your thoughts on this change.

Thanks!

To post a comment you must log in.
1316. By Surbhi Palande

Initial support to handle a new initctl command: pivot.
Usage: initctl pivot <ROOTFS> <INIT>" "<args>"

This command can be used to change the root filesystem from a initramfs
based rootfs to the new requested <ROOTFS>. On successfully changing the root
filesystem the new <INIT> shall be executed. On failure in handling this
command a pivot-failed event is emitted. This command works as intended
only when fired from initramfs. When fired from any other filesystem, this
command has no effect other than the emission of the "pivot-failed" event.

1317. By Surbhi Palande

Some cleanup related fixes. Expecting one or two more!

1318. By Surbhi Palande

One more typo fix

Unmerged revisions

1318. By Surbhi Palande

One more typo fix

1317. By Surbhi Palande

Some cleanup related fixes. Expecting one or two more!

1316. By Surbhi Palande

Initial support to handle a new initctl command: pivot.
Usage: initctl pivot <ROOTFS> <INIT>" "<args>"

This command can be used to change the root filesystem from a initramfs
based rootfs to the new requested <ROOTFS>. On successfully changing the root
filesystem the new <INIT> shall be executed. On failure in handling this
command a pivot-failed event is emitted. This command works as intended
only when fired from initramfs. When fired from any other filesystem, this
command has no effect other than the emission of the "pivot-failed" event.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches