help-grub
[Top][All Lists]
Advanced

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

Re: nativedisk not working in 2.0.4


From: Andrei Borzenkov
Subject: Re: nativedisk not working in 2.0.4
Date: Tue, 24 Nov 2020 20:36:10 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

24.11.2020 15:31, Brian J. Murrell пишет:
> On Mon, 2020-11-23 at 10:06 -0500, Brian J. Murrell wrote:
>> I am using grub2-pc version 2.0.4 as packaged by Fedora 32.
>>
>> I am trying to get a serial console working using a USB->Serial
>> dongle.
>>
>> I understand that in order to do that I need to use GRUB's native
>> drivers as the moment GRUB tries to use the USB hardware it loses use
>> of the BIOS disk drivers.
>>
>> Working at a command-line for the moment, to figure out the steps I
>> do:
>>
>> grub> insmod nativedisk
>> grub> nativedisk
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>> error: ../../grub-core/net/net.c:1547:disk `hd0,msdos1' not found.
>>
>> and then am left with a frozen grub> prompt.  Even ALT-CTRL-DEL
>> doesn't
>> work.
> 
> Maybe what is really quite relevant but had only occurred to me this
> morning is that the disk that the machine is booted on is a SD-Card
> which is connected by USB:
> 
> Bus 001 Device 004: ID 0bda:0159 Realtek Semiconductor Corp. RTS5159 Card 
> Reader Controller
> 
> I suppose nativedisk cannot support that as it needs the USB drivers
> loaded also, (at least) and the moment you load those, you lose access
> to the disk through the BIOS.
> 
> Can the USB modules be loaded but left in an "un-activated" state so
> that they don't interfere with BIOS access to the USB disk?  Once they
> are all loaded, then nativedisk can "activate" the USB drivers (which
> are already loaded, but inactive) to get access to the disk.
> 
> Is this possible?
> 
> But maybe this is what is supposed to happen already?
> 

Yes, this is exactly what happens.

> https://wiki.debian.org/BootUsbWithGrubRescue#Booting_a_flash_drive_with_an_image_file_written_to_it
> #3 says:
> 
>    Use the nativedisk command to tell Grub to load its native disk and
>    USB drivers.
> 
> Which seems to be implying that the nativedisk command is loading the
> USB drivers also.
> 

By default nativedisk command loads the following modules (on x86):

pata,ahci,usbms,ohci,uhci,ehci

you can also give list of modules as arguments to nativedisk.

grub first reads all the modules in memory using platform disk support
(i.e. BIOS on i386-pc), then initializes them from memory copy. Then it
tries to find device with $prefix and $root UUIDs using new drivers.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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