Ok, so I have the initial implementation of the fix.
The current chosen solution is:
- Move friendly-recovery to /lib/recovery-mode
- Make it ship its own upstart job starting on "recovery-mode"
- Update initramfs-tools to support a new boot parameter "startup-event" that's passed to init
- Update grub2 to have update-grub set startup-event=recovery-mode instead of setting "single" for recovery entries
- Update upstart to stop calling friendly-recovery from its rcS.conf job
I also updated all the scripts that generate output to wait for user confirmation before going back to the menu.
I introduced a new "remount" script that will trigger mountall to remount all the filesystems in read-write mode.
The "fsck" script has also been changed to no longer require a reboot and to simply trigger the "remount" script but forcing fsck.
Complete changelog for friendly-recovery is:
* Move everything to /lib/recovery-mode/ (LP: #xxxxxx)
* Don't use the fullpath to whiptail
* Small packaging refresh:
- Bump standard to 3.9.2, no change needed
- Drop simple patchsys (no patches)
- No need to depend on bash (essential package)
- Add ${misc:Depends} to dependencies
* Add new init script starting on recovery-mode
* If whiptail can't be found, just start sulogin
* Add a script to start mountall (remount everything read/write)
* Export READONLY to all scripts so they can test on the read/write state
* Disable most scripts when the system is read only
* Change file system check to happen when remount is called
* Wait after all scripts returning output so the user can read it
Ok, so I have the initial implementation of the fix.
The current chosen solution is: event=recovery- mode instead of setting "single" for recovery entries
- Move friendly-recovery to /lib/recovery-mode
- Make it ship its own upstart job starting on "recovery-mode"
- Update initramfs-tools to support a new boot parameter "startup-event" that's passed to init
- Update grub2 to have update-grub set startup-
- Update upstart to stop calling friendly-recovery from its rcS.conf job
I also updated all the scripts that generate output to wait for user confirmation before going back to the menu.
I introduced a new "remount" script that will trigger mountall to remount all the filesystems in read-write mode.
The "fsck" script has also been changed to no longer require a reboot and to simply trigger the "remount" script but forcing fsck.
Complete changelog for friendly-recovery is:
* Move everything to /lib/recovery-mode/ (LP: #xxxxxx)
* Don't use the fullpath to whiptail
* Small packaging refresh:
- Bump standard to 3.9.2, no change needed
- Drop simple patchsys (no patches)
- No need to depend on bash (essential package)
- Add ${misc:Depends} to dependencies
* Add new init script starting on recovery-mode
* If whiptail can't be found, just start sulogin
* Add a script to start mountall (remount everything read/write)
* Export READONLY to all scripts so they can test on the read/write state
* Disable most scripts when the system is read only
* Change file system check to happen when remount is called
* Wait after all scripts returning output so the user can read it
Test packages are available in my experimental PPA at: https:/ /launchpad. net/~stgraber/ +archive/ experimental
(please note it might take a while until everything is done building)