-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Hello folks, I've done some more work on this feature and here's the result:
*) Add rescue command to pykickstart. Synopsis is: ~ rescue [--nomount | --romount]
*) In loader.c - always pass --kickstart <url> to stage 2
*) Add setRescueModeFromKickstart function in anaconda to handle the flag for rescue mode from command line or kickstart. Similar to 'vnc'.
*) In anaconda process the kickstart file if present and we're going in rescue mode.
*) In rescue.py do: ~ - if nomount then execute %post else; ~ - mount rw by default or read only if kickstart tells us to ~ - write to the log instead of popping up windows ~ - at the end execute %post
What is tested with F9 and works is: boot with the following options on cmd line and/or kickstart
cmd line | ks.cfg - ---------------+-------- ~ | rescue ~ rescue | ~ rescue | rescue - ---------------+---------------------> shows that we properly enter rescue mode rescue nomount | rescue nomount | rescue ~ | rescue --nomount - ---------------+---------------------> shows that nomount works properly ~ | rescue --nomount --romount -----> expected kickstart error - ---------------+--------------------- ~ | rescue --romount - ---------------+----------------------> shows that read only mount works [1]
[1] - rescue --romount will work only when we have %post --nochroot. Looks like it first does chroot and then saves the script text under /tmp for execution. This fails as /tmp is on the chrooted read-only file system. Sounds expected to me.
Thanks, Alexander.
All needed changes to enable rescue command in kickstart.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Alexander Todorov wrote: | All needed changes to enable rescue command in kickstart. |
Any update on this one, anybody? Can folks give it a review so then a decision can be made regarding the kickstart support feature in rescue mode.
Thanks, Alexander.
All changes to handle the new rescue command and %post scripts when in rescue mode.
Alexander Todorov wrote:
All changes to handle the new rescue command and %post scripts when in rescue mode.
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
I see all the changes related to the anaconda code in pretty nice shape. It allows the testing of the mountRootPartitions function, which is good. Although it will go with whatever it finds first in the case where there is more than one root, which leaves the testing of findExistintRoots a little short. However I am for commiting this. I'll wait for clumens to give his veredict on the kickstart stuff (which I see also in good shape)
Regards
All changes to handle the new rescue command and %post scripts when in rescue mode.
Looks fine to me, both the anaconda part and the kickstart part. The one question I have is should we run %pre scripts once we grab the kickstart file and before we go looking for partitions to mount? That would fit in with what we do in the normal kickstart case.
- Chris
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Chris Lumens wrote: |> All changes to handle the new rescue command and %post scripts when in rescue mode. | | Looks fine to me, both the anaconda part and the kickstart part. The | one question I have is should we run %pre scripts once we grab the | kickstart file and before we go looking for partitions to mount? That | would fit in with what we do in the normal kickstart case. |
Chris, the line:
kickstart.processKickstartFile(anaconda, opts.ksfile)
in the patch for the 'anaconda' file among other things will execute %pre if any. The same function is executed in the normal kickstart case as well.
- -- Alexander.
*) Add rescue command to pykickstart. Synopsis is: ~ rescue [--nomount | --romount]
*) In loader.c - always pass --kickstart <url> to stage 2
*) Add setRescueModeFromKickstart function in anaconda to handle the flag for rescue mode from command line or kickstart. Similar to 'vnc'.
*) In anaconda process the kickstart file if present and we're going in rescue mode.
*) In rescue.py do: ~ - if nomount then execute %post else; ~ - mount rw by default or read only if kickstart tells us to ~ - write to the log instead of popping up windows ~ - at the end execute %post
What is tested with F9 and works is: boot with the following options on cmd line and/or kickstart
Committed and pushed. Thanks for the patch.
- Chris
anaconda-devel@lists.stg.fedoraproject.org