New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Discuss development on Bubba
Post Reply
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by sakaki »

Hello,

I've just released version 1.1.0 of the live-USB image of Gentoo Linux for the Bubba|2 (B2) on GitHub (here). The kernel has been upgraded to version 4.0.4. All included packages are up-to-date against the Gentoo tree, as of 22 May 2015 (and so, of course, shellshock, heartbleed and Ghost fixes have been applied). A full package list may be viewed here.

As before, you can burn the supplied image to a USB key (>=8GB, Lexar and SanDisk keys seem the most reliable; please see this note for a quick way to check compatibility), then boot your B2 from it, without affecting any installed (Excito) system on your B2's hard drive. (The compressed image is 324MiB; writing takes between 10 and 20 minutes, depending on your system.) You can even boot a diskless B2! No soldering, compilation or U-Boot flashing is required.

The live-USB may then be used as a rescue disk, to play with Gentoo Linux, or as the starting point to install Gentoo Linux on your B2's main hard drive. Any packages you install, or other changes you make, while running the live-USB are saved on the USB key, but do not affect your existing Excito system, so you can run Gentoo for a while, then reboot back into your Excito system and continue to use it as normal, then boot back into the USB at a later date - any changes you made will still be there when you do.

Full instructions are provided on the project's GitHub page (including how to specify initial network settings, so you can ssh in once booted, and how to install Gentoo on your B2's internal hard drive too, in case you want to do that).

Some other changes in this release:
  • Overlay management has been migrated to the new Portage plug-in sync system (from layman);
  • Configuration files in /etc/portage/... have been migrated to a directory/sub-files structure (now the default in the Gentoo installation media);
  • The workaround to enable net-misc/dhcpcd to compile with v4 kernel headers has been implemented (please see here);
  • The rear button can now be used to power-off the B2 (due to this fix in gentoo-b2-kernel-patches);
  • Scripts have been supplied (as part of the image) to simplify HDD installation, for those who wish to do so (this remains entirely optional). They are /root/install_on_sda.sh and /root/install_on_sda_gpt.sh (latter requires an updated U-boot);
  • The ssh host keys have been removed from the image, for security (they are now auto-generated on first boot);
  • The same image may now be used to boot both standard and diskless B2s (shifted to UUID-based naming).
