Skip to content
Carlos Izquierdo edited this page May 15, 2018 · 3 revisions

This page describes how to install Debian 8 (Jessie) in a GnuBee PC (mipsel) system.

These are the general steps to be taken, you will find more detail about each below:

  1. Download a Debian-ready image and flash it to ROM
  2. Boot into the flash image and login to the system
  3. Partition disks
  4. Set up Debian in new partition and reboot
  5. Boot to your new system

1. Download a Debian-ready image and flash it to ROM

First you will need to download one of the pre-built (libreCMC) images that have been modified for Debian use and flash it on to your GnuBee. You will find information on how to do this in this same wiki:

2. Boot into the flash image and login to the system

Once you've flashed the image and rebooted the system, you can connect to it via:

  • SSH to the Blue port (should have obtained a DHCP address automatically)
  • UART

Using any of these two methods, you should be able to log in as root without any password.

3. Partition disks

Since the GnuBee PCX flash ROM is quite small you can't fit a whole Debian operating system in it. Therefore you need to create a regular disk (recommended) or SD card partition in order to store the system software.

To do this, first you need to list the available disks:

root@libreCMC:/# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda         8:0    0 111.8G  0 disk
sdb         8:16   0 465.8G  0 disk
sdc         8:32   0 465.8G  0 disk
sdd         8:48   0 465.8G  0 disk
mtdblock0  31:0    0   192K  1 disk
mtdblock1  31:1    0    64K  1 disk
mtdblock2  31:2    0    64K  1 disk
mtdblock3  31:3    0  31.7M  0 disk
mtdblock4  31:4    0   2.2M  1 disk
mtdblock5  31:5    0  29.5M  1 disk /rom
mtdblock6  31:6    0  22.3M  0 disk /overlay

The mtdblockX devices are the onboard flash while the sdX devices are the (bigger) disks that you add to the GnuBee system.

Create a partition using the following commands:

root@libreCMC:/# fdisk /dev/sda
Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help):

Press 'n' for new partition:

Partition type
  p   primary (0 primary, 0 extended, 4 free)
  e   extended (container for logical partitions)
Select (default p):

Press 'p' or just ENTER. For the following questions you can just press ENTER to accept defaults:

Partition number (1-4, default 1):
First sector (2048-234441647, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-234441647, default 234441647):
Created a new partition 1 of type 'Linux' and of size 111.8 GiB.

Back to the main menu you can check the results with 'p':

Command (m for help): p
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe5ee9535
Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1        2048 234441647 234439600 111.8G 83 Linux

Finally, you can press 'w' to save your changes and quit or 'o' to start all over again.

4. Set up Debian in new partition and reboot

Download the installation script to the GnuBee using the wget command:

root@libreCMC:/# wget --no-check-certificate https://raw.githubusercontent.com/gnubee-git/gnubee-git.github.io/master/debian/debian-jessie-install

This script will:

  • Prompt for the root partition
  • Format it using ext4
  • Label it as "GNUBEE-ROOT" so the flash system can recognize it at boot
  • Download and install Debian base software (mipsel architecture)

Feel free to inspect the script for any errors/improvements (and please submit bug reports with them!). After that you can run the script:

root@libreCMC:/# sh ./debian-jessie-install

The installation process will only require your input at the beginning, when choosing the root partition:

Detecting connected partitions, please wait a few moments.
/dev/sda1: UUID="4a64302f-d7ed-4725-93ce-d12835761200" TYPE="ext4" PARTUUID="0da7c3e9-01"
/dev/sda2: UUID="49117859-fefc-4480-9ea5-0e0367dc424d" TYPE="swap" PARTUUID="0da7c3e9-02"
Choose partition to install (will be formatted !!!):

Just write "/dev/sda1" or your chosen partition and the process will continue:

/dev/sda1: UUID="4a64302f-d7ed-4725-93ce-d12835761200" TYPE="ext4" PARTUUID="0da7c3e9-01"
Partition will be formatted, please type CONFIRM if you agree: CONFIRM
umount: /dev/sda1: not mounted
Formatting /dev/sda1, please wait...
mke2fs 1.43.3 (04-Sep-2016)
[...]
Writing superblocks and filesystem accounting information: done
[ 1572.211287] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
W: Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyring.gpg
I: Retrieving InRelease 
[...]

The script will take several minutes to download and install all required software. When it is finished, you will see a message similar to this and you will get a prompt back:

[...]
I: Configuring libc-bin...
I: Configuring systemd...
I: Configuring ca-certificates...
I: Base system installed successfully.
Debian successfully installed into /dev/sda1, please reboot your device now.
root@libreCMC:/#

Reboot by issuing the following command:

root@libreCMC:/# reboot

5. Boot to your new system

Once the system reboots, you need to log in via UART or SSH. WARNING: The Debian installation procedure changes the MAC address of the Blue port, so the IP address assigned by the network's router may be different than previous steps.

If you use the UART, you will see that the prompt has changed:

Debian GNU/Linux 8 gnubee-pc1.gnubee ttyS0
gnubee-pc1 login:

Proceed to log in using the following credentials:

  • Login: root
  • Password (case-sensitive): GnuBee

You will probably need to install additional kernel modules for things like NFS, Wifi or even the SD card. Similar to the Debian installation script, you will need to download and execute a specific script:

root@gnubee-pc1:~# wget --no-check-certificate https://raw.githubusercontent.com/gnubee-git/gnubee-git.github.io/master/debian/debian-modules-install
root@gnubee-pc1:~# bash debian-modules-install

Finally, please change the root password to something different to the default one:

root@gnubee-pc1:~# passwd
Enter new UNIX password: (type your new password)
Retype new UNIX password: (type your password again)
passwd: password updated successfully

Congratulations, you're done!

ADDITIONAL NOTES:

You can’t perform that action at this time.