Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Installing Debian Buster on Cubox-i4 with eSATA drive.

116 views
Skip to first unread message

Rick Thomas

unread,
Jan 27, 2021, 11:30:04 PM1/27/21
to
I'm trying to install Debian Buster [1] on my Cubox-i4P with an eSATA drive. Everything seems to be fine, but when it comes time to reboot, it boots into the installer again, rather than the installed system.

Here's what I did, and what I observed:

*) I downloaded the two parts of the SDcard install image from [1] and followed the instructions in the README to create a 4GB (I didn't have anything smaller) SDcard installer.
*) I connected the eSATA disk and plugged the SDcard into the Cubox and powered it up.
*) It booted off the SD-card into the installer as expected.
*) Everything went as expected, until it got to the partition-disks phase.
*) I chose to use the eSATA disk as the installation target. I told it to use the whole disk and use the LVM method of partitioning.
*) It created the /boot ext2 partition in /dev/sda1 and put root, /home and swap in the LVM on /dev/sda5. This is (I think) exactly what I wanted.
*) There was no mention of the SDcard /dev/mmcblk1 (except when initially choosing the target disk -- I did explicitly NOT choose it at this time)
*) I allowed it to wipe and re-partition the eSATA disk, which it did without incident.
*) Everything proceeded as expected. I chose a minimal (ssh and base packages) in tasksel.
*) When it came to "make it bootable" I said go ahead. There was no mention of /dev/mmcblk1 at this stage.
*) It proceeded from there without any apparent errors.
*) When it came time to reboot, I said go ahead.
*) But when the reboot happened, I found myself back in the installer.
*) I tried removing the SDcard and rebooting, but it failed to boot -- after power-on nothing happened.

What I hoped would happen with the eSATA drive was that the installer would write the boot firmware (u-boot, etc) to the SDcard, and configure it to get /boot, root, /home, swap off the eSATA.

What I suspect has happened is that the boot firmware (u-boot, etc) was written to the eSATA drive and so it can't be found by the power-up routine without some reconfiguration to tell it to look at the eSATA, but that isn't happening.

Anybody know what I can do to either:
1) Tell the power-up routines to look at the eSATA?
or
2) Write the boot firmware to the SD card and configure it to get the rest of the system from the eSATA?

Debug logs were saved, and can be provided upon request.

Thanks in advance for any help!
Rick

PS: In a previous attempt, I used a 64GB SDcard without the eSATA disk -- putting everything onto the SDcard. That worked fine (It put the boot stuff on the SDcard) but it's horribly slow due to the very low speed of data transfer to and from the SDcard.

[1] http://http.us.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/SD-card-images/

Jeremy Ardley

unread,
Jan 27, 2021, 11:40:05 PM1/27/21
to
I think you'll find the device can't boot off e-SATA. The normal
work-around is to have an initial SD or USB device with /boot only that
does the first stage of the boot and then uses the eSATA file system for
the subsequent stages.

This process is automated in some distros such as Armbian. I have used
this process with the FriendlyElec NanoPi M4V2 which has an M.2 PCIE drive

--
Jeremy


OpenPGP_signature

Andrei POPESCU

unread,
Jan 28, 2021, 1:40:05 AM1/28/21
to
On Mi, 27 ian 21, 20:03:22, Rick Thomas wrote:
> I'm trying to install Debian Buster [1] on my Cubox-i4P with an eSATA
> drive. Everything seems to be fine, but when it comes time to reboot,
> it boots into the installer again, rather than the installed system.
>
> Here's what I did, and what I observed:

[...]

> What I hoped would happen with the eSATA drive was that the installer
> would write the boot firmware (u-boot, etc) to the SDcard, and
> configure it to get /boot, root, /home, swap off the eSATA.
>
> What I suspect has happened is that the boot firmware (u-boot, etc)
> was written to the eSATA drive and so it can't be found by the
> power-up routine without some reconfiguration to tell it to look at
> the eSATA, but that isn't happening.
>
> Anybody know what I can do to either:
> 1) Tell the power-up routines to look at the eSATA?
> or

If at all possible this is highly device specific, so you should check
the support channels (forums, etc.) for Cubox-i4P.

