Rod Smith <rodsm...@rodsbooks.com> writes:
> On 11/03/2016 01:29 PM, Tianon Gravi wrote:
>> On 3 November 2016 at 10:28, Tianon Gravi <tia...@debian.org> wrote:
>>> On 3 November 2016 at 10:19, Rod Smith <rodsm...@rodsbooks.com> wrote:
>>>> Note, however, that I have no NVMe or similar devices on which to test.
>>>> The new code does the right thing on my /dev/sd? devices, and I think it
>>>> SHOULD work on more exotic devices.
>>>
>>> I don't personally have an NVMe system I can test the script as-is on,
>>> but I tested that specific block of code on a friend's system which
>>> does have NVMe, and I got "/dev/nvme0n1" for InstallDisk and "p1" for
>>> PartNum from his "/boot" partition, so it looks like this code is
>>> correct. :)
>> 
>> Although now that I say that, it occurs to me that PartNum might
>> actually need to be simply "1", not "p1", right?
>
> Good question. I guess it depends on what efibootmgr wants, since that's
> where the variable is used. The efibootmgr man page implies it wants a
> number, so I've committed another change -- applying both 2a6f68 and
> bdf9ca from my git repository should do it:
>
> https://sourceforge.net/p/refind/code/commit_browser

e7e393 works for me:

+ [[ -n /bin/efibootmgr ]]
++ grep /boot/efi /etc/mtab
++ cut -d ' ' -f 1
+ InstallPart=/dev/nvme0n1p1
++ lsblk -r
++ grep disk
++ cut -f 1 -d ' '
+ for Name in `lsblk -r | grep disk | cut -f 1 -d " "`
+ [[ /dev/nvme0n1p1 == *\n\v\m\e\0\n\1* ]]
+ InstallDisk=/dev/nvme0n1
+ PartNum=p1
++ echo 1
+ PartNum=1
+ break
+ [[ -z /dev/nvme0n1 ]]
+ [[ -z 1 ]]
..

+ [[ 0 == 0 ]]
+ /bin/efibootmgr -c -l '\EFI\refind\refind_x64.efi' -L 'rEFInd Boot Manager' 
-d /dev/nvme0n1 -p 1

Thanks.

And I don't think NVMe is *that* exotic anymore :)  This is a pretty
standard 2016 model laptop, as sold by Lenovo.


Bjørn

Reply via email to