[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unknown command 'else'?
From: |
Steven Shiau |
Subject: |
Re: Unknown command 'else'? |
Date: |
Tue, 22 Sep 2015 23:05:56 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 2015年09月22日 15:54, Andrei Borzenkov wrote:
> On Tue, Sep 22, 2015 at 8:52 AM, Steven Shiau <address@hidden> wrote:
> ...
>> BTW, one more question. Is that possible to do some variable substitution in
>> preconfig?
> ...
>> I tried to use:
>> configfile $prefix/grub.cfg-01-${net_default_mac//:/-}
>> However, this bash variable substitution apparently is not working. So in
>> the preconifg, rescue mode, how can I make that?
>>
> It does not work at all, preconfig or not preconfig. You could try to
> preload tr module and use
>
> tr --set pretty_mac - : $net_default_mac
>
> although I'm not sure how it will handle lone `-' (argument parsing); probably
>
> tr --set pretty_mac x- x: $net_default_mac
Cool! Yes, this one works:
tr --set pretty_mac x: x- $net_default_mac
>
> is more foolproof.
>
> Of course all notes about lack of conditional error handling at this
> stage still apply ...
BTW, one thing I noticed is that, it seems the file downloading from
tftp server for grub2 in uEFI netboot mode is not fast, compared to PXE
netboot.
>From the attached file you can see the average rate is about 0.5 MB/sec
in the client ( a VMWare WS 12 machine).
In the PXE netboot mode on the same VM machine, the rate is about twice
faster. Any method I can make it faster in uEFI netboot mode?
Oh, yes, please allow me to ask me one more question, I am editing a
grub config to have a local boot:
menuentry "First local disk" --id local-disk {
echo "Booting first local disk..."
set root=(hd0,1)
if [ -e /EFI/redhat/grub.efi ]; then
chainloader /EFI/redhat/grub.efi +1
elif [ -e /EFI/fedora/shim.efi ]; then
chainloader /EFI/fedora/shim.efi +1
elif [ -e /EFI/fedora/grubx64.efi ]; then
chainloader /EFI/fedora/grubx64.efi +1
elif [ -e /EFI/debian/grubx64.efi ]; then
chainloader /EFI/debian/grubx64.efi +1
elif [ -e /EFI/ubuntu/grubx64.efi ]; then
chainloader /EFI/ubuntu/grubx64.efi +1
elif [ -e /EFI/opensuse/grubx64.efi ]; then
chainloader /EFI/opensuse/grubx64.efi +1
elif [ -e /EFI/Boot/bootx64.efi ]; then
chainloader /EFI/Boot/bootx64.efi +1
elif [ -e /EFI/Microsoft/Boot/bootmgfw.efi ]; then
chainloader /EFI/Microsoft/Boot/bootmgfw.efi +1
else
echo "No uEFI image was found!"
sleep 15
fi
Is that possible I can use "search" or other command to make this?
Appreciate!
Steven.
--
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/47CF935C
Fingerprint: 0240 1FEB 695D 7112 62F0 8796 11C1 12DA 47CF 935C
uefi-nb.png
Description: PNG image
- Re: Unknown command 'else'?, (continued)
- Re: Unknown command 'else'?, Andrei Borzenkov, 2015/09/19
- Re: Unknown command 'else'?, Steven Shiau, 2015/09/22
- Re: Unknown command 'else'?, Michael Mohr, 2015/09/22
- Re: Unknown command 'else'?, Andrei Borzenkov, 2015/09/22
- Re: Unknown command 'else'?, Michael Mohr, 2015/09/22
- Re: Unknown command 'else'?, Steven Shiau, 2015/09/22
- Re: Unknown command 'else'?, Michael Mohr, 2015/09/24
- Re: Unknown command 'else'?, Steven Shiau, 2015/09/27
- Re: Unknown command 'else'?, Andrei Borzenkov, 2015/09/22
- Re: Unknown command 'else'?, Andrei Borzenkov, 2015/09/22
- Re: Unknown command 'else'?,
Steven Shiau <=
- Re: Unknown command 'else'?, Andrei Borzenkov, 2015/09/24
- Re: Unknown command 'else'?, Steven Shiau, 2015/09/24