Deliver 14x Faster speed on your D-Link wireless-N router network using built-in 12dBi antennas.

Question: How do I install an os on a usb memory stick for emergencys?

Eric B Writes to us:

Hey Admin Dude,

I had a real hard time with a pc recently and didnt have my knoppix disk with me. I didnt have another machine to d/l it with and I was so mad at myself because i had a jump drive with the knoppix image on it. Now so it doesnt happen again i want to install an os on the drive. Can you do it? I sure hope you can!

Eric B. from Chicago

You can leave a response, or trackback from your own site.

4 Responses to “Question: How do I install an os on a usb memory stick for emergencys?”

  1. Karl L. Gechlik says:

    Eric I’m sorry I just emailed you the solution… I dont know what to tell you. No one replied to you :( If it stays stagnant I will post the answer in the AM.

  2. Karl L. Gechlik says:

    Answer: How-to: Installing Ubuntu Linux on a usb pendrive

    This tutorial will show how-to install Ubuntu on a usb stick. Even though this tutorial uses Ubuntu as its base distribution, you could virtually use any type of Linux liveCD distribution.

    Being able to run Linux out of a usb bar is a great way to enjoy the live CD experience (being able to use Linux on any computer you might get by) and the big advantage of being easier to carry around than a CD.

    1. Requirements
    In order to reproduce this tutorial, you will need a few items such as:

    a ubuntu liveCD
    a usb bar of at least 1G
    a running Linux operating system
    Now that you have all this, it is time to prepare you USB bar do host the Ubuntu liveCD files.

    2. Setting up the USB disk
    2.1. Finding the device
    In the first place, you need to plug your usb drive and check under which device it is associated. To find out the device, run:

    $ sudo fdisk -l

    On my system, the device appears as being /dev/sdb, I will therefore use /dev/sdb as a reference for this tutorial, please replace it accordingly to your system (might be sda, sdc …).
    Once you found your device, you are going to create the partitions.

    Using the wrong device name might destroy your system partition, please double check

    2.2. Making the partitions
    Make sure every of your already mounted partition are unmounted:

    $sudo umount /dev/sdb1

    and then launch fdisk, a tool to edit partition under linux:

    sudo fdisk /dev/sdb

    We are going delete all the partition and then create 2 new partition: one fat partition of 750M which will host the files from the live CD iso, and the rest on another partition.

    At fdisk prompt type d x where x is the partition number (you can simply type d if you only have one partition), then:

    n to create a new partition
    p to make it primary
    1 so it is the first primary partition
    Accept the default or type 1 to start from the first cylinder
    +750M to make it 750 Meg big
    a to toggle the partition active for boot
    1 to choose the 1 partition
    t to change the partition type
    6 to set it to FAT16
    Now we have out first partition set up, let’s create the second one:

    n to create yet again a new partition
    p to make it primary
    2 to be the second partition
    Accept the default by typing Enter
    Accept the default to make your partition as big as possible
    Finally, type w to write the change to your usb pendrive
    Partitions are now created, let’s format them.

    2.3. Formatting the partitions
    The first partition is going to be formated as a FAT filesystem of size 16 and we are going to attribute it the label “liveusb”.

    $ sudo mkfs.vfat -F 16 -n liveusb /dev/sdb1

    The second partition is going to be of type ext2 with a blocksize of 4096 bytes and the label casper-rw. Mind that it has to be labeled as casper-rw otherwise the tutorial won’t work!.

    $ sudo mkfs.ext2 -b 4096 -L casper-rw /dev/sdb2

    At this stage, our usb pendrive is ready to host the liveCD image. Now, let’s copy the files to the usb bar.

    How-to: Installing Ubuntu Linux on a usb pendrive — page 2
    How-to: Installing Ubuntu Linux on a usb pendrive — page 2 ›
    printer-friendly version | add new comment | | | | | | | |
    HowTo | System Submitted by chantra on Wed, 2007-03-14 19:48.
    Hi, its a very basic
    Submitted by Anonymous (not verified) on Wed, 2007-06-06 17:34.
    Hi,

    its a very basic question from a newbie like me.
    while performing “step 2.3 formatting”, I get following problm –

    my usb is mounted as /dev/sdc1 and now I have added two partition on it as said. but while formatting which device should I use. I am confused because in the article it says sdb1 and sdb2 which might be the partition in the USB for author. for me its /dev/sdc1p1 and /dev/sdc1p2. when I try to format by this name my host can not identify this and gives error like no such device.

    please help soon

    thanks

    reply
    You might want to use: fdisk -l
    Submitted by chantra on Wed, 2007-06-06 19:35.
    You might want to use:
    $ sudo fdisk -l

    This will output the different partition you have, then pick up the right one.
    Debuntu

    reply
    linux off USB
    Submitted by riyasmp on Sun, 2007-05-06 21:34.
    hi guys

    i am trying to get around a problem for the last one month. since i am not a computer expert most of the answers what i get is not sufficient. as somebody put it giving a link and asking to read manual is not helping me at all. i will summurise the issue and will ask you the perticular things i want to know.

    i have got a sony vio laptop which doesnt support USB boot.i have got an external USb HDD on which i want to put any of the linux distro preferably ubuntu. i tried with fedora and ubuntu but did not work. some of the forums opined that you can get around this problem with installing GRUB on MBR. when i restart grub menu never comes up.

    can any one help me with this issue please.i would be happy if u tell me with making a bootable CD to tackle it so that i can boot from my USB HDD.

    thanks

    reply
    Persistent Partition
    Submitted by tux on Tue, 2007-03-27 10:21.
    Hello all,
    Fantastic site, wish I had found it long ago!
    I have followed the tutorial and it works well, one small problem that I wonder if anyone can shed some light upon.
    When I boot up and select the persistent option, for the first couple of boots it works very well, on subsequent boots I get an error saying my session only lasted for 10 seconds, then I cannot log into my partition.
    If I also remember correctly I think it also says something about an Xserver (though I could be wrong).
    I have tried a couple of USB sticks now and they all have the same error.
    If anyone could help I would be very grateful
    Thank you.
    Nic

    In life, sometimes you are the lamp post and sometimes the dog

    reply
    custom settings and ~/.xsession-errors
    Submitted by chantra on Tue, 2007-03-27 12:20.
    The reason this usually happens might be due to some preferences files in your home dir.
    Did you by any chance copy some user settings (~/.* files) from another install to your usb stick?
    You might also find hints in the ~/.xsession-errors file
    Hope this helps.
    Debuntu

    reply
    Thank you
    Submitted by tux on Wed, 2007-03-28 21:56.
    Hello chantra
    Thank you for your response I will take a look and see if i can spot anything.
    Not wishing to sound dull, if I cannot log into my persistent area will I find the files by looking on the Casper RW partition?
    Nic

    In life, sometimes you are the lamp post and sometimes the dog

    reply
    Yep, it should be on your
    Submitted by chantra on Thu, 2007-03-29 14:14.
    Yep, it should be on your casper-rw.
    that partition should have a /home folder, look into there.
    Also, if you can’t start a X session, you might want to type Ctrl-Alt-F1 and logging from the virtual console.
    Debuntu

    reply
    RE:
    Submitted by tux on Thu, 2007-03-29 21:44.
    Ok I tried to install to a brand new USB stick, all went well for a few boots, then the error came up once more.
    I tried to Ctrl+Alt+F1 and logging in that way.
    I cannot remember what the entire error is, something about ICE. not being able to do something.
    I also looked of for the /~x server file but could not find it, when logging in I saw it, something about /tmp/.xo-lock needing to be removed.
    Think i am going to leave it for a while now.
    Thank you very much for your help

    In life, sometimes you are the lamp post and sometimes the dog

    reply
    Same Login Problem
    Submitted by NukePodcaster (not verified) on Mon, 2007-04-02 21:58.
    I’m wondering of you solved this problem because I’m getting the same login prompt asking me for login id and password, then session ends within 10 sec.

    I can run my fantastic pen drive Ubuntu like a live CD, but not in persistent mode. My knowledge of Linux has not evolved to the point that I can troubleshoot this one on my own!

    Anyone out there have a solution?

    John

    reply
    Works!
    Submitted by Marek Klein (not verified) on Sat, 2007-03-24 13:39.
    Works great, many thanks for your How-to.

    reply
    Easier way
    Submitted by donnie (not verified) on Fri, 2007-03-23 18:02.
    I’ve been using Puppy Linux (www.puppyos.com) off a usb for years now. Boot off the live CD then there is a nice little ‘wizard’ that installs on the drive for you! For those not sure about booting off a liveCD, I was very wary at first, try VirtualBox (www.virtualbox.org) to run a linux distro from within your XP! You will begin to enjoy it very quickly. It is a great way to find which one you like best. Personally I found Ubuntu way to cumbersome.

    reply
    Very Cool
    Submitted by TJ (not verified) on Tue, 2007-03-20 23:49.
    Very cool. I’ve bookmarked for future reference. BTW, good chance this will make COTD on TekTag.com.

    reply
    How about from a Windoze machine?
    Submitted by Anonymous (not verified) on Fri, 2007-03-16 22:42.
    I want Ubuntu on a stick, but I don’t have a working Linux box. Can you get me there from Windoze?

    reply
    You could try
    Submitted by Anonymous (not verified) on Sat, 2007-03-17 14:10.
    You could try http://www.pendrivelinux.com

    They have step by step procedures from windows XP. Though u may have to use the Live CD first. But you dont need to have it installed though.

    reply
    From windows
    Submitted by chantra on Sat, 2007-03-17 11:51.
    I’m not much of a windows user, but I know that syslinux is available for windows.
    1. You should be able to achieve this by formating the usb bar as described above, but for the ext2 partition.
    2. Mount the CD/ISO with whichever utility under windows (winImage…)
    3. Use syslinux.exe to make the first partition of your usb bar bootable
    4. The casper-rw might be created after a first boot from the usb key in normal mode.

    I believe this is roughly how you might be able to achieve the same thing from windows.
    Debuntu

    reply
    only if you spell it right.
    Submitted by Anonymous (not verified) on Fri, 2007-03-16 23:34.
    no one likes it when you spell it windoze. you sound like a dumbass and its not cool. its w-i-n-d-o-w-s, just do it right.
    its also MS not M$ and not OMG WROST CMOPNY EVA!

    reply
    Get a Life….
    Submitted by sammiam (not verified) on Fri, 2007-04-13 18:30.
    WINDOZ is a M$ product… get a LIFE !

    reply
    ./
    Submitted by Anonymous (not verified) on Sun, 2007-03-18 02:17.
    Exactly what I was thinking.

    reply
    sorry bud, but you’re the
    Submitted by willie (not verified) on Sat, 2007-03-17 17:05.
    sorry bud, but you’re the azz for pointing out that windoze isn’t spelled windoze…

    MSFT == Software From Satan™

    reply
    Please stop this silly
    Submitted by chantra on Sat, 2007-03-17 18:47.
    Please stop this silly war.
    There is no point in arguing about this and this is off topic.
    cheers
    Debuntu

    reply
    You know, I bet if I googled
    Submitted by Anonymous (not verified) on Sat, 2007-03-17 05:13.
    You know, I bet if I googled “Ubuntu from a flash key \ pen drive \ anything else you want to call it” it would probably come up as the first result… but Im lazy.

    Anybody want to spill the beans or a link?

    reply
    thank you, bill
    Submitted by Anonymous (not verified) on Sat, 2007-03-17 02:49.
    thank you, bill gates.

    windoze still sucks.

    reply
    New to Linux, Ubuntu..etc.
    Submitted by terry field on Tue, 2007-03-20 20:33.
    I am brand new to any Linux use. I wanted to try it since I’ve heard so much about it. BUT, now that my very first experience with it is some person mouthing off about “WINDOZE SUCKS” I am totally turning away form this.

    Bye

  3. JC says:

    that is very cool

  4. GUESSWH0 says:

    lots of good stuff here!

Leave a Reply

Powered by WordPress | Designed by: free joomla templates | Thanks to hostgator coupons and joomla hosting