Mirabox dist-upgrade causes system to deadlock/hang on bootup

May 22, 2013 by · 2 Comments
Filed under: Development, General, Linux 

I think there’s something bad going on between GlobalScales patches in the rootfs images they have for download for the mirabox when doing an apt-get dist-upgrade to the latest version of debian. This causes a complete lockup during boot of the device (network seems to work, but ssh and services are not started in time, and the console is completely locked up). There is pretty much nothing that works in this state, and I’ve found no way to skip ahead and get a login prompt.

I tried booting to Single user mode, but this is not possible because GlobalScale make pretty much everything start in rcS.d. I’m stuck in the same position as in a normal boot as described above, nothing possible to do.

Finally I resorted to using init=/bin/bash and managed to locate the issue down to the S07mountall.sh and/or the S08mountall-bootclean.sh. It seems S07mountall.sh will mount everything from fstab, which also seems to mount “something” on /dev, causing all dev entries to go missing, and hence several different things will just not boot. rm -rf’ing the S07mountall.sh and S08mountall-bootclean.sh script seems to have fixed the issue for me. However,  I’ve severely remade the whole rc.d structure since I think it’s a really bad idea to start so much services in rcS.d as it will block single user mode and kind of against the design philosophy of the init system. This rework may have made the situation better or worse, I’m not completely sure.

If anyone is willing to go more in depth I’d be happy to go into the details with them on what I found.

As for the Mirabox, I think it’s a good device so far, but this is my second GlobalScale device (had a Guruplug Server Plus for almost 2 years as my home server). There are a few things that nags at me so far though:

The file system is having the same issues as the Guruplug Server Plus, strange scripts running at strange times in the bootup procedure (for example, all the stuff that’s gone into the rcS.d directory), the rc.local script calling the /root/init_setup.sh script which in turn is loading a bunch of binary blob drivers and so on and so forth. The device as it is looks really well engineered, but the software is really butchered because of these strange setups. Putting in some good time to create a good integration with Debian (since that’s what they are using anyways) would help insanely much. Also, documenting the reflashing processes and so forth could also be very much helpful.

Reflashing GlobalScale Mirabox filesystem

May 22, 2013 by · 2 Comments
Filed under: Development, Hardware, Linux 

I just worked my way through reflashing the mirabox and figured I’d post some instructions on how to do it. I’ve used the descriptions from this http://www.newit.co.uk/forum/index.php?topic=3880.0 post but found it to be lacking a few steps that could be construed as obvious… perhaps. Especially the use of ubifs is quite new to me, even though the commands are quite straight forward I got snagged up a bit in understanding how it works.

I’ve used the following rescue disk image:

https://docs.google.com/file/d/0B0imSF-34b8dZEc0SFo3N1Fzb0E/edit

And this rootfs image:

http://code.google.com/p/mirabox/downloads/list

Download and install the rescue disk on a microSD card:

  1. fdisk the microSD, create on FAT16 partition of 100mb size, the rest of the device as EXT3.
  2. Unpack the rescue disk
  3. Copy the mirabox file to the FAT16 partition
  4. Extract the rootfs.tgz file to the EXT3 partition.
  5. sync and umount the microSD card
  6. Connect a USB flash device to the computer
  7. Extract the rootfs image downloaded above
  8. Copy the rootfs to the USB flash device.
  9. Disconnect USB device.
  10. Connect micro-sd with mirabox kernel and rootfs to mirabox
  11. Plug in the mirabox to a computer via USB.
  12. Start the mirabox
  13. Hit a key at uboot
  14. >> set bootcmd ‘usb start; fatload usb 1 0x6400000 mirabox; bootm 0x6400000’
  15. >> set bootargs ‘console=ttyS0,115200 root=/dev/sdb2 rootwait’
  16. >> boot
  17. login as root password nosoup4u
  18. connect USB disk with rootfs on it to mirabox
  19. # cd /media/usbX where the rootfs img is located
  20. # ubiformat /dev/mtd2 –flash-image=rootfs-debian6.0-gti-mirabox-v5-0-1-120924.img
  21. # sync
  22. # reboot
  23. disconnect USB disk and remove devices.
  24. login to your hopefully working new filesystem using root/nosoup4u credentials.