Ben NanoNote Plans and a Question on U-Boot Ext 3 & 4 Support

Riley Paxton mrrhq1 at gmail.com
Sat Aug 11 20:00:29 EDT 2012


Bas,

Thank you for responding to my E-Mail. I appreciate it. I have to
admit that I do have limited knowledge on the current limitations of
U-Boot. I am glad to find out another Debian user who also (hopefully)
has a NanoNote. Is that why you've subscribed to this mailing list?

On 8/11/12, Bas Wijnen <wijnen at debian.org> wrote:
> [...] In
> any case, I'd set your priorities: there is a working emergency recovery
> procedure, by chrooting into, of fsck-ing, the system on the card from a
> different computer (or the system on nand). So I wouldn't put your
> effort in getting a recovery console working. You hardly ever need it
> anyway.
>

I suppose so, but I've had problems with ext2 before when I install a
new kernel and remove old ones on my PC, and likewise, when I plan to
install and update the uImage on my NanoNote. However, I'm not sure if
APT will even list the OpenWrt kernel image, so it probably won't
update it.

> Any non-x86 system has its own boot loader; Debian doesn't have much to
> do with it. Most limitations you see are in our boot loader, uboot, not
> in Debian.
> [...]
> A grub commandline is very
> limited, and can't run fsck. If you want a real shell, you first need to
> boot a real system. Debian's recovery console is started from an
> initramfs. If you get that to boot, your kernel and initramfs are
> working. If those are broken, you need more drastic recovery. Getting
> initramfs on ben should in principle be possible, but I don't think
> uboot supports it.
>

Oh, I've ran into boot problems back when GRUB2 was buggy, and the
kernel dumped me to initramfs. I see what you mean. I thought
initramfs was specific to Debian regardless of U-Boot.

>> It's also really dissapointing that there are no official Debian
>> "distros" for the Ben NanoNote, but it's not to much of a problem.
>
> If you want to make that happen, I'm happy to help you. I'm not going to
> lead that project, though, and I think you can spend your energy on more
> important things as well if I see your ambitions. ;-)
>

No, thanks. I have too much to do. I already procrastinate too much as
it is. I swear it's a sign if my immature id.

>> Anyway, I have attempted to Debootstrap Debian Sid on to my NanoNote's
>> SD Card. But for some reason the second-stage of the Debootstrap
>> process has problems unpacking traceroute, so I'm not sure what to do
>> with that...
>
> That's strange; I'd like to reproduce that. Did you do anything special?
> Did you prepare the system with --foreign on a desktop, or from openwrt?
> The second stage you did from a chroot, I suppose?
>

I followed the steps exactly. You'd have to run the exact same
instructions. Here's the thing, the Qi Wiki doesn't specify which
commands to run as root or as the user (No "$" or "#"), so I assumed
to mostly run it as root after the "sudo -s" instruction or whenever I
felt safe enough that it was an error due to me not being root, of
course. I also was not able to get networking off of the BNN when I
did the --second-stage instruction. And, yes, I made sure to use
--foreign. I questioned it, then I read in the manual what that does.

And I did the first stage Debootstrap on my Debian Sid desktop.
However, I did not download the deboostrap folder to a package, I
desicded to install it with apt-get instead. I also didn't do export
DEBOOTSTRAP_DIR="." command. But the first stage went fine with no
timeouts, retires, errors or anything. The second stage after I copied
over, had problems (was using ext4 at the time).

The whole process took longer than several minutes, so I'm not sure if
I want to try reproducing it again (but I'll try it again anyway, so,
whatever).

>> And, also, it does not support booting from any other
>> filesytems than ext2.
>
> That's uboot's fault. I think it can also do vfat, but that doesn't
> improve things. ;-)
>
> However, only the kernel needs to be on vfat or ext2. If you partition
> your card with the kernel on a small ext2 partition, it should be able
> to get its root filesystem from the other partition, which can be
> anything that you have compiled support in for.
>

I don't know... Maybe the custom OpenWrt kernel does not support
ext3/4. If not, I may have to figure out how to roll my own Debian
kernel, which I doubt will go well, even though I have seen others
(Pyneo and Mister-Muffin) work. I don't know if an up to date Debian
Sid kernel later than 3.0 would work. I could try getting this to work
first, before I try the Deboostrap again, and see if it attempts to
boot.

>> Booting from ext2 wouldn't be a problem for me
>> if I could run fsck on a recovery terminal on the Ben NanoNote. Does
>> anyone know if Debian mipsel has a way to get to such a terminal, or
>> not?
>
> [...] I think you want an initramfs-based boot. The current
> bootloader, uboot, is not able to do that AFAIK. I wouldn't worry about
> it for now.
>

I figured. Good to know.

>> I may plan to get rid of OpenWrt on the NAND. If I
>> come to that decision, how do I easlity repair my Debian system just
>> in case I need to?
>
> You should be able to boot a system over usbnet, which you can use for
> recovery. However, there currently isn't any system which can be booted
> that way. It should be possible with Debian, I suppose; I haven't tried
> yet. In any case, you can reflash your nand with that approach, and boot
> that new system. Of course that's not a way to repair the system on your
> nand, only to replace it.
>

Thank you for telling me about usbnet. I will look into that. Oh,
right, maybe QEMU supports PXE booting, and if I can finally get the
freaking networking on my BNN working again, I can try that with
QEMU's mipsel emulation. I have no idea if it'd work with an XBurst
uImage though.

>> It'd be nice if there was an options menu to set the default boot to
>> MicroSD, so I wouldn't have to keep editing qi_lb60.h in the
>> openwrt-xburst U-Boot source tree. Perhaps have Power+O go to an
>> options menu, using an ncurses-style BIOS menu, and Power+R to start
>> up a tty recovery terminal running ash or bash, which can then be used
>> to mount and chroot into a file system. It might be useful if the OS
>> doesn't have a recovery feature.
>
> For recovery, I'd prefer booting over usb. When using anything on nand,
> you still depend on a working boot loader. And it might not be a good
> idea to make the boot loader so complex that it can run fsck by itself.
>

Well, I know why no one wants to add complexity to U-Boot, you want it
to follow the UNIX philosophy! Right guys? Just kidding. It's probably
because a lot of embedded systems use it and, in that case, simpler is
better. I guess keeping OpenWrt on NAND won't hurt for recovery
reasons, if it just takes up like 60MB or whatever.

I have a Sansa Clip Zip, and the Rockbox crew recommends that I keep
the original firmware or else I'd have to tear the thing apart and use
JTAG flashing. Blasphemy! If only it was as easy to screw up the
software and flash again like the NanoNote. This might sound silly,
but the Ben (or the future one) might also be a prime platform for
Rockbox. What do you think? Haha!

No, I'd rather get a more functional Debian system working on it.




More information about the discussion mailing list


interactive