Note: I do not work (and never have worked) for Intel. My opinions are solely my own.
You format the microSD card as a e2fs (or e3fs, or e4fs) file system, and mount it, using standard Linux tools. I'm not going to describe the process further. In my opinion, you should learn how to do this by visiting the Ubuntu or other Linux forums.
1 of 1 people found this helpful
Cut'n'pasted (and edited) from my answer to your other very similar posted question:
Several options you could consider:
2. Move /usr to run from the micro sdcard (essentially means dedicating the micro sdcard to your running OS)
3. Move /home (or a specific user/s) to the micro sdcard (same limitations as 2)
4. Run the whole OS from micro sdcard or USB (same limitations as 2 and/or some performance degradation limited by the speed of media used)
Thank you for your suggestions. But I messed it up - I "bricked" the Stick.
Any thoughts as to what I did wrong?
I tried your suggestion of moving /home and /usr figuring that I should start with "baby" steps.
(NOTE: I did not delete anything from the stick, merely copied and modified /etc/fstab)
Here's what I did....
located MicroSD: (sudo fdisk -l = /dev/mmcblk1)
mke2fs -t ext4 -L 'MicroSD' /dev/mmcblk1
mount /dev/mmcblk1 /mnt/msd
rsync -avHAX /home/me /mnt/msd/home
rsync -avHAX /usr /mnt/msd
ls -al /mnt/msd (verified rsync copy - OK)
nano /etc/fstab ( only wanted to make one change first - start with /home)
LABEL=MicroSD /home ext4 defaults 0 2
(save & exit)
shutdown -r now (restart)
What did I do wrong?
For one thing, you didn't try this on a "harmless" folder to make sure you got it correct.
For another, your microSD card has (at the device root level), folders /home and /usr.
So, when you changed fstab and rebooted, your directory structure for home was "/home/home/me"
Most Linux systems I am familiar with, allow you to boot with root privileges at the command level. There shouldn't be a black screen if you only did what you said.
Learning Linux on these small devices is generally a bad idea. Try to learn on a larger computer (where you can easily reinstall); that's a much preferred method.
Again, these are questions more suited to the Ubuntu forums.
1 of 1 people found this helpful
To supplement the above explanation:
By modifying '/etc/fstab' you have made your '/home' directory into a mount point and then by mounting your SD card at that point and because the SD card contains two directories 'home' and 'usr' their full path becomes '/home/home' and '/home/usr'. Your original home directory ('/home/me') is no longer visible as you have effectively covered it with your SD card and your duplicate home directory unfortunately now has the path '/home/home/me' so when you try and login as the user 'me' there is no home directory which results in the black screen.
To fix you should boot from a 'liveUSB' i.e. a Linux ISO running from a USB and move your 'me' directory on the SD card up a level or revert to your original configuration by removing the '/etc/fstab' entry for the SD card. On a different machine prepare a USB by downloading a Linux ISO (and if you want to keep strictly stock then go to Ubuntu Releases and I recommend for these purposes using http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-desktop-amd64.iso) and write it to a USB using either 'dd' or 'rufus' depending whether you are using a Linux or Windows machine. Now boot your Intel Compute Stick from the USB, insert the micro SD card which will no doubt auto mount under '/media/ubuntu/<UUID>' and simply move the directory using a command similar to 'mv /media/ubuntu/<UUID>/home/me /media/ubuntu/<UUID>/me' obviously adjusting the command to reflect your actual circumstances. Then reboot you Intel Compute Stick (removing the USB when instructed to do so) and you should be back up and running. Note that as you have merely covered your original '/home' directory you will not have saved or created any additional space on the root file system. So whilst you will now have extra space for your home directory to grow you might still have space limitations for the OS. To free up space on the root file system you could delete the original home directory '/home/me' which again is best done from a 'liveUSB' otherwise it becomes too fiddly to explain here.
Thanks again for your explanations and helpful suggestions.
After reading your post, I realized my mistakes and subsequently fixed them.
1. I created 2 partitions on my MicroSD to support /usr and /home; one partition for each.
2. I copied the respective files into the root of these partitions, as you pointed out.
Now I have transferred 3+Gb to the the MicroSD, and freed up more than enough space to update the stick. Plus now I have room for other apps.
BTW, the "black screen" problem wasn't due to the incorrect DIR TREE issues. It was simply due to the fact that I had 0 bytes free on my stick. Once I deleted a few files to reclaim 10Mb of space ubuntu booted to the login screen. I used the following keystrokes to regain access to single user mode: CTRL+ALT+F1 which allowed me to find and delete some files. Then I rebooted.
Once I got to the login screen I was in an endless loop b/c of the mismatch between /etc/fstab and the DIR TREE that I had created - incorrectly. My password login was correct, but ubuntu couldn't find /home and looped back to the login screen. I exited the login screen by pressing CTRL+ALT+F1 and removed the offending entry in the file /etc/fstab and then was able to reboot normally. Then I transferred the files in /usr & /home to the root of their new partitions.
Again, with your help, I have been able to accomplish my goal of using a MicroSD card to supplement the storage space for the ubuntu system files. And have resolved my problems.
Now that I have "un-bricked" my stick, I am open to trying your Baytrail (customized) system upgrade to 16.04.
It is a shame that I can't use a standard ubuntu upgrade b/c of Intel's decision to customize the version that is required for this stick, while at the same time telling me to go to ubuntuforums.org for assistance. ubuntu canonical doesn't provide a patch for Intel's "Compute Stick" product and apparently Intel doesn't feel that they should either. Thank goodness you have - linuxium. Thank you.
This message was posted on behalf of Intel Corporation
I’m sorry about that nhtrader, at the Intel community we provide support mostly for Windows but I’m glad to see the your issue has been resolved.
Thank you for taking your time to post that information here and for helping each other on this thread to solve that problem.