Code Monkey home page Code Monkey logo

ubuntu-usb-merge's Introduction

ubuntu-usb-merge

Automating merging the read-write filesystem on Ubuntu USB back into the read-only part with a quick bash script.

The process is described in my blog post here http://davstott.me.uk/index.php/2013/09/05/ubuntu-13-04-on-a-usb-flash-drive-and-merging-its-persistent-storage/ and whilst this process and script works for me, there are very few safety checks in it, so running this script as root might very well delete all of your data and run over the neighbours cat.

Please be extra careful and take backups before you start.

At the moment, it requires that mksquashfs be installed, which can be done with sudo apt-get install squashfs-tools

ubuntu-usb-merge's People

Contributors

danmbox avatar pgaskin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

ubuntu-usb-merge's Issues

Ubuntu 14.04.3 LTS - 'upperdir' option for overlay mounting should be 'readwrite/upper'

The existing version of ubuntu-usb-merge hasn't worked for me when I tried with Ubuntu 14.04.3 LTS workstation image.

The casper-rw content is slightly different, and the overlay contents appear in a directory 'upper'.

# mount
/var/tmp/usblive/casper-rw on /var/tmp/usblive/readwrite type ext3 (rw)

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      3.9G  762M  3.0G  21% /var/tmp/usblive/readwrite

# ls readwrite/
format  lost+found  upper  work

# ls readwrite/upper
boot  cdrom  etc  home  lib  media  rofs  sbin  tmp  usr  var

So, the overlay mount works only with a slight modification to the original command. The upperdir option needs to be taken down a level inside

# mount none merged -o lowerdir=readonly,upperdir=readwrite/upper -t overlayfs

`

Mounting overlayfs error

patrick@DESKTOP:~/Documents$ sudo ./merge.sh /media/patrick/UBUNTU
Mounting /media/patrick/UBUNTU/casper/filesystem.squashfs
Mounting /media/patrick/UBUNTU/casper-rw
Mounting overlayfs
mount: wrong fs type, bad option, bad superblock on none,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.