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

Bas Wijnen wijnen at
Sat Aug 11 06:15:24 EDT 2012


On 11-08-12 02:45, Riley Paxton wrote:
> I am a new member here.


> My plan is to use it is mainly as a secure password vault, play free
> software Dingoo A320 games, and use it as a Debian Sid PC. This
> requires me to set up a Debian system with LUKS encryption (to prevent
> easy offline attacks), a password manager, and Dingoo libraries.

That sounds ambitious, but possible.

> I'm having some issues with Debootstrap and I am worried about using
> ext2, because, if I use ext2, I will need to fsck it sometimes.
> Without a recovery console in Debian I would need to possibly repair
> it somehow--or chroot into it?? I have an SD Card reader, but I don't
> always want to remove the SD Card from my NanoNote. I mostly just want
> it to be there like a permanent harddrive.

Some things you suggest below are possible, others aren't, I think. 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

> I wish I could use a recovery console (not over serial) or  bring up a
> rescue terminal, with GRUB. But I don't think EmDebian or Debian
> mipsel uses GRUB. . .

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. See below.

> Maybe I'm wrong about this and there is a way to
> open a recovery console, even without GRUB, on Debian.

Not sure what you call a "console" here. 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.

> 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. ;-)

> 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?

> 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.

> 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?

See above. 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 want my NanoNote to be a self sustaining system, with the
> recovery tools I need to repair itself without always needing to take
> out the SD Card, or hooking it in to USB. A really good idea would be
> to have an option to provide a terminal over USB, not just serial,
> during boot time.

A good idea indeed, but also complex. It means the bootloader must
contain a usb driver. But it's usb device, not host, so the complexity
isn't as bad as it may seem. :-)

> 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.

> 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.

Good luck!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the discussion mailing list