> 2) Write the boot firmware to the SD card and configure it to get the
> rest of the system from the eSATA?

[...]

> PS: In a previous attempt, I used a 64GB SDcard without the eSATA
> disk -- putting everything onto the SDcard. That worked fine (It put
> the boot stuff on the SDcard) but it's horribly slow due to the very
> low speed of data transfer to and from the SDcard.

Something like this could work:

1. Install Debian to an SD-card (maybe a minimal install if the card is
small), make sure to have a separate /boot.

2. Partition your eSATA drive as you see fit and copy the contents of
the / partition (and others if any) to the drive.

This is best done on another computer.

3. Find where/how the root= parameter is passed to the kernel and adjust
it to point to the / partition on the eSATA drive instead.

4. Adjust /etc/fstab on the eSATA drive to have the /boot partition
mounted to /boot. This is necessary to make kernel updates work.

If possible configure flash-kernel to keep your boot= parameter,
otherwise you'll have to do that manually at each kernel upgrade.

If the boot process is simple enough it might be possible to switch to
u-boot-menu instead of flash-kernel. It's much simpler and easier to
configure, and also provides a text boot menu.


Hope this helps,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser
signature.asc

Vagrant Cascadian

unread,
Jan 28, 2021, 2:30:05 AM1/28/21
to
On 2021-01-27, Rick Thomas wrote:
> I'm trying to install Debian Buster [1] on my Cubox-i4P with an eSATA
> drive. Everything seems to be fine, but when it comes time to reboot,
> it boots into the installer again, rather than the installed system.
>
> Here's what I did, and what I observed:
>
> *) I downloaded the two parts of the SDcard install image from [1] and followed the instructions in the README to create a 4GB (I didn't have anything smaller) SDcard installer.
> *) I connected the eSATA disk and plugged the SDcard into the Cubox and powered it up.
> *) It booted off the SD-card into the installer as expected.
...
> *) But when the reboot happened, I found myself back in the installer.
> *) I tried removing the SDcard and rebooting, but it failed to boot -- after power-on nothing happened.

> What I hoped would happen with the eSATA drive was that the installer
> would write the boot firmware (u-boot, etc) to the SDcard, and
> configure it to get /boot, root, /home, swap off the eSATA.

U-boot can only be loaded from microSD on that platform, as far as I'm
aware.

You can use the bootloader from the installer image, just delete the
boot.scr and/or extlinux.conf from the partition on the installer image,
or make another partition on the microSD card, and mark it bootable, but
don't put anything on it. Then u-boot should fall back to loading the
kernel+initrd+device-tree off of the eSATA.

If you interrupt the boot process and get to a u-boot prompt, you should
be able to see the order of devices u-boot tries to boot from with:

printenv boot_targets


Now that bullseye is in the early phases of freeze, please consider
testing bullseye, too, if you can! :)


live well,
vagrant
signature.asc

Rick Thomas

unread,
Jan 28, 2021, 3:30:05 AM1/28/21
to
Thanks! This sounds like it ought to work. I'll give it a try.

For bullseye, where should I download the latest installer image from? I'd love to give it a try as well!
Rick

Rick Thomas

unread,
Jan 28, 2021, 9:40:04 PM1/28/21
to
That worked!

Specifically, what I did was:
*) on a different machine, I mounted the installer SDcard first partition
*) renamed boot.scr to oboot.scr
*) sync and umount the SDcard.
*) inserted it in the Cubox
*) powered up and watched it boot from the eSATA disk.

Whoopie!

Observations:
*) => printenv boot_targets
boot_targets=mmc0 sata0 usb0 pxe dhcp

*) It located the /boot partition on the eSATA drive without any help from me. I assume that means it goes down the list of boot_targets one by one looking for an active bootable partition containing a file called "boot.scr" which it then executes to perform the remainder of the boot process (mostly to load the kernel and initrd , then pass control to them).

*) I wonder if it would be possible to change the "boot_targets" environment variable to put "sata0" first? Would that work, if it could be done? If that were done, would it mess up booting from the SDcard when there was no eSATA drive?

So now, the next question is: how do we convince the debian installer to recognize that it's installing to the eSATA drive and either set "boot_targets" appropriately, or mark the boot partition on the SDcard as not bootable.

