<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[HyperForum — How to correctly change grub.cfg?]]></title>
	<link rel="self" href="https://forums.hyperbola.info/extern.php?action=feed&amp;tid=1002&amp;type=atom" />
	<updated>2024-02-06T07:52:44Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.hyperbola.info/viewtopic.php?id=1002</id>
		<entry>
			<title type="html"><![CDATA[Re: How to correctly change grub.cfg?]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=7628#p7628" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Welcome to GRUB!

error: disk `lvmid/p3y5O2-jync-R2Ao-Gtlj-It3j-FZXE-ipEDYG/bApewq-qSRB-zYqT-mzvP-pGiV-VQaf-di4Rcz` not found.
grub rescue&gt; </code></pre></div><p>This error &quot;disk `...` not found&quot; error is originally caused by a<strong> grub bug</strong>. LVM metadata is stored on-disk in a ring buffer, so occasionally the current metadata will wrap around the end of the ring buffer. However, if there is a wraparound in the ring buffer, grub fails to parse the metadata and fails to boot with the above error. </p><p>Information that I have found so far on this problem<br /><a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987008">https://bugs.debian.org/cgi-bin/bugrepo … bug=987008</a></p>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2024-02-06T07:52:44Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=7628#p7628</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to correctly change grub.cfg?]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=7627#p7627" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>jim wrote:</cite><blockquote><p>Hello Zapper .</p><p>I have become a little closer to the goal, since no one at the moment can answer why I am getting this error, I am studying the issue further))</p><div class="codebox"><pre><code>error : disk &#039;lvmid /WuGDE4-Po2w-3n6d-9pcY-sqsoV-eTsq-aLxagJ&#039;</code></pre></div><p>I have read various forums, usually it is related to Grub which is installed on the system.<br />But the BIG advantage is that <strong>we do not need to install Grub Hyperbola</strong> since it is in the ROM. As soon as I receive answers I will write instructions for Luks2+argon2id.</p></blockquote></div><br /><p>I will be interested to see how you do this.</p><p>I don&#039;t know the method HyperbolaBSD will use for FDE + /boot or FDE - /boot</p><p>But its good to have you figure this out till 2024 Q4 which is when I believe the next variant OS of Hyperbola comes out as Stable according to FAQ.</p>]]></content>
			<author>
				<name><![CDATA[zapper]]></name>
				<uri>https://forums.hyperbola.info/profile.php?id=117</uri>
			</author>
			<updated>2024-02-06T02:55:06Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=7627#p7627</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to correctly change grub.cfg?]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=7616#p7616" />
			<content type="html"><![CDATA[<p>Hello Zapper .</p><p>I have become a little closer to the goal, since no one at the moment can answer why I am getting this error, I am studying the issue further))</p><div class="codebox"><pre><code>error : disk &#039;lvmid /WuGDE4-Po2w-3n6d-9pcY-sqsoV-eTsq-aLxagJ&#039;</code></pre></div><p>I have read various forums, usually it is related to Grub which is installed on the system.<br />But the BIG advantage is that <strong>we do not need to install Grub Hyperbola</strong> since it is in the ROM. As soon as I receive answers I will write instructions for Luks2+argon2id.</p>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2024-02-05T09:38:32Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=7616#p7616</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to correctly change grub.cfg?]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=7612#p7612" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>jim wrote:</cite><blockquote><p>Found it here on the forum, I&#039;ll try to use it...</p><p>I will change the UUID and other identifiers.. </p><div class="codebox"><pre><code>menuentry &#039;Load hyperbola&#039; {
        insmod ahci
        insmod part_msdos
        insmod part_gpt
        cryptomount -u 071b188644b14c528d1853efdf96d74c
        set root=&quot;lvm/matrix-root&quot;
        echo  &#039;Loading vmlinuz-linux-libre-lts ...&#039;
        linux /boot/vmlinuz-linux-libre-lts \
        cryptdevice=UUID=071b1886-44b1-4c52-8d18-53efdf96d74c:root \
        cryptkey=rootfs:/etc/keys/ssd.key \
        root=UUID=bcea465c-b5ba-4df0-936d-04679c422904 \
        resume=UUID=9c3a41a5-672a-46bb-ac88-c70a5f1aba75 \
        keymap=de net.ifnames=0 biosdevname=0 acpi_osi=Linux

        echo  &#039;Loading initramfs-linux-libre-lts.img ...&#039;
        initrd /boot/initramfs-linux-libre-lts.img
        boot
}</code></pre></div></blockquote></div><p>Tell me if you succeed. Hope you do!</p>]]></content>
			<author>
				<name><![CDATA[zapper]]></name>
				<uri>https://forums.hyperbola.info/profile.php?id=117</uri>
			</author>
			<updated>2024-02-04T20:33:53Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=7612#p7612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to correctly change grub.cfg?]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=7607#p7607" />
			<content type="html"><![CDATA[<p>Found it here on the forum, I&#039;ll try to use it...</p><p>I will change the UUID and other identifiers.. </p><div class="codebox"><pre><code>menuentry &#039;Load hyperbola&#039; {
        insmod ahci
        insmod part_msdos
        insmod part_gpt
        cryptomount -u 071b188644b14c528d1853efdf96d74c
        set root=&quot;lvm/matrix-root&quot;
        echo  &#039;Loading vmlinuz-linux-libre-lts ...&#039;
        linux /boot/vmlinuz-linux-libre-lts \
        cryptdevice=UUID=071b1886-44b1-4c52-8d18-53efdf96d74c:root \
        cryptkey=rootfs:/etc/keys/ssd.key \
        root=UUID=bcea465c-b5ba-4df0-936d-04679c422904 \
        resume=UUID=9c3a41a5-672a-46bb-ac88-c70a5f1aba75 \
        keymap=de net.ifnames=0 biosdevname=0 acpi_osi=Linux

        echo  &#039;Loading initramfs-linux-libre-lts.img ...&#039;
        initrd /boot/initramfs-linux-libre-lts.img
        boot
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2024-02-04T13:54:07Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=7607#p7607</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to correctly change grub.cfg?]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=7606#p7606" />
			<content type="html"><![CDATA[<p>Unfortunately none of these wiki links work...</p><p><a href="https://wiki.hyperbola.info/doku.php?id=en:guide:encrypted_installation#generate_grubcfg">https://wiki.hyperbola.info/doku.php?id … te_grubcfg</a></p><p><a href="https://wiki.hyperbola.info/doku.php?id=en:guide:encrypted_installation#setting_up_the_kernel_modules">https://wiki.hyperbola.info/doku.php?id … el_modules</a></p><p><a href="https://wiki.hyperbola.info/doku.php?id=en:guide:encrypted_installation#booting_the_installation_manually_from_grub">https://wiki.hyperbola.info/doku.php?id … _from_grub</a></p>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2024-02-04T13:22:43Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=7606#p7606</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to correctly change grub.cfg?]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=7605#p7605" />
			<content type="html"><![CDATA[<p>Hi all . Please tell me how to change grub.cfg correctly and correctly, below I attach grub.cfg Libreboot. it is the same as Gnuboot.</p><p>For example, I want to post these lines (written below), will they work, that is, what I enter and it works.</p><br /><p>Can I place them at the end of the file for this to work or does something else need to be added?</p><div class="codebox"><pre><code>set prefix=(memdisk)/boot/grub

insmod at_keyboard
insmod usb_keyboard
insmod nativedisk
insmod ehci
insmod ohci
insmod uhci
insmod usb
insmod usbms
insmod regexp

terminal_input --append at_keyboard
terminal_input --append usb_keyboard
terminal_output --append cbmemc

gfxpayload=keep
terminal_output --append gfxterm

if [ -f (cbfsdisk)/background.png ]; then
    insmod png
    background_image (cbfsdisk)/background.png
elif [ -f (cbfsdisk)/background.jpg ]; then
    insmod jpeg
    background_image (cbfsdisk)/background.jpg
fi

set default=&quot;0&quot;
if [ -f (cbfsdisk)/timeout.cfg ]; then
    source (cbfsdisk)/timeout.cfg
else    
    set timeout=5
fi
set grub_scan_disk=&quot;both&quot;
if [ -f (cbfsdisk)/scan.cfg ]; then
    source (cbfsdisk)/scan.cfg
fi

if [ -f (cbfsdisk)/keymap.gkb ]; then
    keymap (cbfsdisk)/keymap.gkb
fi

function try_user_config {
    set root=&quot;${1}&quot;

    # The @/... entries are for cases where the BTRFS filesystem is being used
    for dir in boot grub grub2 boot/grub boot/grub2 @/boot @/grub @/grub2 @/boot/grub @/boot/grub2; do
        for name in &#039;&#039; osboot_ autoboot_ libreboot_ coreboot_; do
            if [ -f /&quot;${dir}&quot;/&quot;${name}&quot;grub.cfg ]; then
                unset superusers
                configfile /&quot;${dir}&quot;/&quot;${name}&quot;grub.cfg
            fi
        done
    done
}
function search_grub {
    echo -n &quot;Attempting to load grub.cfg from &#039;${1}&#039; devices&quot;
    for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
        for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
            try_user_config &quot;(${1}${i},${part})&quot;
        done
        # raw devices e.g. (ahci0) instead of (ahci0,1)
        try_user_config &quot;(${1}${i})&quot;
    done
    echo # Insert newline
}

function try_isolinux_config {
    set root=&quot;${1}&quot;
    for dir in &#039;&#039; /boot /EFI /boot/EFI /@ /@/boot /@/boot/EFI /@/EFI; do
        if [ -f &quot;${dir}&quot;/isolinux/isolinux.cfg ]; then
            syslinux_configfile -i &quot;${dir}&quot;/isolinux/isolinux.cfg
        elif [ -f &quot;${dir}&quot;/syslinux/syslinux.cfg ]; then
            syslinux_configfile -s &quot;${dir}&quot;/syslinux/syslinux.cfg
        elif [ -f &quot;${dir}&quot;/syslinux/extlinux.conf ]; then
            syslinux_configfile -s &quot;${dir}&quot;/syslinux/extlinux.conf
        elif [ -f &quot;${dir}&quot;/extlinux/extlinux.conf ]; then
            syslinux_configfile -s &quot;${dir}&quot;/extlinux/extlinux.conf
        fi
    done
}
function search_isolinux {
    echo &quot;\nAttempting to parse iso/sys/extlinux config from &#039;${1}&#039; devices&quot;
    for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
        for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
            try_isolinux_config &quot;(${1}${i},${part})&quot;
        done
        # raw devices e.g. (usb0) instead of (usb0,1)
        try_isolinux_config &quot;(${1}${i})&quot;
    done
    echo # Insert newline
}
function try_bootcfg {
    try_user_config &quot;${1}&quot;
    try_isolinux_config &quot;${1}&quot;
}
function search_bootcfg {
    search_grub &quot;${1}&quot;
    search_isolinux &quot;${1}&quot;
}
menuentry &#039;Load Operating System (incl. fully encrypted disks)  [o]&#039; --hotkey=&#039;o&#039; {

    if [ &quot;${grub_scan_disk}&quot; != &quot;ata&quot; ]; then
        search_bootcfg ahci
    fi
    if [ &quot;${grub_scan_disk}&quot; != &quot;ahci&quot; ]; then
        search_bootcfg ata
    fi

    # grub device enumeration is very slow, so checks are hardcoded

    # TODO: add more strings, based on what distros set up when
    # the user select auto-partitioning on those installers
    lvmvol=&quot;lvm/grubcrypt-bootvol lvm/grubcrypt-rootvol&quot;

    raidvol=&quot;md/0 md/1 md/2 md/3 md/4 md/5 md/6 md/7 md/8 md/9&quot;

    # in practise, doing multiple redundant checks is perfectly fast and
    # TODO: optimize grub itself, and use */? here for everything

    for vol in ${lvmvol} ${raidvol} ; do
        try_bootcfg &quot;${vol}&quot;
    done

    unset ahcidev
    unset atadev
    for i in 11 10 9 8 7 6 5 4 3 2 1 0; do
        for part in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1; do
            if [ &quot;${grub_scan_disk}&quot; != &quot;ata&quot; ]; then
                ahcidev=&quot;(ahci${i},${part}) ${ahcidev}&quot;
            fi
            if [ &quot;${grub_scan_disk}&quot; != &quot;ahci&quot; ]; then
                atadev=&quot;(ata${i},${part}) ${atadev}&quot;
            fi
        done
    done

    set pager=0
    echo -n &quot;Attempting to unlock encrypted volumes&quot;
    for dev in ${ahcidev} ${atadev} ${lvmvol} ${raidvol}; do
        if cryptomount &quot;${dev}&quot; ; then break ; fi
    done
    set pager=1
    echo

    # after cryptomount, lvm volumes might be available
    for vol in ${lvmvol}; do
        try_bootcfg &quot;${vol}&quot;
    done

    search_bootcfg crypto

    for vol in lvm/* ; do
        try_bootcfg &quot;${vol}&quot;
    done

    true # Prevent pager requiring to accept each line instead of whole screen
}

menuentry &#039;Search for GRUB/SYSLINUX/EXTLINUX/ISOLINUX on USB  [s]&#039; --hotkey=&#039;s&#039; {
    search_bootcfg usb
}
menuentry &#039;Search for GRUB/SYSLINUX/EXTLINUX/ISOLINUX on AHCI  [a]&#039; --hotkey=&#039;a&#039; {
    search_bootcfg ahci
}
menuentry &#039;Search for GRUB/SYSLINUX/EXTLINUX/ISOLINUX on ATA/IDE  [d]&#039; --hotkey=&#039;d&#039; {
    search_bootcfg ahci
}
if [ -f (cbfsdisk)/grubtest.cfg ]; then
menuentry &#039;Load test configuration (grubtest.cfg) inside of CBFS  [t]&#039; --hotkey=&#039;t&#039; {
    set root=&#039;(cbfsdisk)&#039;
    if [ -f /grubtest.cfg ]; then
        configfile /grubtest.cfg
    fi
}
fi
if [ -f (cbfsdisk)/seabios.elf ]; then
menuentry &#039;Load SeaBIOS (payload) [b]&#039; --hotkey=&#039;b&#039; {
    set root=&#039;cbfsdisk&#039;
    chainloader /seabios.elf
}
fi
if [ -f (cbfsdisk)/img/grub2 ]; then
menuentry &#039;Return to SeaBIOS [b]&#039; --hotkey=&#039;b&#039; {
    set root=&#039;cbfsdisk&#039;
    chainloader /fallback/payload
}
fi
menuentry &#039;Poweroff  [p]&#039; --hotkey=&#039;p&#039; {
    halt
}
menuentry &#039;Reboot  [r]&#039; --hotkey=&#039;r&#039; {
    reboot
}
if [ -f (cbfsdisk)/img/memtest ]; then
menuentry &#039;Load MemTest86+  [m]&#039; --hotkey=&#039;m&#039; {
    set root=&#039;cbfsdisk&#039;
    chainloader /img/memtest
}
fi</code></pre></div><p>Add these lines</p><div class="codebox"><pre><code>{
cryptomount -a
set root=&#039;lvm/matrix-rootvol&#039;
linux /boot/vmlinuz-linux-libre root=/dev/matrix/rootvol cryptdevice=/dev/sda1:lvm
initrd /boot/initramfs-linux-libre.img
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2024-02-03T19:09:19Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=7605#p7605</id>
		</entry>
</feed>
