help-grub
[Top][All Lists]
Advanced

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

Re: [grub] Experiencing difficulties to access USB key files


From: Andrei Borzenkov
Subject: Re: [grub] Experiencing difficulties to access USB key files
Date: Fri, 22 Jan 2016 19:30:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

22.01.2016 15:56, Arbiel (gmx) пишет:
>>> 1) his USB key is seen by grub as a floppy disk ; the ls command lists
>>> it as (fd1) ; so I suppressed --no-floppy from the search command
>>> parameters. To no avail.
>> How do you know it is this USB stick? What "ls -l" shows? Can you read
>> something from it (hexdump command)? Can you read enough to identify it?
> The PC has got, beside the hard disk, only a floppy reader and a USB
> port. The floppy reader is listed as fd0, the hard disk as hd1. So the
> fd1 device only can be the USB port.

It can also be second floppy supported by controller. What you see when
no USB stick is plugged in?

> the ls command applied to fd1 answers 2 lines
> Device fd1: filesystem cannot be accessed
> error: no such disk

This actually rather hints that it is really second floppy drive (or
port for second drive). Does BIOS have any option to enable/disable
floppy controller?

> So "ls -l" would not provide additional information.
>>
>>> 2) as I was not sure of the contains of the original grub.cfg file (the
>>> one which sources my file), I added a "insmod fat" command, as the
>>> partition of the key is FAT32. Still to no avail.
>> Not sure I got it. So GRUB is installed somewhere else? So may be it is
>> simply too old GRUB version?
> There are two grub instances in the configuration. One instance is on
> the hard disk. It is GNU GRUB version 1.99-21ubuntu3.19. The other one
> is on the USB stick. It is GNU GRUB version 2.02~beta2-9ubuntu1.6

And which grub is loaded on this system?

>>
>>> 3) supposing the BIOS was lacking USB drivers,
>> This directly contradicts 1.
> As I'm not specialist, I may misunderstand what a driver is. I don't
> know whether or not grub uses the basic input/output services embedded
> in the PC's ROM to acces the hardware.

It does by default.

> I'm confronted with the fact that
> grub cannot find an existing file of which it knows the relative path
> inside the partition where the file lies, and I know the PC cannot boot
> from a USB stick. So I made the following assumptions
> 1) in the present context, grub uses the BIOS to access the USB stick

correct.

> 2) BIOS does not contain the software to access the USB port (that I
> named the driver)

That looks more and more probable. You need to double check what fd1
device is.

> so I tried to provide grub with the modules I hoped would allow it to
> access the USB stick by itself, and so, be able to find the searched for
> file and "configfile" it.
>>
>>> I inserted five
>>> additional modules : usb, ahci, ehci, ohci and uhci. No avail.
>>>
>> This just makes things worse by cutting off access to $prefix.
> $prefix is still pointing to the boot directory on the hard disk.
>>

But GRUB does not have driver to access this hard disk anymore. Current
GRUB disables BIOS access as soon as these modules are loaded. If you
want to test them, please always use "nativedisk" GRUB command which
attempts to replace device name in $prefix and $root with new one,
discovered by native drivers.

Old GRUB may not have this command though.



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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