I've added "debian-boot" to the CC list of this email. Should I file a bug report? If so, what package should I file it against?

Next thing to test -- can I install bullseye the same way?

Thanks very much to everyone for all your help!
Rick

Holger Wansing

unread,
Jan 29, 2021, 4:10:05 AM1/29/21
to
Hi,

"Rick Thomas" <rick....@pobox.com> wrote:
> On Thu, Jan 28, 2021, at 6:21 PM, Rick Thomas wrote:
>
> > Next thing to test -- can I install bullseye the same way?
>
> So I tried installing bullseye from [1] which, incidentally is dated Dec 2, 2020. Isn't this kinda old for a "current" Bullseye?

That's from the latest alpha release.

> It booted and the installer started, but when it got to "Download installer components" I got a red error screen. I've attached a screenshot.
>
> I'm guessing that "kinda old" is the problem. The kernel on [1] is out of date with respect to the kernel(s) available on deb.debian.org ?
>
> Where should I look for one that's more up-to-date?

On https://www.debian.org/devel/debian-installer/
you should look under the daily snapshots.
For armhf that would be
https://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/


Holger

--
Holger Wansing <hwan...@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076

Rick Thomas

unread,
Jan 29, 2021, 10:20:05 PM1/29/21
to
Hi!

On Fri, Jan 29, 2021, at 1:03 AM, Holger Wansing wrote:
> On https://www.debian.org/devel/debian-installer/
> you should look under the daily snapshots.
> For armhf that would be
> https://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/

I downloaded the two-part image from [1] dated 2021-01-30 and tried to install it on my Cubox-i4.

It booted fine but when it got to the "Detect network hardware" phase, it failed and said:

No Ethernet card was detected. If you know the name of the driver
needed by your Ethernet card, you can select it from the list.
Driver needed by your Ethernet card:
and gave a long list of available ethernet drivers.

I couldn't find anything that looked like an Atheros 8035 driver, which seems to be the one in use when I boot with a working system.

Any suggestions?
Thanks!
Rick

[1] https://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/
dated 2021-01-30

Vagrant Cascadian

unread,
Jan 29, 2021, 10:50:04 PM1/29/21
to
On 2021-01-29, Rick Thomas wrote:
> Hi!
>
> On Fri, Jan 29, 2021, at 1:03 AM, Holger Wansing wrote:
>> On https://www.debian.org/devel/debian-installer/
>> you should look under the daily snapshots.
>> For armhf that would be
>> https://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/
>
> I downloaded the two-part image from [1] dated 2021-01-30 and tried to install it on my Cubox-i4.
>
> It booted fine but when it got to the "Detect network hardware" phase, it failed and said:
>
> No Ethernet card was detected. If you know the name of the driver
> needed by your Ethernet card, you can select it from the list.
> Driver needed by your Ethernet card:
> and gave a long list of available ethernet drivers.

I'm having a similar issue on a hummingboard-i2ex (which is kind of like
a single-board-computer variant of the Cubox-i) on an already installed
system running linux 5.10.x, while 5.9.x works fine on that system, so
seems to be a regression in the kernel.


> I couldn't find anything that looked like an Atheros 8035 driver, which seems to be the one in use when I boot with a working system.

Pretty sure it is not atheros, but handled by:

drivers/net/ethernet/freescale/fec_main.c

Not sure what exact module or built-in that ends up in.


live well,
vagrant
signature.asc

Rick Thomas

unread,
Feb 6, 2021, 8:10:05 PM2/6/21
to
I tried it again, this time with the components dated 2021-02-06 (today).
I was hoping that the problem was transient and might have been fixed in the intervening week, but I still got the same result: "No Ethernet card was detected."

Do I need to file a bug report? If so, to which package? If I do, is there any chance it will be fixed before Bullseye is released into the wild?
Is there a known workaround that I can apply?

Thanks for any help!
Rick

Vagrant Cascadian

unread,
Feb 6, 2021, 8:50:05 PM2/6/21
to
Pretty sure it is a kernel bug, since I can make it go away on a similar
system by downgrading to linux 5.9.x. Please CC me on the report and
I'll try to contribute what I can!


live well,
vagrant
signature.asc
0 new messages