The GitHub project has an associated wiki. I have a few notes there on how to set up your PC as a cross-compilation / distcc server for the B2, to accelerate builds (you don't need to do this just to play with the image, of course). Feel free to add your own material!

Have fun ^-^

best,
sakaki

PS - barring any major bugs on there, this'll be my last B2 live-USB image for a while - perhaps unsurprisingly, there aren't a huge number of people using Gentoo on their venerable Bubba|2 boxes! The Gentoo and, particularly, Arch, live-USBs for the B3 seem to be a lot more popular, and with my current RISC-V commitments, I don't have a lot of cycles spare ATM... Bit of a shame; the B2 is still a perfectly capable machine for many routine server / firewall tasks! If only it still had upstream Arch support... S
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by MouettE »

sakaki wrote:Scripts have been supplied (as part of the image) to simplify HDD installation, for those who wish to do so (this remains entirely optional). They are /root/install_on_sda.sh and /root/install_on_sda_gpt.sh (latter requires an updated U-boot);
As far as I know, there is no updated U-Boot for the Bubba|2 (the modified source for the current 1.3.4-00056-gf6f51b1-dirty version were nowhere to be found). As stated this version does not support the GPT format, unfortunately.

That being said, if you have an updated version, I'm very interested :P
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by sakaki »

MouettE wrote:As far as I know, there is no updated U-Boot for the Bubba|2 (the modified source for the current 1.3.4-00056-gf6f51b1-dirty version were nowhere to be found). As stated this version does not support the GPT format, unfortunately.

That being said, if you have an updated version, I'm very interested :P
I guess it wouldn't be too hard to bring up a custom spin of U-boot for the B2: we have the B2's device-tree source, the B2 board-setup kernel source, the MPC83xx ... MPC8313ERDB sources in U-Boot, and various datasheets to work from...

However, before flashing anything, I'd want to be able to restore a working U-boot via the serial port if I bricked it (which I probably would!) In this earlier post, Johannes talks about using the B2's hardware bootloader to suck in an intermediate loader, and then the U-boot image, via the serial port (which I have connected on the B2). I know you got a similar setup working on the B3, but did you ever get this to work on the B2? Is that intermediate loader available somewhere?

Best,

sakaki
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by MouettE »

sakaki wrote:However, before flashing anything, I'd want to be able to restore a working U-boot via the serial port if I bricked it (which I probably would!) In this earlier post, Johannes talks about using the B2's hardware bootloader to suck in an intermediate loader, and then the U-boot image, via the serial port (which I have connected on the B2). I know you got a similar setup working on the B3, but did you ever get this to work on the B2? Is that intermediate loader available somewhere?
I didn't spend much time on this but my research wasn't very successful on wether you could run or flash U-Boot directly from the serial line. I don't remember exactly but the procedure was either too complicated/risky or nowhere to be found.

IMO, the current limitations of U-Boot on the B2 I have seen do not justify this kind of work :
  • No GPT support
  • Inode size limited to 128 for ext2/ext3 filesystem which holds the kernel
  • Buggy USB support (that one is probabbly the most annoying for end-users)
As it can boot from the network too, I'm pretty satisfied as a dev. That being said upgrading U-Boot would be a nice hack :wink:
andy_b2_user
Posts: 20
Joined: 22 Jun 2015, 16:32

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by andy_b2_user »

Hi All.

Just been trying to find an usb stick which would work on my B2, without any success, but what I did find is the uboot seems to be the missing version quoted above.
root@bubba:~# strings /dev/mtd0 | grep U-Boot
VU-Boot 1.3.4-00056-gf6f51b1-dirty (Nov 4 2008 - 18:48:46) MPC83XX
U-Boot
** Invalid partition type "%.32s" (expect "U-Boot")
root@bubba:~#
I am not sure if it is possible to make a copy of the memory, but I am will to try if some details are forwarded.

Andy.

PS A method of updating the B2 software not via the usb ports appears to be needed.
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by MouettE »

Your U-Boot version is correct and the same as ours. No need to copy anything.
andy_b2_user wrote:PS A method of updating the B2 software not via the usb ports appears to be needed.
The B2 can boot :
  • From the SATA drives
  • From USB drives
  • From the network (with tftp)
The default configuration which resides on the flash only allows booting from the first partition of the first sata drive (default) or from the first partition of the first usb hard drive (when powering on with button pushed). Changing this boot behaviour can only be done either directly from u-boot by interrupting the boot process with a serial connection (the flash settings do not need to be changed) or by changing flash settings which can be risky. Booting from the hard drive or the network works very well but unfortunately USB is not that reliable.
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by sakaki »

andy_b2_user wrote:Just been trying to find an usb stick which would work on my B2, without any success,
Unfortunately, the B2 (and B3, for that matter) is quite picky about which USB sticks it will boot from, due to shortcomings in U-Boot's USB drivers.

I have a tiny 'blinktest' image that you can quickly use to check if a given stick will work with the B2 - see here (you may find this helpful even if you don't intend to use my Gentoo image for the B2, but are looking to upgrade your Debian install).

Personally, I have found SanDisk (Cruzer etc.) and Lexar USB sticks to be pretty reliable for booting from. You might also find this list of known-good sticks useful.

Best, sakaki
Last edited by sakaki on 25 Jun 2015, 03:58, edited 1 time in total.
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by Gordon »

Upto now every USB stick that looks like in this image has worked for me:
Image
I've used various sizes of these, from 512MB to 8GB
andy_b2_user
Posts: 20
Joined: 22 Jun 2015, 16:32

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by andy_b2_user »

sakaki wrote:
andy_b2_user wrote:Just been trying to find an usb stick which would work on my B2, without any success,
Unfortunately, the B2 (and B3, for that matter) is quite picky about which USB sticks it will boot from, due to shortcomings in U-Boot's USB drivers.

I have a tiny 'blinktest' image that you can quickly use to check if a given stick will work with the B2 -

Best, sakaki
Hi Sakaki.

Yes I have been using your blink test to check the stick and i have 2 working sticks which pass the test. If then I replace the image file in the install directory with the image created by Bootroot following the thread by MouettE I cannot boot the system. For reference the usb id's are 3538:0054 and 0781:556b.
As the discs are below 8G I cannot try out the Gentoo image.

Andy
MouettE
Site admin
Posts: 341
Joined: 06 Oct 2011, 19:45

Re: Gentoo live-USB for Bubba|2 updated (Linux 4.0.4)

Post by MouettE »

andy_b2_user wrote:If then I replace the image file in the install directory with the image created by Bootroot following the thread by MouettE I cannot boot the system.
Unfortunately, my buildroot image is much larger than a typical kernel used by sakaki test, gentoo and arch images. This will probably cause higher failures when trying to boot the b2 on usb. Remember this is still work in progress ! I will try to address it.
Post Reply