0

I am trying to create a USB Persistent Pen Drive that has all the last updates ahd the following "special" packages:

  • Added PPAs with the programs installed. For example Wine.
  • Proprietary Drivers like Nvidia and Broadcom.

Can I install this PPAs or proprietary drivers on a Persistent USB Pen Drive. I ask since in 11.04 and 11.10 I tried and I had problems with this. Will try on 12.04 when I buy a new pen drive.

2 Answers 2

2

The easiest way is to mount the filesystem.squashfs, copy everything out into a temp directory, chroot into that directory, add all of your new entries/download all new packages, and recreate the squashfs. The commands to do so would be as follows:

mkdir /mnt/temp; mount -o loop /path/to/ISO /mnt/temp
mkdir /mnt/temp2; mount -o loop /mnt/temp/casper/filesystem.squashfs /mnt/temp2
mkdir /tmp/toEdit; rsync -avhP /mnt/temp2/* /tmp/toEdit
mount --bind /dev /tmp/toEdit/dev
mount --bind /dev/pts /tmp/toEdit/dev/pts
mount --bind /sys /tmp/toEdit/sys
mount --bind /proc /tmp/toEdit/proc
cp /etc/resolv.conf /tmp/toEdit/etc/
chroot /tmp/toEdit

From here just edit like you would a normal system, then when you exit make a new squashfs and proceed like normal.

I WOULD NOT RECOMMEND a full install on the usb, if you plan on using the usb for longer than a year or two. That will eat your read/write cycles up in no time and bring the lifetime of the usb to about 1/10 of what it should be. Aside from that, don't forget to make your secondary casper-rw partition and put persistent as a kernel argument. Good Luck!

1
  • +1 because of the nice guide darkdragn. Thanks. Apr 29, 2012 at 18:29
1

You you can.

I would approach this as a full install to USB as opposed to a USB liveCD respin. It simplifies a lot of problems.

The problem with using a liveCD with persistence is that the paths on which you achieve persistence are limited.

It is much simpler to:
- do a full install to USB - preferred
- remaster the CD/DVD to include the updates and PPAs

If you do a full install to USB, it behaves exactly like a real install as long as you tweak grub to use disk labels instead of UUIDs.

1
  • Great idea aking. Specially the grub part. Apr 29, 2012 at 18:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .