UNO Q: 32 GB on UNO Q -- How to enlarge Root and move home to Root

Thanks to Gemini AI and some side ways thinking. its very easy.
Hints at beginning. full instructions follow at end.
Be very careful with Partition details!

hi Im running my unoQ with 17gb free space
please forgive spelling im autistic
first create old home partition copy every thing maintaining permissions
make sure linux isnt looking at the old home partition
fstab?
rename the new home folder to home
use fdisk note partition names and sizes delete home
delete root then make a partition the start of root and the end of home

then use "resize??" command to tidy up
doing it this way you loose nothing but might need to delete stuff to make room to preserve any work in home. you can put all that back in your 18gb
i can try to be more detailed if you like i used gemini to tell me exactly what to type in terminal took about twenty min
the great thing is this way you dont lose anything. i tried armbian for the unoQ
that gave me the idea gemini just told me what to type. try programming when you cant type or spell but autistic people can be very determined! it uses gpt so no need to worry about primary partitions
critical you must make sure linux doesnt look for home partition

**INSTRUCTIONS **
You might need to install some commands

Phase 1: The "Lifeboat" (Data Migration)

​Before deleting anything, you must move your home files to the root partition.

​Create a temporary landing zone:

sudo mkdir /home_new

​Mirror your files (Preserving Permissions):

sudo rsync -avxHAWXS --numeric-ids /home/ /home_new/

​Verify: Make sure your files are in /home_new before proceeding.

​Phase 2: Breaking the Link

​You must tell Linux to stop looking for the separate hardware partition.

​Edit the Paper Trail:

sudo nano /etc/fstab

​The "Kill Switch": Find the line that mentions /home/arduino and put a # at the very start of that line. Save and exit.

​The Swap:

sudo umount /home

sudo mv /home /home_old

sudo mv /home_new /home

​Reboot: Your system is now running entirely off the root partition.

​Phase 3: The Surgical Expansion

​Now you delete the "wall" and stretch the room.

​Open fdisk: sudo fdisk /dev/mmcblk0

​Record the Start: Type p and write down the Start Sector of your root partition (usually partition 24).

​Delete: Type d and delete the old home partition number, then type d and delete the root partition number.

​Recreate: Type n for a new partition.

​Use the same partition number for root.

​Use the exact same Start Sector you wrote down.

​Hit Enter for the end sector to take the whole 20GB.

​Save the Data: When asked if you want to "remove the ext4 signature," Type N (No).

​Write: Type w and exit.

​Phase 4: The Final Stretch

​Tell the filesystem to fill the new space you just created.

​Refresh: sudo partprobe

​Grow: sudo resize2fs /dev/mmcblk0p24 (or your root number).

​Victory: df -h should now show a glorious 19GB+ on your root.

This is the standard tree (Fig-1) of directories in eMMC for UNO Q. At present, home directory is under root directory. What is the meaning of moving home direcory under root.


Figure-1:

I think you are extremely lucky man :)
It's very risky to delete a partition from which a program is currently running. Normally, such actions are performed by starting the system from an external drive.

The other day, I lost my all data and works stored in eMMC while reflashing the image. Please, tell me how can I save my project data/works from eMMC into a folder of my PC before reflashing the Debian image?

Hi @GolamMostafa. I use WinSCP, simple straight forward.

Installed with what they call Commander interface, two panels - on the left your PC one the right the UNO Q.

You simple navigate to the ArduinoApps folder, select you files and drag and drop them in the folder you want for backups. I navigate to the "arduino" folder and drag the ArduinoApps folder to my PC backups folder, for the Uno Q, then rename the copied ArduinoApps on my PC to a dated backup folder name.

After flashing you drag the files from the PC backup folder and drop them in the new empty ArduinApps folder on the UNO Q.

I created a, what they call Site, using my UNO Q IP address (listed on App Lab in the Settings window). Use the SFTP port 22 defaults eith User name arduino and your LINUX password. Save the Site for future use.

This was a life saver during my numerous flashings.

Please, list the steps of installing it and running it so that I can use it and save my data in my PC before reflashing the UNO Q.

Just go here, it explains pretty well how to proceed.

Thank you very much for pointing to the steps of AI and NOT yours.

Note, there are several different ways to achieve saving your stuff away.
I am one who uses WinSCP (which of course assumes running on Windows)
Downloaded from: WinSCP :: Official Site :: Download

As I mentioned in other places I often times launch it from KiTTY
KiTTY download | SourceForge.net

I have saved sessions defined for my two Qs, like for the Q4


Under connection/Data I configured that the username is arduino and has the password:


And I used the save to save it with the name... I have KiTTy pinned to my taskbar, and I can launch it with the more recent configurations:

Where I then launch WinSCP, to use the current configuration information

You can also create the configurations directly within WinSCP, you can then navigate to directories on your host and on your Q


On PC, this is pointing to my github project Arduino_UNO_Q where I keep both IDE sketches as well as my ArduinoApps.
To backup my Q, I drag and drop ArduinoApps between the two windows.
Note: I created a transfer setting type, that I named ignored hidden,

That I setup with default stuff, except I turned on the option to Exclude Hidden files
I typically choose this configuration in the transfer settings as when I drag and drop from Q to PC, I don't want it to also copy the contents of the .cache directories.

Possible Alternative approach: - Use git to backup and restore. For example some users use VisualStudioCode to talk to their Q (I do this as well). and they have setup an
git project for their stuff on the Q, and use git commands to save restore the data to the Q... And I believe some of them have used git integration directly within the VisualStudio Code.

Before start, it is very important to note 68 and 69 partition #s and start sector number of / root 2033984 and end sector number 61071326 of /home/arduino:

~ $ lsblk

├─mmcblk0p67     259:35   0  512M  0 part /boot/efi
├─mmcblk0p68     259:36   0   10G  0 part /
└─mmcblk0p69     259:37   0 18.2G  0 part /home/arduino

~ $ sudo fdisk -l /dev/mmcblk0

Device             Start      End  Sectors  Size Type
/dev/mmcblk0p67   985408  2033983  1048576  512M EFI System
/dev/mmcblk0p68  2033984 22954551 20920568   10G Linux root (ARM-64)
/dev/mmcblk0p69 22954552 61071326 38116775 18.2G Linux root (ARM-64)

The developers are working to add the option for the Arduino Flasher CLI user to configure the size of the root partition when flashing the operating system image to the UNO Q:

Once completed, this feature will be present in the next release of the Arduino Flasher CLI tool.

Not what you are asking, but you now have the option to preserve the user partition through an operating system image flashing operation.

When performing a flashing operation via Arduino App Lab, this can be accomplished by checking the "Preserve user data during the board flashing process" checkbox in the dialog (this is the default setting):

If using Arduino Flasher CLI, this can be accomplished by passing the --preserve-user flag to the arduino-flasher-cli flash command.

This feature does rely on there being a more recent operating system image on the board beforehand (the feature is not supported by the original "R0" image present on the boards shipped from the factory in the time soon after the product launch). Additionally, it is not available if you are changing the size of the root partition as part of the OS image flashing operation via the Arduino Flasher CLI --root-size flag feature.

An update: the features I mentioned in my previous reply are now available for use in the new version 0.5.3 of Arduino Flasher CLI.

The new version is currently available for download from the links under the "Assets" section of the release page in the GitHub repository:

It will also be available for download from the "Software" page shortly:

https://www.arduino.cc/en/software/#flasher-tool