Mirabox dist-upgrade causes system to deadlock/hang on bootup
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
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:
- fdisk the microSD, create on FAT16 partition of 100mb size, the rest of the device as EXT3.
- Unpack the rescue disk
- Copy the mirabox file to the FAT16 partition
- Extract the rootfs.tgz file to the EXT3 partition.
- sync and umount the microSD card
- Connect a USB flash device to the computer
- Extract the rootfs image downloaded above
- Copy the rootfs to the USB flash device.
- Disconnect USB device.
- Connect micro-sd with mirabox kernel and rootfs to mirabox
- Plug in the mirabox to a computer via USB.
- Start the mirabox
- Hit a key at uboot
- >> set bootcmd ‘usb start; fatload usb 1 0x6400000 mirabox; bootm 0x6400000’
- >> set bootargs ‘console=ttyS0,115200 root=/dev/sdb2 rootwait’
- >> boot
- login as root password nosoup4u
- connect USB disk with rootfs on it to mirabox
- # cd /media/usbX where the rootfs img is located
- # ubiformat /dev/mtd2 –flash-image=rootfs-debian6.0-gti-mirabox-v5-0-1-120924.img
- # sync
- # reboot
- disconnect USB disk and remove devices.
- login to your hopefully working new filesystem using root/nosoup4u credentials.