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

Thread: Install on a usb stick

Hybrid View

  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
    5,090
    Distro
    Ubuntu 14.04 Trusty Tahr

    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
    5,090
    Distro
    Ubuntu 14.04 Trusty Tahr

    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
    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

  8. #8
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,090
    Distro
    Ubuntu 14.04 Trusty Tahr

    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)

  9. #9
    Join Date
    Jul 2009
    Location
    west queensland
    Beans
    3
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Unhappy Re: Install on a usb stick

    Quote Originally Posted by ducksun43 View Post
    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
    Hello Herman,
    got a question almost relating to your posts here.
    My laptop is:
    eeepc701sd/xp 8.0 gig ssd 512 ram.
    seagate 1000 gig usb 2.0 external hdd.

    I am unable to write read from the ssd with any partition tools.
    Windows xp installer sees the drive but unable access it.
    I can run livecd usb on it when i try to install onto the ssd i get responses of unable write/read. is there a way of installing to the seagate drive? as the attempt i did gives an error on loading of:
    grub 1.5 ... loading

    grub error 2

    help if you can please...
    thanks in advance if you can
    Adam.

  10. #10
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,090
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Install on a usb stick

    I don't know why your USB external hard drive (Seagate) would give GRUB Error 2, but certainly you should be able to easily install Ubuntu in it and use it to run your eeepc.
    You should be able to install in it in the normal way, as if you were installing to an internal hard drive, but try to install GRUB to the USB drive's MBR and not to MBR in your first internal hard disk. It sounds like you've done that part okay.

    I have an eeepc here too and I think it's great! It boots and runs Ubuntu in USB flash memory sticks without any problems. It's a little bit unusual in the way it decides on the drive order sometimes, but other than that no problems.

    I found out mine won't boot a USB external 2 1/2" hard disk drive. However, I can use a larger USB external 3 1/2" hard disk.
    I think probably it can't boot the 2 1/2" because the 2 1/2" drive relies on power from the USB port, and the eeepc doesn't have enough amps in the USB ports to power the drive. The 3 1/2 " USB enclosure has its own power lead for getting power from a power point, and a USB flash memory stick doesn't draw very much power at all. Could a lack of power from the eeepc have anything to do with your booting problem? Is the external hard drive spinning up properly?

    Are you using an older version of GRUB? The GRUB from Ubuntu Hardy and earlier have trouble booting Intrepid and later because of changes in the ext3 file system. That's the only thing I have ever heard of giving an error 2, although there may be other causes of GRUB error 2 that I don't know about yet. There's always something more to learn ...
    Last edited by Herman; July 14th, 2009 at 07:47 PM.
    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
  •