help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-mkconfig for removable drive


From: Goh Lip
Subject: Re: grub-mkconfig for removable drive
Date: Thu, 17 Nov 2022 14:48:13 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2



On 16/11/2022 23:06, Matthias Braun wrote:

I was wondering if I could simplify the commands used for installing GRUB on a 
removable drive.


Looking for ways to make the procedure shorter, I found the option 
"--root-directory" for grub-install:

     grub-install /dev/sdb --root-directory=/mnt/new_partition/

Is there something equivalent for grub-mkconfig? Or is chrooting inevitable in 
this case? Can I run grub-mkconfig cross-disk another way?


chroot not required.

1. Boot into any linux OS with grub installed.
2. Check that the packages are installed (should be)
            libisoburn
            efibootmgr
            dosfstools

some OS name libisoburn packages differently; if unsure, install 'xorriso' package that contains it.


3a. for a plain grub prompt usb
    grub-mkrescue -o anyname.iso
    burn anyname.iso to the usb

3b. to include a current working grub.cfg in the usb
        mkdir -p ~/burn/boot/grub
        sudo grub-mkconfig -o ~/burn/boot/grub/grub.cfg
        sudo grub-mkrescue -o anyname.iso burn
        burn anyname.iso to the usb





reply via email to

[Prev in Thread] Current Thread [Next in Thread]