PenDrive Query

Soldato
Joined
5 Sep 2005
Posts
11,742
Location
Northern Ireland
Is it possible to install a full linux distro to a pendrive?

I know you can put a LiveCD version on the USB stick, but surely if you make any changes during the session it'll just be writing them to RAM and you'll lose it all next time you come to use the USB stick?

I know it will be slow like, but it seems like it would be a handy thing to have, I'm currently typing this using a Ubuntu on a USB stick on the friends laptop, which for some bizarre reason refuses to boot even safe mode, so I slapped this in to copy the essential files off before reformat. (Recovery CD cant fix either)

Anyway, this ubuntu thing seems snappy enough, I rather like it so I was wondering if theres a way of making any of the changes I'm making on the Pendrive permanent, if you know what I mean, so I can muck about a bit more on my own PC. Synaptic doesnt seem to be working either, I assume thats because I'm using a LiveCD distro?

This post is a bit of a rambly one, so I hope someone can make out what I'm looking!

Cheers!
 
Sure. Linux isn't even remotely bothered about what you install it to. If you boot from a "live cd" usb stick, with a second usb stick plugged in, you can install ubuntu directly to the other usb stick.

Generally it's worth adjusting grub afterwards to make sure it always boots from the right usb stick, even when there's one / two / zero hard drives in the computer it's attached to. This isn't too hard, find a line which says root=/dev/sda1 or root=/dev/sdb1 and replace it with root=UUID=**** where the **** are the unique identified for your partition.

Debian will install onto a usb stick quite happily too. I think centos will, but haven't tried it. I used Debian stable installed to a 4gb (possibly 2gb) usb stick as a file server, so as to keep the OS separate to the data (on hard drives). That ran with no trouble for six months or so.
 
on a side note, i just tried ubuntu livecd on a usb stick, dedicated 1gb to persistence mode. once booted i was unable to install/activate the nvidia drivers and as a concequence (i assume) was stuck in none ideal resolutions. it was also unable to fnd any codecs for video/mp3 formats, meaning it wasnt possible to play any media files.

are these problems associated with livecd distros or am i doing something wrong?
 
on a side note, i just tried ubuntu livecd on a usb stick, dedicated 1gb to persistence mode. once booted i was unable to install/activate the nvidia drivers and as a concequence (i assume) was stuck in none ideal resolutions. it was also unable to fnd any codecs for video/mp3 formats, meaning it wasnt possible to play any media files.

are these problems associated with livecd distros or am i doing something wrong?

Linux doesnt even know your on a USB stick. It sees (scsi/sata/usb) flash/disks as block devices /dev/sd[a-z]

You haven't installed a normal linux on the flash, you've installed an adaptable linux that's going to try and load the most appropriate drivers for ANY system. Therefore having closed binary modules is not a great idea ;-)

Try install ubuntu, use the CD or usb image, and just partition your USB stick as if it was a HDD. Put a 100MB ext2 /boot, a ext4 / (and maybe leave out the swap). It will be slow but it'll work just the same.
 
Back
Top Bottom