Needed fully functional [NOT 'Live'(sic)] Linux on USB stick - was [Re: Ubuntu on pendrive]

Liam Proven lproven at gmail.com
Wed Feb 1 03:19:27 UTC 2012


On 31 January 2012 20:28, Default User <hunguponcontent at gmail.com> wrote:
> I hesitate to suggest the obvious, but if you can't disconnect the data
> cable to the hard drive, just disconnect the connector which runs from the
> computer's power supply unit to the hard drive.

GGood suggestion but some PCs cannot boot if there is an inactive IDE
device attached to the motherboard. I don't know (and doubt) if this
applies to SATA machines.

> But if that can't be done either, then I strongly suggest that you forget
> the project altogether, as screwing up the existing system already installed
> on your hard drive can really ruin your day.

Definitely, yes.

> Yes, it can be done, but disconnect the hard drive. Really.

Again. yes.

> Then boot Ubuntu 11.10 from a "live" cd or "live" USB stick.
>
> Then format a target USB stick as FAT 32, using gparted (careful - that
> deletes everything from the target USB stick).  Don't forget to set the
> "bootable" flag.

What? Why FAT32? You can't install Linux on FAT32; the installation
program will have to reformat it as something else anyway.

I recommend ext2. The journalling in ext3 is not needed so much on
non-magnetic media such as Flash chips. Ext4 is designed for large
drives - terabyte-sized - and offers no benefits. Ext2, as it has no
journalling, means fewer writes to the Flash chip & thus a longer
lifespan for the drive.

I also suggest amending /etc/fstab post-install and adding the
"noatime" parameter to the mount parameters. This stops Linux
recording file-read timestamps and again further reduces disk writes.

Both ext2 and noatime also improve performance - writing to Flash is
significantly slower than reading from it, sometimes up to an order of
magnitude slower.

> Note: the target USB stick should be at least 16gb; IMHO 4gb won't work and
> 8gb will be so cramped as to be hardly worth doing.

I beg to differ. I am installing on 8GB sticks and still have room for
a 3GB /home partition. You just need to be sure to run

apt-get clean
apt-get autoclean
apt-get autoremove
apt-get purge

... every now & again, to empty Apt's package cache, which can /eat/
drive space, and also to remove old kernels when the kernel is
updated. Each old kernel takes 100-150MB of disk space.

I am installing into a partition of about 4500MB and ending up with a
gigabyte free.

> Then install just as you would to a hard disk.  And test that you can boot
> from your new USB stick installation.  You did of course remember to set
> your BIOS so that it will boot from a USB stick, if present, before booting
> from the hard drive.

Concur. If the BIOS won't or can't boot from USB, the Plop boot manager will:
http://www.plop.at/en/bootmanager.html

> Finally, don't forget to reconnect your hard drive.

All good advice.


-- 
Liam Proven • Profile: http://lproven.livejournal.com/profile
Email: lproven at cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven at hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884




More information about the ubuntu-users mailing list