Oops. I didn't fully answer all the questions, On Sat, 18 Sept 2021 at 20:20, David Christensen <dpchr...@holgerdanske.com> wrote:
> On 9/18/21 4:35 AM, Myron wrote: > > Never done this one with Linux before. I know that there is less than > 16Gb > > of data written to the Class 10 32Gb MicroSD card which is used as the > > primary system storage on a single board system-on-a-chip computer. What > > I'm after is getting a 16 Gb Class 10 A1 MicroSD card and clone the > entire > > system from the 32Gb card to the 16Gb card. > > > > What I'm after is when I start the SOC computer from the replacement 16Gv > > Class 10 A1 MicroSD card, it will just start like there have been no > > changes, well, apart from there being 16Gb storage and not slower 32Gb > > storage. > > > > This is relatively easy to do on Windows. No clue how to do this with > > Linux. > > > > > Backup your data. I would take a raw binary image of the entire 32 GB > MicroSD card as well. > Done that. Sector-by-sector back-up. My guess is that you should resize the contents of the 32 GB MicroSD > card to fit onto the 16 GB MicroSD card, and then clone. > Yes. This is how I would like to do this. Is it possible to do this while the SBC is online? It resized the image online on first install from about a 4Gb partition to a 32Gb partition. It was a pre-built image. Download, write image to SD card, insert card in SBC, turn on and follow instructions. > But, the devil is in the details and it would be helpful if we had more > information... > > > What is the make and model of your "single board system-on-a-chip > computer" (SBC)? What CPU, memory, or other options does it have? What > is the technical support URL? > http://www.lemaker.org/product-bananapro-index.html I followed the Armbian link as it's the only up-to-date and supported distro on offer. Is the SBC connected to a keyboard, mouse, and monitor, to a serial > console, or to some other console? Can you SSH into it? > Yep. I can SSH into it. I have a USB to 3v3 TTL RS232 board and can connect to the serial debug port and also the ability to connect USB keyboard and mouse and a HDMI monitor. > How did you create a working Debian (?) GNU/Linux instance on the 32 GB > MicroSD card? If you followed some instructions, what is the URL? > >From here: https://www.armbian.com/banana-pi-pro/ Followed instructions when the USB to 3v3 TTL RS232 board arrived as it appears this is how to start and complete the initial start-up otherwise the SBC appears to be dead.If it's in the instructions then I missed that and nearly threw the SBC in the trash. Glad I didn't as it appears to be quite reliable. > On the 32 GB MicroSD card Debian instance, please login as root, run the > following commands, and reply with the complete console session -- > prompts, commands entered, output obtained: > > # /bin/bash -l > # export PS1='\n\D{%Y-%m-%d %H:%M:%S} \u@\h \w\n\$ ' > # cat /etc/debian_version ; uname -a > # egrep 'vendor_id|model name' /proc/cpuinfo | head -n 2 > # grep MemTotal /proc/meminfo > # fdisk -l > [[[ root@loki:~# /bin/bash -l Here lie dragons. Careful where you tread! root@loki:~# export PS1='\n\D{%Y-%m-%d %H:%M:%S} \u@\h \w\n\$ ' 2021-09-27 20:19:28 root@loki ~ # cat /etc/debian_version ; uname -a bullseye/sid Linux loki 5.10.60-sunxi #21.08.2 SMP Tue Sep 14 16:28:44 UTC 2021 armv7l armv7l armv7l GNU/Linux 2021-09-27 20:19:42 root@loki ~ # egrep 'vendor_id|model name' /proc/cpuinfo | head -n 2 model name : ARMv7 Processor rev 4 (v7l) model name : ARMv7 Processor rev 4 (v7l) 2021-09-27 20:19:50 root@loki ~ # grep MemTotal /proc/meminfo MemTotal: 990484 kB 2021-09-27 20:19:59 root@loki ~ # fdisk -l Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/mmcblk0: 29.74 GiB, 31914983424 bytes, 62333952 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: 0xe069b87e Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 61702143 61693952 29.4G 83 Linux Disk /dev/zram0: 483.65 MiB, 507129856 bytes, 123811 sectors Units: sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/zram1: 50 MiB, 52428800 bytes, 12800 sectors Units: sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes 2021-09-27 20:20:09 root@loki ~ # ]]] Actually, here is a lot more technical information about this SBC: Output from 'sudo armbianmonitor -u' = http://ix.io/3A1l David > > I'm guessing if the file system can be expanded online then it should be possible to shrink a partition online? Any help that I'll be able to understand would be very much welcome. Myron