Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Install on a usb stick

  1. #1
    Join Date
    Dec 2007
    Beans
    8

    Install on a usb stick

    Can anyone tell me what would happen if I installed Ubuntu 9.04 on a usb stick? I mean directly, not through Unetbootin or LiveUSB creator. Is it safe for the system? Would it be a LiveUSB (i.e., would it work on other machines, not the one I installed it from)? Would it take more/less space, would it be fater/slower than traditional LiveUSB? Other advantages/disadvantages over a LiveUSB install?

    Thanks in advance.

  2. #2
    Join Date
    Apr 2008
    Beans
    741

    Re: Install on a usb stick

    I run Ubuntu from a USB flash drive. I take my work laptop home, but when I'm doing things unrelated to work, I don't want to run the risk of polluting my work environment.
    It runs much faster than a Live CD. The Live CD is a compressed live file system which has to be swapped into memory in order to run. A full install to a USB drive doesn't have to be uncompressed, so it is faster.
    My USB install has worked on every system I've used it on. In just the last few minutes, I've booted up an HP 8510p laptop and an HP dc7100 desktop. No problem. Boots up quick, too.
    A Live CD install can fit on a 1Gb USB drive. A full install will take over 2Gb.
    I believe that one cannot upgrade the kernel on the Live CD install because the "regular" Ubuntu kernel doesn't have squashfs, which is what does the compression mentioned above (could be wrong, can't find cite). Another problem with updates is that updated files can't replace the original files in the compressed Live CD Image, so you end up with the updates taking up valuable real estate in your persistent partition.
    One problem with all flash memory is that it will eventually wear out. I store all my important files on a NAS device and I purchased a flash drive with a lifetime replacement warranty (just in case!)
    I used the instructions here to install and here to configure my flash install for (hopefully) the best performance and least wear-and-tear.

  3. #3
    Join Date
    Dec 2007
    Beans
    8

    Re: Install on a usb stick

    Thanks for the reply!

    I tried to install Ubuntu 9.04 (well, Linux Mint 7, but it shouldn't matter, right?) on my usb stick, but it refuses to boot. The GRUB showed up fine, but nothing further. Said something like "can't boot from that device". So I edited the boot entry (changed hd(2,1) to hd(0,1) and /sdc2 to /sda2" and then I saw a flicker of the splash screen, but after that the system stopped at a command prompt with (initramfs) in the beginning and a mistake like "can't mount /dev /root/dev because the file doesn't exist" and "can't find init in /sbin/init, specify it in the init= boot option".

    I browsed a bit around the filesystem, and it doesn't seem like the one on the usb drive. It doesn't have /home, for one. However, it does have /dev, /bin, /sbin and some others. So I lsed /dev and saw that there is no device to correspond to the usb drive; I could only see the machine's hard drive. Seems like just after loading the kernel the system stops seeing usb drives, including the one it should be booting from.

    I'm very confused why it doesn't work for me. Usual LiveUSBs boot just fine on the laptop.
    Last edited by LoonyPhoenix; June 11th, 2009 at 09:25 PM.

  4. #4
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Install on a usb stick

    Usually, we can easily install Ubuntu (or Mint) to a USB flash memory stick in the usual manner, the same way as if we were installing to any hard disk drive.

    I prefer the reiser file system for flash installations, it seems much faster in most kinds of flash memory. The new ext4 might be even better, I haven't tried it out enough yet to be sure, but I think ext4 is very good.
    It's best to choose to install GRUB to the USB's master boot record and possibly the system's partition boot sector as well.

    You might have some trouble with Mint's GRUB because Mint doesn't use the file system UUID booting method that Ubuntu's GRUB uses. That means every time you boot the USB stick in a different computer you'll have trouble because it'll be some other (hdx) number. You should be able to edit your /boot/grub/menu.lst with the UUID numbers like we use in Ubuntu and it should work, it's the same GRUB I think.
    In case you don't know what I'm talking about, here's a link about uuid numbers, uuid
    You should be able to boot into GRUB's Command Line Interface and use the uuid command to get a list of your UUID numbers, then add the right one for your Ubuntu USB installation to your /boot/grub/menu.lst file.

    Unless you have other problems as well. Some computers can't boot a USB device, (even some new ones), and I have run into one brand of flash memory which doesn't seem to be suitable for this kind of use. Most flash memory seems to be okay.
    Ubuntu user since 2004 (Warty Warthog)

  5. #5
    Join Date
    Dec 2007
    Beans
    8

    Re: Install on a usb stick

    Thank you very much! This was illuminating, and helped a lot. I wonder why Mint doen't use uuids like Ubuntu does.

    By the way, I have the casper-rw file from my old LiveUSB intallation (backed it up in case something went wrong). Can I salvage something? I've done a lot of intalling and configuring on my old system and I don't want to lose it all.

    Anyway, that aside, I'm very happy with the results.

    Oh, and: I chose to use ext4 as the file system. I have a pretty fast flash drive and I'm not too worried about the wear (it has life warranty, whatever that means) - it's OCZ Rally2. Do I need any special tweaks (like, different mount options, etc.) to improve the performance a bit more?
    Last edited by LoonyPhoenix; June 12th, 2009 at 11:14 PM.

  6. #6
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Install on a usb stick

    I wonder why Mint doen't use uuids like Ubuntu does.
    I don't know. I got the impression they don't like the use of UUIDs in GRUB from some reading I did in their web forum a while back, I can't imagine why. I think booting with UUID numbers is the best invention since sliced bread!
    It will be particularly useful when USB3 comes in, and people will likely be installing Linux operating systems in USB SSD drives so they can carry their own operating systems around in their pockets, complete with all of their favorite files and settings.
    I think USB3 will dramatically change the way we use computers in the future, and most likely in Linux's favor. Computers will be more like boxes that we plug our USB3 drive into, I imagine. USB3 will start to appear sometime soon. It will be a while before it gets to my neck of the woods though.
    I have a pretty fast flash drive and I'm not too worried about the wear (it has life warranty, whatever that means) - it's OCZ Rally2.
    Oh wow! I'm jealous! I'm a big fan of OCZ drives and I want one too! I really want an OCZ brand SSD drive! I'll get one sometime soon.
    Do I need any special tweaks (like, different mount options, etc.) to improve the performance a bit more?
    Not really, especially with a good quality brand of drive like OZC, but there are a few things that won't do any harm and may boost your speed a little. I'm out of time for now, I'll come back and elaborate later on . . .
    Ubuntu user since 2004 (Warty Warthog)

  7. #7
    Join Date
    Dec 2007
    Beans
    8

    Re: Install on a usb stick

    Quote Originally Posted by Herman View Post
    Oh wow! I'm jealous! I'm a big fan of OCZ drives and I want one too! I really want an OCZ brand SSD drive! I'll get one sometime soon.
    I think you misunderstood me; it's not an SSD that own, it's a plain 8 GB USB stick, the one that I'm booting from. Still, it's OCZ, and I know it should be good.

    Anyway, thanks for all the help.

  8. #8
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Install on a usb stick

    Well, a USB flash memory stick has flash memory inside it and so does an SSD drive.
    The difference is, an SSD drive is bigger and faster.
    From what I understand of what I've read, an SSD drive has several pieces of flash all put together in one box. They're connected a kind of a RAID array, and that's the main reason an SSD drive is a lot faster than just a USB flash memory stick. The material the flash memory is made of is pretty much the same stuff as far as I know.

    I'd buy a OCZ flash memory stick tomorrow if one was for sale in my town. The last time I googled for OCZ products it looked like they're hard to get in Australia. A few retailers advertised them, but thier web pages said they were out of stock. I think they put a big markup on them in this country too. I'm wondering if I can order from overseas.
    In the meantime, I have to be content (or discontent) with inferior brands of USB flash memory sticks, whatever I can get my hands on.
    What I really want someday is an OCZ SSD drive though like a vertex.

    I have a few USB flash memory sticks and some of them have Ubuntu installed in them, but I don't use them full time so I don't see the need to take any special measures to make sure they don't wear out. Some of them are getting old already and I haven't had one fail yet.
    I fixed a computer for an old lady who takes perfect care of it, so much that she's scared to even use it. It's getting old and obsolete but it's in mint condition. She doesn't even know how to do much with computers because she's afraid to try things. She's missing out on a lot of fun because she's being too careful.
    I have a whole room full of old obsolete computer parts that nobody will ever want because they're all superceeded by newer, faster, smaller and more efficient technology.
    SO, my idea is to just use things and accept the fact that they might wear out eventually and have as much fun as you can while you're doing it. Don't pay any attention to worry-worts or people who try to scare you about everything. Just do our work or have fun!
    You have a good brand of flash memory, it will last you for a long time anyway.
    I tune my flash memory installations for speed, not for long life.

    I'm not sure how many GB your USB flash memory stick is, but my eeepc has a 4 GB SSD drive plus a 4 GB SSD card in it. I leave it on 24/7, but it doesn't do a lot of file system intense work. I use it mainly for Skype or for taking with me when I go somewhere.
    I followed this how-to HOWTO: Use swapfile instead of partition and hibernate
    I set my swappiness to 10, Performance tuning with 'swappiness'
    I'm using reiserfs with the options nolog,notial, relatime in /etc/fstab.
    That's about all I can remember, I use a special eeepc kernel.

    It may wear out someday, but in the meantime it's fast and it does everything I want and I'm betting it'll last plenty long enough for me to get my money's worth out of it.
    There are already better machines that'll do more for less, by the time mine ever wears out it'll be getting pretty obsolete and I'll want to upgrade to a newer one anyway.

    That's what I think about running an operating system in flash,
    Regards, Herman
    Ubuntu user since 2004 (Warty Warthog)

  9. #9
    Join Date
    Jun 2009
    Beans
    27

    Re: Install on a usb stick

    Quote Originally Posted by LoonyPhoenix View Post
    Can anyone tell me what would happen if I installed Ubuntu 9.04 on a usb stick? I mean directly, not through Unetbootin or LiveUSB creator. Is it safe for the system? Would it be a LiveUSB (i.e., would it work on other machines, not the one I installed it from)? Would it take more/less space, would it be fater/slower than traditional LiveUSB? Other advantages/disadvantages over a LiveUSB install?

    Thanks in advance.
    that http://sunoano.name/ws/public_xhtml/...from_USB_stick is isntalling Debian from USB stick but then, if you want to run your Ubuntu from the stick (i.e. not install a Desktop system with it) the process of getting the data onto the stick is the same as this link shows

  10. #10
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Install on a usb stick

    that http://sunoano.name/ws/public_xhtml/...from_USB_stick is isntalling Debian from USB stick but then, if you want to run your Ubuntu from the stick (i.e. not install a Desktop system with it) the process of getting the data onto the stick is the same as this link shows
    Cool!

    Here's a little script I wrote for recording how many writes to disk I have made, I run this script just before shutting down if I remember to.
    Code:
    #!/bin/bash
    # a script for recording writes to disk, (mainly useful for predicting the lifetime of flash memory)
    
    date >> iostat.log
    uptime >> iostat.log
    echo " " >> iostat.log
    iostat -p >> iostat.log
    iostat -kdx >> iostat.log
    echo "x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x" >> iostat.log
    I was using the data I was collecting for playing with the equation from the following link, Accurately judging endurance for solid-state storage.

    This script was inspired by a discussion with Patb in an earlier thread, Installing into a SSD, and Patb deserves most of the credit.
    I haven't been able to prove anything much yet, except that the results seem to vary dramatically according to the kind of work the user is doing.

    On a slightly different aspect of the same topic, a lot of people advise the use of ext2 rather than ext3 or ext4 for flash memory, so as to avoid file system journalling. In the following linked web blog, Archive for the ‘SSD’ - Thoughts by Ted, Theodore Tso' (the head developer of the ext series of file systems), says he thinks the benefits of file system journalling outweight the benefits of any reduction in the number of disk writes. (At least that's my interpretation of that part of his blog).

    The new ext4 file system is (as far as I know), the most advanced file system at this time for flash memory, Ext4 has support for the ATA TRIM command, which most SSD drives or memory sticks themselves don't even support yet. Look for that feature next time you're shopping for a new SSD or flash memory stick though. I'm not sure how long it'll be before it's widely implemented, but it's coming. From ext3 to ext4: An Interview with Theodore Ts'o

    Regards, Herman
    Ubuntu user since 2004 (Warty Warthog)

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •