• Create /boot/grub/custom.cfg (grub assistant)


    Hello!

    I started working on a script that generates grub boot menu entries. It may provide some help in case of grub boot problems. The first version is now ready at https://github.com/manuel-192/antergos-customcfg.
    It is not extensively tested, so I’m encouraging people to do some testing.

    The script uses os-prober to find info about installed operating systems. Then it prints to stdout (screen) menuentries for all found OS:s. This output can be directed to /boot/grub/custom.cfg (root permissions needed). Having done that, reboot, and you should see a bunch of new menu entries.

    So, to use it, download file antergos-customcfg from the link above. Then make it executable (and could move it to e.g. /usr/local/bin). Finally, test it without writing anything:

    cd
    wget https://github.com/manuel-192/antergos-customcfg/raw/master/antergos-customcfg
    chmod +x antergos-customcfg
    sudo ./antergos-customcfg
    

    It should show you some menu entries, depending on what operating systems you have installed. So far nothing has been written to any file.

    If the output seems correct, you could direct the output to a file:

    sudo ./antergos-customcfg > /boot/grub/custom.cfg
    

    Note that if you already have that file, you probably want to rename it first, just in case you want to keep that file.

    And now reboot, you should see some new menu entries! 🙂

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • Note: currently it (should) support Arch, Antergos, Manjaro, Linux Mint and Windows (both UEFI and legacy). In case of problems, please report here! 🙂

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • Now there’s a PKGBUILD for antergos-customcfg!

    Also made some bug fixes, should be somewhat better in generating entries.

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • @manuel said in Create /boot/grub/custom.cfg (grub assistant):

    antergos-customcfg

    ls: cannot access '/root/mnt-32681/boot/vmlinuz-*': No such file or directory
    
    

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

  • @joekamprad
    Thanks for the report!

    At that point it is trying to see what kernels you have installed using pattern /boot/vmlinuz-*. It has mounted a partition to folder /root/mnt-32681.

    It is doing that either in the system you are running (Antergos?) or some other linux installation on your system (what could it be? There it should be some Arch based system).

    So it could print more information about the error. I’ll add some output, wait and see! 🙂

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • i just chec it on ANtergos… but mounting under /root is not common or i am wrong? better to use /tmp

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

  • @joekamprad
    That’s strange… I’m running this script on many different OSs and it works.
    And mounting in /root should not be a problem, I think it is better than /tmp for security reasons.

    But I’m writing some debug code there, please wait a bit… 🙂

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • @joekamprad
    Do you happen to have a separate /boot partition?

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xa576d15b
    
    Device     Boot Start       End   Sectors   Size Id Type
    /dev/sdc1        2048 976768064 976766017 465.8G 83 Linux
    
    
    Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x3c8fb106
    
    Device     Boot Start        End    Sectors   Size Id Type
    /dev/sdd1          63 1953520064 1953520002 931.5G 83 Linux
    
    
    Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x5c5bab5f
    
    Device     Boot    Start       End   Sectors  Size Id Type
    /dev/sda1  *        2048    524287    522240  255M 83 Linux
    /dev/sda2         524288  68883662  68359375 32.6G 83 Linux
    /dev/sda3       68883663 234436544 165552882   79G 83 Linux
    
    
    Disk /dev/sdb: 149 GiB, 160000000000 bytes, 312500000 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xe1199246
    
    Device     Boot     Start       End   Sectors  Size Id Type
    /dev/sdb1            2048   1026047   1024000  500M  7 HPFS/NTFS/exFAT
    /dev/sdb2         1488896 187825238 186336343 88.9G  7 HPFS/NTFS/exFAT
    /dev/sdb3       187826176 189618175   1792000  875M 27 Hidden NTFS WinRE
    /dev/sdb4       189618176 312498175 122880000 58.6G  5 Extended
    /dev/sdb5       300214272 312498175  12283904  5.9G 82 Linux swap / Solaris
    /dev/sdb6  *    189620224 300214271 110594048 52.8G 83 Linux
    
    Partition table entries are not in disk order.
    
    

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

  • @joekamprad
    lsblk -f
    ?

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • /dev/sda1 is /boot for Main Antergos

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

  • @joekamprad
    OK, that may explain this a bit. I haven’t tested the script with a separate /boot partition, so it seems to fail in that case. All my systems have a only a /boot folder.

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • NAME   FSTYPE LABEL             UUID                                 MOUNTPOINT
    sda                                                                  
    ├─sda1 ext4   Antergos_b        9b49559*****************74ef9 /boot
    ├─sda2 ext4   Antergos_r        10f174f0******************de248 /
    └─sda3 ext4   Antergos_h        7c89***************e593 /home
    sdb                                                                  
    ├─sdb1 ntfs   System-reserviert D4A2********F0                     
    ├─sdb2 ntfs                     704*********7E                     
    ├─sdb3 ntfs                     2640**********21                     
    ├─sdb4                                                               
    ├─sdb5 swap   swapper           c66ba7***********409 
    └─sdb6 ext4   gnome_r           eadb2************90d3 
    sdc                                                                  
    └─sdc1 ext4   daten             3fbb8487-07***********0ff89 /mnt/daten
    sdd                                                                  
    └─sdd1 ext4   Terra01           b3f6*****************7ac 
    sr0   
    

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

  • @joekamprad
    Yes, that explains it. The script does not (yet) support support cases when /boot is on a separate partition. And that’s quite a common case.
    The work to implement that is not small, so please don’t hold your breath now … 😉
    It may take a few days to implement it.

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • @joekamprad
    Thanks for testing! It revealed a problem right away, your system is different (but not uncommon) from mine, so I didn’t notice it.

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • I added a notice to the github page about the /boot partition problem.

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • thanks anyway! i will need this stuff for my rescue ISO too! and it finds my windows installation bot none of the two Antergos installs!

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

  • @joekamprad Yes, that’s to be expected because of this bug.

    If you have some extra time (who has…), you could test it with an installation that doesn’t have a separate /boot partition. That’s just to show it works in such a case (unless you find new problems…).

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

  • yes i have my build system onto sdb with /boot under root partition ! i will try now…

    [updates once a week] = [90% less problems]
    antergos:_rescue
    how to add system logs:
    wget http://bit.ly/2GCG9k2 && sh 2GCG9k2
    :handshake: donate antergos

  • @joekamprad
    By the way, can the rescue ISO use the normal grub-mkconfig?
    It should work, doesn’t it?
    Or have you seen problems with it?

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL.

grub103 assistant5 Posts 37Views 1021
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.