siimo
June 19th, 2006, 05:53 AM
Hi
As i have been trying to learn programming for Linux I have decided to write a graphical grub editor that I am going to call Grubby for now, just looking for some ideas.
so far the plan is:
1) read in a grub menu.1st on start and showing it to the user in some way
2) read in any lines that aren't a comment starting with #
3) assume lines starting with "title" start a new kernel image and read in all the images and show them to the user: kernel title, image, initrd image (if any), and boot arguments.
4) copy original file to menu.1st.grubbybackup and write an entirely fresh menu.1st from what the program knows
5) provide an interface for adding new images via the user interface and deleting images as well
I haven't considered many things yet and theres other complications too such as - some distros use /etc/grub.conf instead of menu.1st and symbolically link it there.
http://members.lycos.co.uk/siimo2005/grubby/grubby_concept.png
so far a rough UI ^, though I know this is ugly and things are not in their correct place also missing many of the UI (such as a row of checkboxes for displaying/setting the default boot image) and the adding and deleting kernel images. I am just trying to get familiar with GTK+ as you can see. I am considering changing the Kernel and Initrd image text fields above to drop down menus and populating them with everthing in /boot/ what do you think about that?
Feedback is welcome.
As i have been trying to learn programming for Linux I have decided to write a graphical grub editor that I am going to call Grubby for now, just looking for some ideas.
so far the plan is:
1) read in a grub menu.1st on start and showing it to the user in some way
2) read in any lines that aren't a comment starting with #
3) assume lines starting with "title" start a new kernel image and read in all the images and show them to the user: kernel title, image, initrd image (if any), and boot arguments.
4) copy original file to menu.1st.grubbybackup and write an entirely fresh menu.1st from what the program knows
5) provide an interface for adding new images via the user interface and deleting images as well
I haven't considered many things yet and theres other complications too such as - some distros use /etc/grub.conf instead of menu.1st and symbolically link it there.
http://members.lycos.co.uk/siimo2005/grubby/grubby_concept.png
so far a rough UI ^, though I know this is ugly and things are not in their correct place also missing many of the UI (such as a row of checkboxes for displaying/setting the default boot image) and the adding and deleting kernel images. I am just trying to get familiar with GTK+ as you can see. I am considering changing the Kernel and Initrd image text fields above to drop down menus and populating them with everthing in /boot/ what do you think about that?
Feedback is welcome.