Importing Linux Config Files

Google Translate Button


Importing Linux Config Files





This facility lets you import GNU Grub version 2 menu entries from a file generated on your Linux system.


Import is useful when Grub2Win does not support your particular Linux distribution for automatic code generation.



There are literally thousands of Linux distributions available.

It is simply not possible for Grub2Win to automatically generate boot menus for all of them.

The most popular distributions such as Ubuntu, Fedora and Suse are supported.



Here are the steps to import Linux menu entries:



1.        Within Linux, copy the /boot/grub/grub.cfg file to a fat32 flash drive or to a Windows NTFS partition.

   Name the file "linux.grub.cfg".


   For Fedora systems you can also import the .conf files stored in Fedora's /boot/loader/entries directory.

   These files change every time the Fedora kernel is updated and must be imported into Grub2Win again.

   You can avoid this by maintaining a stable kernel name using the xxkernlink.sh script.

   See Fedora and Manjaro.



2.        Examine your linux.grub.cfg file and ensure that it contains the menuentry sections for your Linux machines.

           See the menuentry example in Note 1 below. Linux menuentries must be present in your linux.grub.cfg file.



3.        Boot into Windows and run Grub2Win. Click on the yellow "Manage Boot Menu" button.



4.        Once the Menu Configuration screen comes up click the blue "Linux" button at the top of the screen.



5.        When the file dialog appears select the linux.grub.cfg file from step 1 above.



6.        You will then see a selection screen containing the Linux menu items available for import.







Click the checkbox for the menu items you want to import and click "Import Selected Items.



The menu items you imported will now appear at the bottom of the Grub2Win menus as custom code.

You can now click the imported items to edit the code or move them up or down in the boot menu.





Note 1.                Menuentry Example


Each Linux menuentry in your grub.linux.cfg file should look similar to this sample:



menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os

       load_video

       insmod gzio

       if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi

       insmod part_msdos

       insmod ext2

       set root='hd0,msdos1'

       if [ x$feature_platform_search_hint = xy ]; then

            search --no-floppy --fs-uuid --set=root  3cd4a219-0100-4392-a84a-5befc113dd0a

       else

            search --no-floppy --fs-uuid --set=root  3cd4a219-0100-4392-a84a-5befc113dd0a

       fi

       echo        'Loading Linux 5.10.0-22-amd64 ...'

       linux        /boot/vmlinuz-5.10.0-22-amd64 root=UUID=3cd4a219-0100-4392-a84a-5befc113dd0a ro  quiet splash

       echo        'Loading initial ramdisk ...'

       initrd        /boot/initrd.img-5.10.0-22-amd64

}





Note 2.                Required items


 These three items must all appear in your grub.linux.cfg file.


1.  A search command so that grub can locate the Linux root partition.


2.  A linux command directing grub to load the Linux kernel.


3.  An initrd command directing grub to set up the Linux ramdisk





Note 3.                Special characters


 The following special characters are not allowed in menu titles      \   /   :   *   ?   $   &   "   >   <   |  '   }   {  

 The import function will remove any invalid characters.














Created with the Personal Edition of HelpNDoc: Free PDF documentation generator