Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I like to setup a 4 GB USB stick to act like a bootable media that boot a small debian lxde environment. Everything should be editable so there is no special persistent section (it all is).

How to acceive this? What is the workflow? What are the tools? I checked out various live usb installer but all do have their persistent partition.

After I have done the setup I like to make an img from the USB stick to clone it on other USB sticks.

share|improve this question
    
What exactly do you mean about persistance? Why do you need everything to be editable? What exacly are you trying to acheive? –  terdon Feb 6 '13 at 13:35
    
Hi @terdon. Most (or all) live usb installers install the os complete write protected and let the users save their data to an seperate (very small) partition. My setup should be 100% writable because a normal os installation is. I like to update packages or read the log from a previous boot which I can't if is not persistent. I want a normal os on a usb stick like on a normal computer with a hdd. –  burnersk Feb 6 '13 at 14:09
    
OK, so you want it persistent. I had understood that you did not. –  terdon Feb 6 '13 at 14:15

1 Answer 1

up vote 1 down vote accepted

You are looking for http://www.pendrivelinux.com/. The site has all the information you need, I recommend you have a look at it. The following is what they suggest for installing a persistent Ubuntu 7.10 :

  1. Download Ubuntu 7.10 (Gutsy Gibbon) and burn to a CD/DVD

  2. Restart your PC from the CD/DVD

  3. Open a terminal and type sudo su (to become root)

  4. Type mkdir /projectinit (to make our project directory)

  5. Type cd /projectinit (to change to the project directory)
  6. Type gzip -dc /cdrom/casper/initrd.gz | cpio -i (to extract the initrd.gz)
  7. Type gedit init (to edit the init file)
  8. From gedit, find the following section:

    break)
    break=premount
    ;;
    esac
    

    Directly above esac add the following:

    persistent)
    PERSISTENT=yes
    root_persistence=casper-rw
    home_persistence=home-rw
    ;;
    

    It should end up up like the following:

    break)
    break=premount
    ;;
    
    persistent)
    PERSISTENT=yes
    root_persistence=casper-rw
    home_persistence=home-rw
    ;;
    
    esac
    
  9. Save the changes to update the init file

  10. Type find . | cpio -o -H newc | gzip -9 > initrd.gz (to zip the new initrd.gz file)
  11. Then you can copy the new initrd.gz file to your usb flash drive, replacing the old file (or rebuild the iso to include the new file)

To boot persistently, at the boot menu press F6 to enter a custom boot option. Add persistent to the end of the boot string:

enter image description here

I cannot guarantee that this will work for a recent Debian but it should be a good starting point. Even if it doesn't you should be able to find all the information you need on the pendrive linux page.

Good luck!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.