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

Re: Booting a CF or SD card from an internal card reader

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.


Reply to: