Once you've restored a system image to your SD card, insert it into your device and attach HDMI, Ethernet and/or your serial cable before applying power.
If HDMI output is supported on your device, connect it to your monitor before applying power. The bootloader and kernel will spew text on screen for a few seconds before the Shedbuilt banner and login prompt appear.
If HDMI isn't yet supported or you prefer to run headless, you can instead pop in an Ethernet cable and log in using OpenSSH. To determine your device's IP address, log into your router's admin interface and look for a DHCP lease for 'shedbuilt'. Once you know the device's IP, you connect from another computer using
ssh in the Terminal, like so:
# ssh email@example.com
You can also log in using a serial cable using
screen or a similar utility at 115200 baud:
# screen /dev/ttyUSB0 115200
Initial login must be performed as the
rootuser whose password is
Once you've logged in, it's strongly advised that you change the root password from its default to a secure password of your choosing. Do so by entering
While Shedbuilt is configured to set the internal clock using network time servers by default, you'll still need to set your timezone to have the correct local time. First, look up the name of your timezone as listed in:
# timedatectl list-timezones
Then pass that timezone name back to
timedatectl like this:
# timedatectl set-timezone <your timezone>
Shedbuilt system images define a root partition a mere 1 or 2GB in size. Now's a good time to resize it to fill more or all of your SD card. To do so you'll need to delete and recreate your the root partition using
# fdisk /dev/mmcblk0 : d : n : p : 1 : 4096 [starting at this offset gives the bootloader, u-boot, a bit of breathing room] : [hit 'enter' to accept the end of the card as the end of the partition] : n [when prompted, choose not to overwrite the existing EXT4 signature so the filesystem remains intact] : p : w
Use the following command to finish resizing the partition
# resize2fs /dev/mmcblk0p1
You can use the command
dfto verify that the size of the root partition, mounted at
/now matches the size of your SD card.
If you're going to be compiling software on a device with less than a gigabyte of RAM, you'd best create a swap file to avoid any out-of-memory unpleasantness. 512MB or so should do the trick:
# dd if=/dev/zero of=/var/swap bs=1M count=512 # chmod 600 /var/swap # mkswap /var/swap # swapon /var/swap
If your SD Card or eMMC storage device supports it, it's a good idea to set the 'discard' mount option for all of its partitions in
/etc/fstab. This will allow ERASE operations to be performed continuously, helping to maintain the performance and longevity of solid-state storage.
You can edit this file using the included
vim text editor:
# vim /etc/fstab
With the modification, your
/etc/fstab file will look a bit like this:
# Begin /etc/fstab # file system mount-point type options dump fsck # order /dev/mmcblk0p1 / ext4 defaults,discard,noatime,commit=600,errors=remount-ro 0 1 /var/swap swap swap pri=-1 0 0 # End /etc/fstab
If you've created a swap file you'll need to remove the '#' in front of the entry for
/etc/fstabto ensure it's enabled automatically on boot.
Running every command as root is a bit like leading a bull through a china shop so it's a good idea to create a normal user for yourself like so:
# useradd -m -G users,wheel,video,audio,input,dialout,usb,cdrom -s /bin/bash yournamehere # passwd yournamehere
The above will add your user to the
wheelgroup, allowing use of
sudoto execute commands as
rootfor administrative tasks like updating software. If you're planning to experiment with packaging and distributing your own software, append
shedmaketo the list of groups for your user.
exit to log out of your session as
root and log in as your new user. From here on we'll assume you're logged in as a user with normal privileges.
Before proceeding, it's a good idea to check for updates to Shedbuilt's included software, as this guide will assume you're using the latest available. Do so with a couple invocations of Shedbuilt's trivial package management tool,
# sudo shedmake update-all # sudo shedmake upgrade-all
If one or more of the upgraded packages requires a reboot, you'll be prompted to do so.