Linux/RaspberryPi: Difference between revisions
From Wiki
< Linux
(Moved content from Linux) |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=== chroot into a Raspberry Pi === | ===chroot into a Raspberry Pi=== | ||
==== Mount sequence ==== | ====Mount sequence==== | ||
<pre> | <pre> | ||
Line 15: | Line 15: | ||
</pre> | </pre> | ||
==== Doing stuff in chroot ==== | ====Doing stuff in chroot==== | ||
'''Example:''' Fixing a broken apt install | '''Example:''' Fixing a broken apt install | ||
Line 25: | Line 25: | ||
</pre> | </pre> | ||
==== Unmount sequence ==== | ====Unmount sequence==== | ||
<pre> | <pre> | ||
Line 37: | Line 37: | ||
</pre> | </pre> | ||
=== Gotchas === | ===Gotchas=== | ||
* kernel7.img - This is the kernel file for Raspberry Pi 2. Others use kernel.img | *kernel7.img - This is the kernel file for Raspberry Pi 2. Others use kernel.img | ||
<br /> | |||
===Serial Connection=== | |||
This is according to the UART debugging device that I have. Not a general reference. | |||
*Pin 6 = Black wire<span class="mx_EventTile_editButton" title="Options"></span> | |||
*[https://matrix.to/#/!YqnkMwmIIPPIDxHpkk:synapse.sds-ip.de/$1545373232932RFvCj:synapse.sds-ip.de?via=synapse.sds-ip.de <span class="mx_MessageTimestamp" title="Fri, Dec 21 2018 11:50:32"></span>]Pin 8 = TX of Rpi = RX of USB = Red<span class="mx_EventTile_editButton" title="Options"></span> | |||
*[https://matrix.to/#/!YqnkMwmIIPPIDxHpkk:synapse.sds-ip.de/$1545373249933GBVnG:synapse.sds-ip.de?via=synapse.sds-ip.de <span class="mx_MessageTimestamp" title="Fri, Dec 21 2018 11:50:49"></span>]Pin 10 = RX of Rpi = TX of USB = Yellow | |||
<br /> |
Latest revision as of 08:40, 10 January 2019
chroot into a Raspberry Pi
Mount sequence
mount /dev/sdb3 /mnt mount /dev/sdb2 /mnt/boot mount /dev/sdb1 /mnt/boot/firmware mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys mount -o bind /dev /mnt/dev mount -o bind /dev/pts /mnt/dev/pts cp /usr/bin/qemu-arm-static /mnt/usr/bin chroot /mnt
Doing stuff in chroot
Example: Fixing a broken apt install
dpkg --configure -a apt -f install exit
Unmount sequence
umount /mnt/dev/pts umount /mnt/dev/ umount /mnt/sys umount /mnt/proc umount /mnt/boot/firmware umount /mnt/boot/ umount /mnt
Gotchas
- kernel7.img - This is the kernel file for Raspberry Pi 2. Others use kernel.img
Serial Connection
This is according to the UART debugging device that I have. Not a general reference.