I followed this article: Create a persistent Ubuntu USB which boots to RAM so I can have Ubuntu running from a USB and it will persist any changes I make.
The problem is it doesn't persist - I created a text file, saved it, and shut down. Than I boot my laptop, pick the USB from the menu, I see the Ubuntu OS but the file is gone. I tried the first option (using the hard drive) and the second (using the RAM).
Edit: Here is the output that was requested in the comments
ubuntu@ubuntu:~$ df -h ; sudo lsblk -f ; sudo lsblk -m ; echo "hello world" > hello.txt
Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 767M 9.5M 757M 2% /run
/dev/sdb4 1.5G 1.5G 0 100% /cdrom
/dev/loop0 1.4G 1.4G 0 100% /rofs
aufs 3.8G 35M 3.8G 1% /
tmpfs 3.8G 26M 3.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
tmpfs 3.8G 580K 3.8G 1% /tmp
tmpfs 767M 76K 767M 1% /run/user/999
/dev/sdb5 2.5G 3.9M 2.3G 1% /media/ubuntu/99b89b3c-5035-4a32-bf5a-514640fc7493
/dev/sdb1 11G 53M 11G 1% /media/ubuntu/usbdata
NAME FSTYPE LABEL UUID MOUNTPOINT
sdb
├─sdb4 iso9660 Ubuntu 16.04.2 LTS amd64
│ 2017-02-15-21-44-13-00 /cdrom
├─sdb2
├─sdb5 ext4 99b89b3c-5035-4a32-bf5a-514640fc7493 /media/ubu
├─sdb3 vfat usbboot E2B5-7A49
└─sdb1 ntfs usbdata 25FB337F388A948A /media/ubu
loop0 squashf /rofs
sda
├─sda2
├─sda5 swap 6fa9b4a3-962f-4677-8055-e5192e2f1fb3 [SWAP]
└─sda1 ext4 7edab5f8-81d1-45c8-93de-cf3dfe74d152
NAME SIZE OWNER GROUP MODE
sdb 14.3G root disk brw-rw----
├─sdb4 1.5G root disk brw-rw----
├─sdb2 1M root disk brw-rw----
├─sdb5 2.6G root disk brw-rw----
├─sdb3 122M root disk brw-rw----
└─sdb1 10.2G root disk brw-rw----
loop0 1.4G root disk brw-rw----
sda 223.6G root disk brw-rw----
├─sda2 1K root disk brw-rw----
├─sda5 7.7G root disk brw-rw----
└─sda1 215.9G root disk brw-rw----
--------
ubuntu@ubuntu:~$ df -h ; sudo lsblk -f ; cat hello.txt
Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 767M 9.5M 757M 2% /run
/dev/sdb4 1.5G 1.5G 0 100% /cdrom
/dev/loop0 1.4G 1.4G 0 100% /rofs
aufs 3.8G 35M 3.8G 1% /
tmpfs 3.8G 26M 3.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
tmpfs 3.8G 580K 3.8G 1% /tmp
tmpfs 767M 68K 767M 1% /run/user/999
/dev/sdb5 2.5G 3.9M 2.3G 1% /media/ubuntu/99b89b3c-5035-4a32-bf5a-514640fc7493
/dev/sdb1 11G 53M 11G 1% /media/ubuntu/usbdata
NAME FSTYPE LABEL UUID MOUNTPOINT
sdb
├─sdb4 iso9660 Ubuntu 16.04.2 LTS amd64 2017-02-15-21-44-13-00 /cdrom
├─sdb2
├─sdb5 ext4 99b89b3c-5035-4a32-bf5a-514640fc7493 /media/ubuntu/99b89b3c-5035-4a32-bf5a
├─sdb3 vfat usbboot E2B5-7A49
└─sdb1 ntfs usbdata 25FB337F388A948A /media/ubuntu/usbdata
loop0 squashfs /rofs
sda
├─sda2
├─sda5 swap 6fa9b4a3-962f-4677-8055-e5192e2f1fb3 [SWAP]
└─sda1 ext4 7edab5f8-81d1-45c8-93de-cf3dfe74d152
cat: hello.txt: No such file or directory
More information:
mkusb -v
mkusb-dus: dus 12.2.2
mkusb-11: mkusb 11.2.1
mkusb-nox: mkusb-nox 11.1.9
mkusb-bas: mkusb version 7.4.2
I am running it on my laptop that have Ubuntu 16.04 -
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
I run the following:
sudo add-apt-repository universe
sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update
sudo apt-get install mkusb
sudo -H mkusb
This is the initial output:
Usage: mkusb [input-file] # optional parameter
---------------------------------------------------------------------
d: dus , guidus, mkusb-dus - New, easy to use
e: Eleven, sudo -H mkusb-11 - Classic user interface
n: NoX, sudo mkusb-nox - original text mode
b: Bas, sudo mkusb-bas - basic text mode for old/basic linux
q: Quit
---------------------------------------------------------------------
Select version of mkusb (d/e/n/b/q)
And during the installation I believe I chose msdos
and to use 20%
.
df -h
;sudo lsblk -f
;sudo lsblk -m
;echo "hello world" > hello.txt
. Reboot and select 'Run Ubuntu - persistent live' and open a terminal window again. Rundf -h
;sudo lsblk -f
;cat hello.txt
. (Copy and paste the content in the terminal window into the question.) – sudodus Jul 13 '17 at 05:43sudo -H mkusb
is a deprecated command. Today you should either start mkusb from dash or with the command linemkusb
and select 'd' to getdus
(or 'e' to get mkusb-11 (the classic user interface)). I think you have better chances to succeed with new versions of Ubuntu, if you usedus
alias mkusb version 12. So please try that way (and check like you did before to find out if you manage to create and run a persistent live system). – sudodus Jul 14 '17 at 10:12/dev/sdb5
)? In that case, what was the result? – sudodus Jul 14 '17 at 10:19/dev/sdb5
. Then you can try with the following commands,
– sudodus Jul 14 '17 at 15:24sudo umount /dev/sdb5
andsudo tune2fs -L casper-rw /dev/sdb5
sudo lsblk -f
;sudo lsblk -m
;sudo parted -ls
-- At this stage the AskUbuntu system suggests that we continue in a chat room. So please join this chat room :-) – sudodus Jul 15 '17 at 05:06