Skip to content
Snippets Groups Projects
Commit 4657e083 authored by beuchatp's avatar beuchatp
Browse files

Fixed the formatting of the install on rasp pi .md page

parent 76490542
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,9 @@ Scheme: Master Boot Record
Open teminal and use the command ``diskutil list`` to identify which disk coresponds to the SD card, where you are looking for the label of the form ``disk2`` and NOT the label of the form ``disk2s1``
Unmount all partitions of the SD card using the command
```diskutil unmountDisk /dev/disk<disk# from diskutil>```
```
diskutil unmountDisk /dev/disk<disk# from diskutil>
```
Copy the Ubuntu image to the SD card using the command
......@@ -39,16 +40,17 @@ Once the copy has completed, eject the SD card using the command:
## CHANGE THE BOOT-LOADER FOR RASPBERRY PI 3 B+
Insert the SD card into your computer and open the ''config.txt'' file in your favourite editor. Adjust the lines:
'''
'''
Insert the SD card into your computer and open the ``config.txt`` file in your favourite editor. Adjust the lines:
```
kernel=...
device_tree_address=0x02000000
```
to instead be
'''
```
kernel=vmlinuz
initramfs initrd.img followkernel
'''
#device_tree_address=0x02000000
```
This step was taken from:
https://www.raspberrypi.org/forums/viewtopic.php?t=233794
......@@ -59,158 +61,158 @@ https://www.raspberrypi.org/forums/viewtopic.php?t=233794
This step is to insert the SD card into the Raspberry Pi, boot it up, and setup the Ubuntu installation. For this first boot it is required to have a wired internet connection that does not require any authentification.
After booting you are prompted to enter the username and password, which are ''ubuntu'' and ''ubuntu'' respectively. You are then asked to change the password.
After booting you are prompted to enter the username and password, which are ``ubuntu`` and ``ubuntu`` respectively. You are then asked to change the password.
After entering the new password there is sometimes the error ''Authentication token manipulation error'', the screen clears, and you are again prompted for the username and password. This error relates to some problem with the write access for setting the new password. To overcome this error, shutdown the Raspberry Pi (simply unplug the power), remove the SD card and insert the SD card into your computer. Open the ''cmdline.txt'' using your favourite editor and add the following at the end of the line:
After entering the new password there is sometimes the error ``Authentication token manipulation error``, the screen clears, and you are again prompted for the username and password. This error relates to some problem with the write access for setting the new password. To overcome this error, shutdown the Raspberry Pi (simply unplug the power), remove the SD card and insert the SD card into your computer. Open the ``cmdline.txt`` using your favourite editor and add the following at the end of the line:
'''
```
init=/bin/sh
'''
```
NOTE: this ''cmdline.txt'' file should be use one line of text, and each command should separated by a space. So if the file orginally looks like:
NOTE: this ``cmdline.txt`` file should be use one line of text, and each command should separated by a space. So if the file orginally looks like:
'''
```
previous content of file
'''
```
Then the file after editing should look like:
'''
```
previous content of file init=/bin/sh
'''
```
Put the SD card back into the Raspberry Pi and power it up. A few boot steps are performed and then you are presented with a cursor. At the prompt type the following command (if you are presented with an error message, then simply type the command again):
'''
```
mount -o remount, rw /
'''
```
The results should be a message something like:
'''
```
EXT4-fs (mmcblk0p2): re-mounted. 0pts: (null)
'''
```
Now update the password for the ubuntu user using the command:
'''
```
passwd ubuntu
'''
```
You are prompted to enter the new password twice, and then the following message should be displayed:
'''
```
passwd: password updated successfully
'''
```
Now type the following commands:
'''
```
sync
exec /sbin/init
'''
```
The Raspberry Pi now continues to boot normally, and you can log into with the username ''ubuntu'' and the new password you set.
The Raspberry Pi now continues to boot normally, and you can log into with the username ``ubuntu`` and the new password you set.
Shut down the Raspberry Pi using the command:
'''
```
sudo halt
'''
```
Remove the SD card from the Raspberry Pi, insert the SD card into your computer, open the ''cmdline.txt'' file again, and remove the ''init=/bin/sh'' that you added.
Remove the SD card from the Raspberry Pi, insert the SD card into your computer, open the ``cmdline.txt`` file again, and remove the ``init=/bin/sh`` that you added.
Eject the SD card from your computer, insert the SD card into the Raspberry Pi, and you are good to go with your new password and normal booting.
These steps to reset the password were taken from:
'''
```
https://www.raspberrypi-spy.co.uk/2014/08/how-to-reset-a-forgotten-raspberry-pi-password/
'''
```
## UPGRADE ALL SOFTWARE
This may be started automatically, and when you try the commands:
'''
```
sudo apt update
sudo apt list --upgradable
sudo apt upgrade
'''
```
you may get the error:
'''
```
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?
'''
```
The answer is yes, another process is using ''dpkg'' and hence it is locked, and it is likely that the process is the automatic daily apt upgrade service. To list all the automatic timers managed by the system, enter the command:
The answer is yes, another process is using ``dpkg`` and hence it is locked, and it is likely that the process is the automatic daily apt upgrade service. To list all the automatic timers managed by the system, enter the command:
'''
```
systemctl list-timers
'''
```
On the list you are like to see ''apt-daily.timer'' and ''apt-daily-upgrade.timer''. Alternatively, to check if the timers, and the services they trigger, are active, enter the following commands:
On the list you are like to see ``apt-daily.timer`` and ``apt-daily-upgrade.timer``. Alternatively, to check if the timers, and the services they trigger, are active, enter the following commands:
'''
```
systemctl is-active apt-daily.timer
systemctl is-active apt-daily.service
systemctl is-active apt-daily-upgrade.timer
systemctl is-active apt-daily-upgrade.service
'''
```
If the services are active, then it is recommended to allow time for them to complete, and then disable the services and timers with the following commands:
'''
```
sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable apt-daily-upgrade.service
'''
```
### FAILED TO START LOAD KERNEL MODULES ERROR
While booting, one item is listed in red as ''FAILED'' with the message:
While booting, one item is listed in red as ``FAILED`` with the message:
'''
```
Failed to start Load Kernel Modules
'''
```
Once logged in, run the following command to list the various system ''units'' and their status:
Once logged in, run the following command to list the various system ``units`` and their status:
'''
```
systemctl list-units
''''
```'
In the list you should see the unit ''system-modules-load.service'' that is described as ''Load Kernel Modules'' and is indicated as ''loaded'' but the ''active'' and ''sub'' flags are both ''failed''. You can get more information about this error by using the command:
In the list you should see the unit ``system-modules-load.service`` that is described as ``Load Kernel Modules`` and is indicated as ``loaded`` but the ``active`` and ``sub`` flags are both ``failed``. You can get more information about this error by using the command:
'''
```
systemctl status systemd-modules-load.service
'''
```
The status that is printed out will likely indicate the error as:
'''
```
Failed to find module ib_iser
'''
```
Looking through various forums posts about this error message, it seems the best course of action is to edit the file:
'''
```
nano /lib/modules-load.d/open-iscsi.conf
'''
```
and comment out the ''ib_iser'' line, i.e., change the line to ''#ib_iser''. You can then test if this resolves the error by either a ''reboot'', or by restarting the service and then checking its status with the following commands:
and comment out the ``ib_iser`` line, i.e., change the line to ``#ib_iser``. You can then test if this resolves the error by either a ``reboot``, or by restarting the service and then checking its status with the following commands:
'''
```
systemctl restart systemd-modules-load.service
systemctl status systemd-modules-load.service
'''
```
Note that even if left un-resolved, this error does not prevent the installation and running of ROS-Melodic and the D-FaLL-System software.
......@@ -221,34 +223,34 @@ Whether or not you plan to run resource hungry software (for example web-browsin
Create the swap file with the following commands
'''
```
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
'''
```
Specify that the swap file is to be use by adding the following entry to ''/etc/fstab'':
Specify that the swap file is to be use by adding the following entry to ``/etc/fstab``:
'''
```
/swapfile swap swap defaults 0 0
'''
```
Using ''sudo nano /etc/fstab'' is a easy wasy to edit the file, and using ''less /etc/fstab'' is an easy way to check that the edits were correctly saved.
Using ``sudo nano /etc/fstab`` is a easy wasy to edit the file, and using ``less /etc/fstab`` is an easy way to check that the edits were correctly saved.
Reboot the Raspberry Pi (simply use the command ''reboot''). And upon rebooting, check that the swap file is available using the command:
Reboot the Raspberry Pi (simply use the command ``reboot``). And upon rebooting, check that the swap file is available using the command:
'''
```
sudo swapon --show
'''
```
The outpuut should look something like:
'''
```
NAME TYPE SIZE USED PRIO
/swapfile file 1024M 0B -2
'''
```
This step was also taken from:
https://www.raspberrypi.org/forums/viewtopic.php?t=233794
......@@ -258,10 +260,10 @@ https://www.raspberrypi.org/forums/viewtopic.php?t=233794
As the Ubuntu image is a server image, it comes pre-installed with cloud-init. The boot time of the Raspberry Pi can be slower due to cloud-init, so if you do not plan to actually use the Raspberry Pi as a server, then cloud-init can be safely removed with the following commands:
'''
```
sudo rm -rf /etc/cloud/
sudo apt purge cloud-init
'''
```
This step was also taken from:
https://www.raspberrypi.org/forums/viewtopic.php?t=233794
......@@ -283,14 +285,14 @@ Other desktops are available, for example ``xubuntu-desktop`` and ``kubuntu-desk
These should already be added by default, but you can check they are added by simply trying to add them (again) using the following commands:
'''
```
sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository restricted
'''
```
If any of these were not already added, then run ''sudo apt update'' and ''upgrade''.
If any of these were not already added, then run ``sudo apt update`` and ``upgrade``.
## Install the D-FaLL-System
......@@ -313,9 +315,9 @@ Run the installation script using the command
## Setup the fixed IP address
The networking is handled by ''netplan'' and hence network specifications are contained in the ''/etc/netplan'' folder. As installed, this folder should contain only one file named ''50-clound-init.yaml'', and the contents of the file should look something like:
The networking is handled by ``netplan`` and hence network specifications are contained in the ``/etc/netplan`` folder. As installed, this folder should contain only one file named ``50-clound-init.yaml``, and the contents of the file should look something like:
'''
```
network:
version: 2
ethernets:
......@@ -324,34 +326,34 @@ network:
match:
macaddress: xx:xx:xx:xx:xx:xx
set-name: eth0
'''
```
If using a desktop environment, then you specify that the ''network-manager'' provided by the desktop is in charge of managing connections by editing the file to be:
If using a desktop environment, then you specify that the ``network-manager`` provided by the desktop is in charge of managing connections by editing the file to be:
'''
```
network:
version: 2
renderer: NetworkManager
'''
```
To make this change active, first validate the changes by using the command:
'''
```
sudo netplan try
'''
```
This should return a message informing you whether the new configuration is valid or not. If the configuration is not valid, then the system revert to the previous settings, and the likely cause of the error is a typing mistake.
Once validated, apply the changes using the following command:
'''
```
sudo netplan apply
'''
```
If you did not install a desktop environment, i.e., you are running "headless" Ubuntu, then you can set the fixed IP address by editing the ''50-clound-init.yaml'' file to be the following:
If you did not install a desktop environment, i.e., you are running "headless" Ubuntu, then you can set the fixed IP address by editing the ``50-clound-init.yaml`` file to be the following:
'''
```
network:
version: 2
ethernets:
......@@ -361,23 +363,23 @@ network:
gateway4: 10.42.0.0
nameservers:
addresses: [8.8.8.8,8.8.4.4]
'''
```
The address ''10.42.0.11/24'' should be replaced by the IP address and netmask you desire. The ''/24'' specified the most comment netmask of ''255.255.255.0''. It is also possible to leave out the ''gateway4'' and ''nameservers'' specifications if the defaults are appropriate.
The address ``10.42.0.11/24`` should be replaced by the IP address and netmask you desire. The ``/24`` specified the most comment netmask of ``255.255.255.0``. It is also possible to leave out the ``gateway4`` and ``nameservers`` specifications if the defaults are appropriate.
Then ''try'' and ''aply'' the changes as described above.
Then ``try`` and ``aply`` the changes as described above.
The following are some useful commands for checking the current connection status:
'''
```
ifconfig
'''
```
'''
```
nmcli c show
'''
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment