Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #180707 > unrolled thread
| Started by | Leandro Noferini <lnoferin@cybervalley.org> |
|---|---|
| First post | 2017-05-05 06:00 +0200 |
| Last post | 2017-05-05 17:00 +0200 |
| Articles | 10 — 5 participants |
Back to article view | Back to linux.debian.user
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Booting a CF or SD card from an internal card reader Leandro Noferini <lnoferin@cybervalley.org> - 2017-05-05 06:00 +0200
Re: Booting a CF or SD card from an internal card reader Brian <ad44@cityscape.co.uk> - 2017-05-05 11:30 +0200
Re: Booting a CF or SD card from an internal card reader Stefan Monnier <monnier@iro.umontreal.ca> - 2017-05-05 14:50 +0200
Re: Booting a CF or SD card from an internal card reader Brian <ad44@cityscape.co.uk> - 2017-05-05 19:40 +0200
Re: Booting a CF or SD card from an internal card reader Stefan Monnier <monnier@iro.umontreal.ca> - 2017-05-05 20:00 +0200
Re: Booting a CF or SD card from an internal card reader David Wright <deblis@lionunicorn.co.uk> - 2017-05-05 20:40 +0200
Re: Booting a CF or SD card from an internal card reader Brian <ad44@cityscape.co.uk> - 2017-05-05 20:40 +0200
Re: Booting a CF or SD card from an internal card reader Richard Owlett <rowlett@cloud85.net> - 2017-05-05 15:00 +0200
Re: Booting a CF or SD card from an internal card reader Brian <ad44@cityscape.co.uk> - 2017-05-05 16:10 +0200
Re: Booting a CF or SD card from an internal card reader David Wright <deblis@lionunicorn.co.uk> - 2017-05-05 17:00 +0200
| From | Leandro Noferini <lnoferin@cybervalley.org> |
|---|---|
| Date | 2017-05-05 06:00 +0200 |
| Subject | Re: Booting a CF or SD card from an internal card reader |
| Message-ID | <tDCzn-4Hv-1@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Brian <ad44@cityscape.co.uk> writes:
> 1. This HOWTO is a result of the discussion on debian-user beginning at
Thanks a lot for this document because it hits a problem I found many
months ago without solution for me. I would like to use my internal card
reader (Lenovo X240) to boot in tails (https://tails.boum.org)
My reader appears this way:
====================================================================
~ $ lsusb
Bus 001 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
====================================================================
The sd card with tails on appears this way:
====================================================================
leandro@tricheco:~$ sudo fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/mmcblk0: 7,4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F12D15CF-2FC3-4852-8226-9D4F7E625B29
Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 5122047 5120000 2,5G EFI System
====================================================================
Following your document I edited /etc/grub.d/40_custom adding these
lines:
====================================================================
menuentry 'Tails on CF card' {
insmod part_msdos
insmod ext2
echo "Running nativedisk command. Please wait."
nativedisk
search --label --set=root TAILS
linux /vmlinuz root=LABEL=TAILS ro
initrd /initrd.img
}
====================================================================
But it is not working.
If I give the "nativedisk" command in grub command line I get only
====================================================================
(ahci0)
====================================================================
Where am I wrong?
[...]
--
leandro
1A0B 125B 2E4D 2DAE 4E26 4551 88FB BBCC 7A29 640B
https://bbs.cybervalley.org/ChiaveLeandro/gpg.html
http://6xukrlqedfabdjrb.onion
La caratteritica principale dei miracoli è che non accadono
[toc] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2017-05-05 11:30 +0200 |
| Message-ID | <tDHIJ-8ec-15@gated-at.bofh.it> |
| In reply to | #180707 |
On Fri 05 May 2017 at 05:34:13 +0200, Leandro Noferini wrote:
> Brian <ad44@cityscape.co.uk> writes:
>
> > 1. This HOWTO is a result of the discussion on debian-user beginning at
It should be stressed that the HOWTO is applicable only to devices on
the USB bus.
> Thanks a lot for this document because it hits a problem I found many
> months ago without solution for me. I would like to use my internal card
> reader (Lenovo X240) to boot in tails (https://tails.boum.org)
I rarely dabble in hardware-related things, so a mistake or two could
creep into what follows.
> My reader appears this way:
>
> ====================================================================
> ~ $ lsusb
> Bus 001 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
> ====================================================================
The Lenovo X240 has a Smart Card reader and a 4-in-1 card reader (MMC,
SD, SDHC, SDXC). The Smart Card reader is on the USB bus. I have never
used one but it appears to have something to do with identity cards.
GRUB does not detect it with nativedisk so booting from it is not
possible.
> The sd card with tails on appears this way:
>
> ====================================================================
> leandro@tricheco:~$ sudo fdisk /dev/mmcblk0
>
> Welcome to fdisk (util-linux 2.29.2).
> Changes will remain in memory only, until you decide to write them.
> Be careful before using the write command.
>
> Command (m for help): p
> Disk /dev/mmcblk0: 7,4 GiB, 7969177600 bytes, 15564800 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: gpt
> Disk identifier: F12D15CF-2FC3-4852-8226-9D4F7E625B29
>
> Device Start End Sectors Size Type
> /dev/mmcblk0p1 2048 5122047 5120000 2,5G EFI System
> ====================================================================
This is the 4-in-1 card reader; the one you want you are trying to boot
from. As indicted by /dev/mmcblk0p1 it is on the PCI bus. 'lspci' should
display the chip used; one from Ricoh?
GRUB doesn't see anything on this bus (it has no drivers for the device),
so booting from it is not possible.
> Following your document I edited /etc/grub.d/40_custom adding these
> lines:
>
> ====================================================================
> menuentry 'Tails on CF card' {
> insmod part_msdos
> insmod ext2
> echo "Running nativedisk command. Please wait."
> nativedisk
> search --label --set=root TAILS
> linux /vmlinuz root=LABEL=TAILS ro
> initrd /initrd.img
> }
> ====================================================================
>
> But it is not working.
>
> If I give the "nativedisk" command in grub command line I get only
>
> ====================================================================
> (ahci0)
> ====================================================================
>
> Where am I wrong?
I think you have possibly not appreciated the distinction between a card
reader on a USB bus and one on a PCI bus. The first should be visible to
GRUB and nativedisk (but, as you have seen, isn't always). The second is
never visible to GRUB.
--
Brian.
[toc] | [prev] | [next] | [standalone]
| From | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| Date | 2017-05-05 14:50 +0200 |
| Message-ID | <tDKQh-1Mu-1@gated-at.bofh.it> |
| In reply to | #180715 |
> This is the 4-in-1 card reader; the one you want you are trying to boot
> from. As indicted by /dev/mmcblk0p1 it is on the PCI bus. 'lspci' should
> display the chip used; one from Ricoh?
>
> GRUB doesn't see anything on this bus (it has no drivers for the device),
> so booting from it is not possible.
Of course it all depends on what you mean by "booting from". AFAICT in
Leandro's situation, he's loading Grub from some other disk (probably
the main HDD or SSD), so he's already "not booting from the SD card" in
this sense.
Based on what I see above, his normal boot has 3 steps (ignoring the
earlier BIOS/UEFI booting itself):
1- load/start Grub
2- load/start vmlinuz+initrd
3- load/start /sbin/init from the LABEL=TAILS partition
All 3 parts can be stored at different places. My guess is that step
1 fetches its data (Grub's code as well as grub.cfg) from some HDD or
SSD. Apparently step 2 can't fetch its data from the SD card.
But step 3 can definitely fetch its data from the SD card. So all you
need is to put your vmlinuz+initrd onto a disk that Grub can see
(e.g. alongside Grub rather than in the LABEL=TAILS partition).
Stefan
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2017-05-05 19:40 +0200 |
| Message-ID | <tDPmV-4Oe-5@gated-at.bofh.it> |
| In reply to | #180720 |
On Fri 05 May 2017 at 08:44:48 -0400, Stefan Monnier wrote: > > This is the 4-in-1 card reader; the one you want you are trying to boot > > from. As indicted by /dev/mmcblk0p1 it is on the PCI bus. 'lspci' should > > display the chip used; one from Ricoh? > > > > GRUB doesn't see anything on this bus (it has no drivers for the device), > > so booting from it is not possible. > > Of course it all depends on what you mean by "booting from". AFAICT in > Leandro's situation, he's loading Grub from some other disk (probably > the main HDD or SSD), so he's already "not booting from the SD card" in > this sense. By "booting from" I mean everything which is needed to bring the OS up is located on the SD or CF card. In essence, the card can be transferred to to another machine and will still boot. What you describe below I'd refer to as "booting into the OS" ; it cannoot be done without the assistance of software on the machine itself. I hope this is not an artificial distinction. > Based on what I see above, his normal boot has 3 steps (ignoring the > earlier BIOS/UEFI booting itself): > 1- load/start Grub > 2- load/start vmlinuz+initrd > 3- load/start /sbin/init from the LABEL=TAILS partition > > All 3 parts can be stored at different places. My guess is that step > 1 fetches its data (Grub's code as well as grub.cfg) from some HDD or > SSD. Apparently step 2 can't fetch its data from the SD card. > > But step 3 can definitely fetch its data from the SD card. So all you > need is to put your vmlinuz+initrd onto a disk that Grub can see > (e.g. alongside Grub rather than in the LABEL=TAILS partition). In principle this is a viable booting method but there are issues to be aware of. The kernel on the main HDD or SSD is unlikely to be the Tails kernel so a third device would be needed to hold such a kernel; any old kernel will not do. Then there is the initrd. The Tails one might not contain the drivers for the card reader, so that will have be attended to. Updates to any kernel or GRUB could lead to a failed boot. The OP in the original thread actually booted in this way from the hard disk, but (as it fortuitously happened) kernel, initrd and OS on hard disk and SD card were identical. Nice as it is to use the hardware built into a machine the acquisition of an external USB card reader could make life simpler when it comes to booting from an SD card. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| Date | 2017-05-05 20:00 +0200 |
| Message-ID | <tDPGi-4Wu-3@gated-at.bofh.it> |
| In reply to | #180736 |
>> Of course it all depends on what you mean by "booting from". AFAICT in
>> Leandro's situation, he's loading Grub from some other disk (probably
>> the main HDD or SSD), so he's already "not booting from the SD card" in
>> this sense.
> By "booting from" I mean everything which is needed to bring the OS up
> is located on the SD or CF card.
AFAIK in his case, Grub itself is already on another device because the
BIOS can't boot directly from the SD card. So, he can't "boot from" his
SD card using your definition.
> In essence, the card can be transferred to to another machine and will
> still boot. What you describe below I'd refer to as "booting into the
> OS" ; it cannoot be done without the assistance of software on the
> machine itself. I hope this is not an artificial distinction.
I fully agree: I myself tried to setup a "rescue USB key" that could
boot everywhere, but that simply can't work on those machines whose
BIOS simply doesn't know how to boot from USB.
> In principle this is a viable booting method but there are issues to be
> aware of.
Oh, yes.
> The kernel on the main HDD or SSD is unlikely to be the Tails
> kernel so a third device would be needed to hold such a kernel;
You don't need a third device. You need to consciously/carefully save
your Tails kernel and initrd somewhere on the HDD/SSD. You can use
a separate "TAILS-BOOT" partition on that HDD/SSD for that, or you can
place them in "the normal partition" but under a special name like
"vmlinuz-tails" and "inird.img-tails".
> The OP in the original thread actually booted in this way from the hard
> disk, but (as it fortuitously happened) kernel, initrd and OS on hard
> disk and SD card were identical.
That must have been "beginner's luck", indeed.
Stefan
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2017-05-05 20:40 +0200 |
| Message-ID | <tDQj0-5qv-25@gated-at.bofh.it> |
| In reply to | #180738 |
On Fri 05 May 2017 at 13:53:00 (-0400), Stefan Monnier wrote: > >> Of course it all depends on what you mean by "booting from". AFAICT in > >> Leandro's situation, he's loading Grub from some other disk (probably > >> the main HDD or SSD), so he's already "not booting from the SD card" in > >> this sense. > > By "booting from" I mean everything which is needed to bring the OS up > > is located on the SD or CF card. > > AFAIK in his case, Grub itself is already on another device because the > BIOS can't boot directly from the SD card. So, he can't "boot from" his > SD card using your definition. > > > In essence, the card can be transferred to to another machine and will > > still boot. What you describe below I'd refer to as "booting into the > > OS" ; it cannoot be done without the assistance of software on the > > machine itself. I hope this is not an artificial distinction. > > I fully agree: I myself tried to setup a "rescue USB key" that could > boot everywhere, but that simply can't work on those machines whose > BIOS simply doesn't know how to boot from USB. > > > In principle this is a viable booting method but there are issues to be > > aware of. > > Oh, yes. > > > The kernel on the main HDD or SSD is unlikely to be the Tails > > kernel so a third device would be needed to hold such a kernel; > > You don't need a third device. You need to consciously/carefully save > your Tails kernel and initrd somewhere on the HDD/SSD. You can use > a separate "TAILS-BOOT" partition on that HDD/SSD for that, or you can > place them in "the normal partition" but under a special name like > "vmlinuz-tails" and "inird.img-tails". I'm using a third device here for a different reason: what I'm booting is the netinst d-i, so the files on the hard drive will be blown away. I've booted From the pre-existing Grub2 on the hard drive, but Into the netinst.iso file on a FAT USB stick by loop-mounting it (Brian's terminology). That works fine until the d-i tries to read the "CD-ROM", but then it's simply a matter of pulling the FAT stick, inserting another one where netinst.iso has been copied to /dev/sdX itself (not to a FAT filesystem) and pressing Continue. > > The OP in the original thread actually booted in this way from the hard > > disk, but (as it fortuitously happened) kernel, initrd and OS on hard > > disk and SD card were identical. > > That must have been "beginner's luck", indeed. Actually, I think it was more because they used a sole Debian DVD for installing both the hard drive's system and the one on the SD. The OP in the original thread is probably one of the most experienced d-i installers on this list. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2017-05-05 20:40 +0200 |
| Message-ID | <tDQj2-5qv-61@gated-at.bofh.it> |
| In reply to | #180738 |
On Fri 05 May 2017 at 13:53:00 -0400, Stefan Monnier wrote: > >> Of course it all depends on what you mean by "booting from". AFAICT in > >> Leandro's situation, he's loading Grub from some other disk (probably > >> the main HDD or SSD), so he's already "not booting from the SD card" in > >> this sense. > > By "booting from" I mean everything which is needed to bring the OS up > > is located on the SD or CF card. > > AFAIK in his case, Grub itself is already on another device because the > BIOS can't boot directly from the SD card. So, he can't "boot from" his > SD card using your definition. Indeed. I thought I had highlighted that a few times, but maybe not. GRUB doesn't see a card reader on a PCI bus. > > > In essence, the card can be transferred to to another machine and will > > still boot. What you describe below I'd refer to as "booting into the > > OS" ; it cannoot be done without the assistance of software on the > > machine itself. I hope this is not an artificial distinction. > > I fully agree: I myself tried to setup a "rescue USB key" that could > boot everywhere, but that simply can't work on those machines whose > BIOS simply doesn't know how to boot from USB. GRUB's nativedisk could help with this. It does on my machines which don't know how to boot from USB. > > In principle this is a viable booting method but there are issues to be > > aware of. > > Oh, yes. > > > The kernel on the main HDD or SSD is unlikely to be the Tails > > kernel so a third device would be needed to hold such a kernel; > > You don't need a third device. You need to consciously/carefully save > your Tails kernel and initrd somewhere on the HDD/SSD. You can use > a separate "TAILS-BOOT" partition on that HDD/SSD for that, or you can > place them in "the normal partition" but under a special name like > "vmlinuz-tails" and "inird.img-tails". Fair enough. > > The OP in the original thread actually booted in this way from the hard > > disk, but (as it fortuitously happened) kernel, initrd and OS on hard > > disk and SD card were identical. > > That must have been "beginner's luck", indeed. I've done the same myself. It works. Great! Then I've discovered the special circumstances in which the procedure was carried out. Usually when something goes wrong. (Totally off-topic: I use the dialog utility with a gauge widget. After many years the script using it stopped working. I read the manual. It has "integer" in it for the section on gauge. One word made all the difference between a working and non-working script. The new input I have now has no integer values. No wonder the script didn't work). Aren't Debian computers wonderful? :) -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2017-05-05 15:00 +0200 |
| Message-ID | <tDKZX-1Q5-15@gated-at.bofh.it> |
| In reply to | #180715 |
On 05/05/2017 04:28 AM, Brian wrote:
> On Fri 05 May 2017 at 05:34:13 +0200, Leandro Noferini wrote:
>
>> Brian <ad44@cityscape.co.uk> writes:
>>
>>> 1. This HOWTO is a result of the discussion on debian-user beginning at
>
> It should be stressed that the HOWTO is applicable only to devices on
> the USB bus.
>
>> Thanks a lot for this document because it hits a problem I found many
>> months ago without solution for me. I would like to use my internal card
>> reader (Lenovo X240) to boot in tails (https://tails.boum.org)
>
> I rarely dabble in hardware-related things, so a mistake or two could
> creep into what follows.
>
>> My reader appears this way:
>>
>> ====================================================================
>> ~ $ lsusb
>> Bus 001 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
>> ====================================================================
>
> The Lenovo X240 has a Smart Card reader and a 4-in-1 card reader (MMC,
> SD, SDHC, SDXC). The Smart Card reader is on the USB bus. I have never
> used one but it appears to have something to do with identity cards.
> GRUB does not detect it with nativedisk so booting from it is not
> possible.
>
>> The sd card with tails on appears this way:
>>
>> ====================================================================
>> leandro@tricheco:~$ sudo fdisk /dev/mmcblk0
>>
>> Welcome to fdisk (util-linux 2.29.2).
>> Changes will remain in memory only, until you decide to write them.
>> Be careful before using the write command.
>>
>> Command (m for help): p
>> Disk /dev/mmcblk0: 7,4 GiB, 7969177600 bytes, 15564800 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> Disklabel type: gpt
>> Disk identifier: F12D15CF-2FC3-4852-8226-9D4F7E625B29
>>
>> Device Start End Sectors Size Type
>> /dev/mmcblk0p1 2048 5122047 5120000 2,5G EFI System
>> ====================================================================
>
> This is the 4-in-1 card reader; the one you want you are trying to boot
> from. As indicted by /dev/mmcblk0p1 it is on the PCI bus. 'lspci' should
> display the chip used; one from Ricoh?
>
> GRUB doesn't see anything on this bus (it has no drivers for the device),
> so booting from it is not possible.
>
>> Following your document I edited /etc/grub.d/40_custom adding these
>> lines:
>>
>> ====================================================================
>> menuentry 'Tails on CF card' {
>> insmod part_msdos
>> insmod ext2
>> echo "Running nativedisk command. Please wait."
>> nativedisk
>> search --label --set=root TAILS
>> linux /vmlinuz root=LABEL=TAILS ro
>> initrd /initrd.img
>> }
>> ====================================================================
>>
>> But it is not working.
>>
>> If I give the "nativedisk" command in grub command line I get only
>>
>> ====================================================================
>> (ahci0)
>> ====================================================================
>>
>> Where am I wrong?
>
> I think you have possibly not appreciated the distinction between a card
> reader on a USB bus and one on a PCI bus. The first should be visible to
> GRUB and nativedisk (but, as you have seen, isn't always). The second is
> never visible to GRUB.
>
Not true.
On my Lenovo T510 laptop I have
root@march-9-Jessie:/home/richard# ls /dev/mm*
/dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0p2 /dev/mmcblk0p5
Although my BIOS will not boot from /dev/mmcblk0, the GRUB resident on
/dev/sda1 has no trouble finding Debian on /dev/mmcblk0p1.
root@march-9-Jessie:/home/richard# lspci -tv
-+-[0000:ff]-+-00.0 Intel Corporation Core Processor QuickPath
Architecture Generic Non-core Registers
| +-00.1 Intel Corporation Core Processor QuickPath
Architecture System Address Decoder
| +-02.0 Intel Corporation Core Processor QPI Link 0
| +-02.1 Intel Corporation 1st Generation Core Processor
QPI Physical 0
| +-02.2 Intel Corporation 1st Generation Core Processor
Reserved
| \-02.3 Intel Corporation 1st Generation Core Processor
Reserved
\-[0000:00]-+-00.0 Intel Corporation Core Processor DRAM Controller
+-02.0 Intel Corporation Core Processor Integrated
Graphics Controller
+-16.0 Intel Corporation 5 Series/3400 Series Chipset
HECI Controller
+-19.0 Intel Corporation 82577LM Gigabit Network Connection
+-1a.0 Intel Corporation 5 Series/3400 Series Chipset
USB2 Enhanced Host Controller
+-1b.0 Intel Corporation 5 Series/3400 Series Chipset
High Definition Audio
+-1c.0-[02]--
+-1c.1-[03]----00.0 Intel Corporation Centrino Advanced-N
6200
+-1c.3-[05-0c]----00.0 Renesas Technology Corp. uPD720202
USB 3.0 Host Controller
+-1c.4-[0d]--+-00.0 Ricoh Co Ltd MMC/SD Host Controller
| +-00.1 Ricoh Co Ltd R5U2xx (R5U230 / R5U231
/ R5U241) [Memory Stick Host Controller]
| \-00.3 Ricoh Co Ltd R5C832 PCIe IEEE 1394
Controller
+-1d.0 Intel Corporation 5 Series/3400 Series Chipset
USB2 Enhanced Host Controller
+-1e.0-[0e]--
+-1f.0 Intel Corporation Mobile 5 Series Chipset LPC
Interface Controller
+-1f.2 Intel Corporation 5 Series/3400 Series Chipset 6
port SATA AHCI Controller
+-1f.3 Intel Corporation 5 Series/3400 Series Chipset
SMBus Controller
\-1f.6 Intel Corporation 5 Series/3400 Series Chipset
Thermal Subsystem
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2017-05-05 16:10 +0200 |
| Message-ID | <tDM5I-2OG-3@gated-at.bofh.it> |
| In reply to | #180722 |
On Fri 05 May 2017 at 07:58:06 -0500, Richard Owlett wrote: > On 05/05/2017 04:28 AM, Brian wrote: > > > >I think you have possibly not appreciated the distinction between a card > >reader on a USB bus and one on a PCI bus. The first should be visible to > >GRUB and nativedisk (but, as you have seen, isn't always). The second is > >never visible to GRUB. > > Not true. > On my Lenovo T510 laptop I have > > root@march-9-Jessie:/home/richard# ls /dev/mm* > /dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0p2 /dev/mmcblk0p5 > > Although my BIOS will not boot from /dev/mmcblk0, the GRUB resident on > /dev/sda1 has no trouble finding Debian on /dev/mmcblk0p1. What I said is true. What you say above is also true. Of course, we are talking about different things. :) -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2017-05-05 17:00 +0200 |
| Message-ID | <tDMS6-35I-11@gated-at.bofh.it> |
| In reply to | #180722 |
On Fri 05 May 2017 at 07:58:06 (-0500), Richard Owlett wrote:
> On 05/05/2017 04:28 AM, Brian wrote:
> >On Fri 05 May 2017 at 05:34:13 +0200, Leandro Noferini wrote:
> >
> >>Brian <ad44@cityscape.co.uk> writes:
> >>
> >>>1. This HOWTO is a result of the discussion on debian-user beginning at
> >
> >It should be stressed that the HOWTO is applicable only to devices on
> >the USB bus.
> >
> >>Thanks a lot for this document because it hits a problem I found many
> >>months ago without solution for me. I would like to use my internal card
> >>reader (Lenovo X240) to boot in tails (https://tails.boum.org)
> >
> >I rarely dabble in hardware-related things, so a mistake or two could
> >creep into what follows.
> >
> >>My reader appears this way:
> >>
> >>====================================================================
> >>~ $ lsusb
> >>Bus 001 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
> >>====================================================================
> >
> >The Lenovo X240 has a Smart Card reader and a 4-in-1 card reader (MMC,
> >SD, SDHC, SDXC). The Smart Card reader is on the USB bus. I have never
> >used one but it appears to have something to do with identity cards.
> >GRUB does not detect it with nativedisk so booting from it is not
> >possible.
> >
> >>The sd card with tails on appears this way:
> >>
> >>====================================================================
> >>leandro@tricheco:~$ sudo fdisk /dev/mmcblk0
> >>
> >>Welcome to fdisk (util-linux 2.29.2).
> >>Changes will remain in memory only, until you decide to write them.
> >>Be careful before using the write command.
> >>
> >>Command (m for help): p
> >>Disk /dev/mmcblk0: 7,4 GiB, 7969177600 bytes, 15564800 sectors
> >>Units: sectors of 1 * 512 = 512 bytes
> >>Sector size (logical/physical): 512 bytes / 512 bytes
> >>I/O size (minimum/optimal): 512 bytes / 512 bytes
> >>Disklabel type: gpt
> >>Disk identifier: F12D15CF-2FC3-4852-8226-9D4F7E625B29
> >>
> >>Device Start End Sectors Size Type
> >>/dev/mmcblk0p1 2048 5122047 5120000 2,5G EFI System
> >>====================================================================
> >
> >This is the 4-in-1 card reader; the one you want you are trying to boot
> >from. As indicted by /dev/mmcblk0p1 it is on the PCI bus. 'lspci' should
> >display the chip used; one from Ricoh?
> >
> >GRUB doesn't see anything on this bus (it has no drivers for the device),
> >so booting from it is not possible.
> >
> >>Following your document I edited /etc/grub.d/40_custom adding these
> >>lines:
> >>
> >>====================================================================
> >>menuentry 'Tails on CF card' {
> >> insmod part_msdos
> >> insmod ext2
> >> echo "Running nativedisk command. Please wait."
> >> nativedisk
> >> search --label --set=root TAILS
> >> linux /vmlinuz root=LABEL=TAILS ro
> >> initrd /initrd.img
> >>}
> >>====================================================================
> >>
> >>But it is not working.
> >>
> >>If I give the "nativedisk" command in grub command line I get only
> >>
> >>====================================================================
> >>(ahci0)
> >>====================================================================
> >>
> >>Where am I wrong?
> >
> >I think you have possibly not appreciated the distinction between a card
> >reader on a USB bus and one on a PCI bus. The first should be visible to
> >GRUB and nativedisk (but, as you have seen, isn't always). The second is
> >never visible to GRUB.
> >
>
> Not true.
> On my Lenovo T510 laptop I have
>
> root@march-9-Jessie:/home/richard# ls /dev/mm*
> /dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0p2 /dev/mmcblk0p5
>
> Although my BIOS will not boot from /dev/mmcblk0, the GRUB resident
> on /dev/sda1 has no trouble finding Debian on /dev/mmcblk0p1.
Which Grub are you talking about? Just to clarify, Grub running in
Linux (lspci, lsusb, etc given to a $ or # prompt) may have no
trouble; it's got a full set of drivers available. What we're
interested in is Grub running at boot time where it gives this
prompt:
grub>
This can still be part of "GRUB resident on" /dev/sda, if not
/dev/sda1, but the Linux OS's drivers are absent.
Looking back at this and the preceding thread, you posted:
> On 04/12/2017 12:13 PM, Pascal Hambourg wrote:
>> - while the SD card is inserted, in the GRUB menu press "c" to enter a
>> GRUB shell and report the result of the "ls" command.
>
>Did not see any way to capture the output. So made manual copy. The
>following appeared on a single line.
>
>(hd0) (hd0, msdos9) (hd0, msdos8) (hd0, msdos7) (hd0, msdos6)
>(hd0, msdos5) (hd0, msdos1) (hd1) (hd1, msdos1)
I see nothing here corresponding to /dev/mmcblk0p1.
> My notes are:
>
> with no usb devices present, I get
> (ahci) (ahci0,msdosXX) (ahci1)
> where XX maches the partions on my "hard disk" {it is actually a
> solid state drive which was manufactured to be a plugin replacement
> for original mechanical dive (aka 'spinning rust'}.
> I don't know what (ahci1) is.
>
> Repeating above with empty card reader I get:
> (ahci) (ahci0,msdosXX) (usb0a) (usb0b) (ahci1)
>
> I repeated the above with the SD card plugged into a USB card reader
> getting:
> (ahci) (ahci0,msdosXX) (usb0a) (usb0a,msdos1) (usb0b) (ahci1)
>
> When not using "nativedisk" in the second case I get:
> (hd0) (hd0,msdosXX) (hd1) (hd1,msdos1)
I see nothing here corresponding to /dev/mmcblk0p1.
(For those who haven't looked back at the thread, the (hd1,msdos1)
seen here is a red herring, a "USB flash drive that was plugged in.
It is FAT formatted and used to exchange information with my Windows
machine.")
What we haven't yet seen posted is the unambiguous output of
grub> ls
grub> nativedisk
grub> ls
for the Lenovo with only the SD card and the internal drive (needed
to boot the MBR) connected; the SD card plugged into the actual
slot cut out of the casing of the PC, of course, and not through
some other hardware device/adapter/reader/choose-your-favourite-word.
All the stuff left ahead is Linux stuff, not Grub:
> root@march-9-Jessie:/home/richard# lspci -tv
> -+-[0000:ff]-+-00.0 Intel Corporation Core Processor QuickPath
> Architecture Generic Non-core Registers
> | +-00.1 Intel Corporation Core Processor QuickPath
> Architecture System Address Decoder
> | +-02.0 Intel Corporation Core Processor QPI Link 0
> | +-02.1 Intel Corporation 1st Generation Core Processor
> QPI Physical 0
> | +-02.2 Intel Corporation 1st Generation Core Processor
> Reserved
> | \-02.3 Intel Corporation 1st Generation Core Processor
> Reserved
> \-[0000:00]-+-00.0 Intel Corporation Core Processor DRAM Controller
> +-02.0 Intel Corporation Core Processor Integrated
> Graphics Controller
> +-16.0 Intel Corporation 5 Series/3400 Series Chipset
> HECI Controller
> +-19.0 Intel Corporation 82577LM Gigabit Network Connection
> +-1a.0 Intel Corporation 5 Series/3400 Series Chipset
> USB2 Enhanced Host Controller
> +-1b.0 Intel Corporation 5 Series/3400 Series Chipset
> High Definition Audio
> +-1c.0-[02]--
> +-1c.1-[03]----00.0 Intel Corporation Centrino
> Advanced-N 6200
> +-1c.3-[05-0c]----00.0 Renesas Technology Corp.
> uPD720202 USB 3.0 Host Controller
> +-1c.4-[0d]--+-00.0 Ricoh Co Ltd MMC/SD Host Controller
> | +-00.1 Ricoh Co Ltd R5U2xx (R5U230 /
> R5U231 / R5U241) [Memory Stick Host Controller]
> | \-00.3 Ricoh Co Ltd R5C832 PCIe IEEE 1394
> Controller
> +-1d.0 Intel Corporation 5 Series/3400 Series Chipset
> USB2 Enhanced Host Controller
> +-1e.0-[0e]--
> +-1f.0 Intel Corporation Mobile 5 Series Chipset LPC
> Interface Controller
> +-1f.2 Intel Corporation 5 Series/3400 Series Chipset
> 6 port SATA AHCI Controller
> +-1f.3 Intel Corporation 5 Series/3400 Series Chipset
> SMBus Controller
> \-1f.6 Intel Corporation 5 Series/3400 Series Chipset
> Thermal Subsystem
Cheers,
David.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web