How to put my running linux on a usb stick??

Asked by oocevin

I want to install my running linux to a usb so I can go to any pc and plug it in and
boot into my running system.
My user and password and every thing I have installed on my PC

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu coreutils Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
Maxim Petrov (maximpetrov) said :
#1

Just copy all data to the usb stick and install grub on it

Revision history for this message
Maxim Petrov (maximpetrov) said :
#2

But it will be better to boot from LiveCD otherwise copying of some folders like /dev, /proc and /sys cause troubles.

Revision history for this message
oocevin (ccct007) said :
#3

I want to be able to go any where and have my system
with me. My friends run windows. I do not like it.

I tried to use startup disk creator.

Do I use file system put all in there?

Revision history for this message
Maxim Petrov (maximpetrov) said :
#4

If you want to use normal system, not LiveUSB, use shouldn't use startup disk creator.

Revision history for this message
oocevin (ccct007) said :
#5

What I'm trying to do is take my lubuntu 10.10 with gnome-panel on it with all of my bookmarks
and all. It would be like taking my pc with me.

I use the startup disk creator to install lubuntu 10.10.

Now I want to put that on my usb stick. I can plug it in
and log into my system on some one else's pc.

It would be like taking a laptop, but in a usb stick.

Lets say I install the system and set it up like I want
it. Now I want to put that on the usb stick. I very own
pocket system. Pull it out and plug it in and log in.

Not installing nothing on that PC. Just loading my
system to surf with my system that I have on my home pc

Revision history for this message
Maxim Petrov (maximpetrov) said :
#6

As I said in #1 you should copy all system data from your home pc to usb stick. It would be better if you boot from LiveCD to do it. Then you should install grub on yuor usb stick and correct /etc/fstab

Revision history for this message
Maxim Petrov (maximpetrov) said :
#7

Another way is to install Ubuntu from LiveCD like usual, but choose partiton of usb stick as "/". In this case don't forget to choose where to install grub. This way simlpier but you'll get new system with default setting and installed software.

Revision history for this message
oocevin (ccct007) said :
#8

I will have to go to a pc man to show me.

He said it can be done but I do not.

I'm not trying to install linux to my pc.
I want my linux that is already installed on my pc loaded to the
usb.

That way I can use it on any pc-laptop and log into my system
that I have install on my pc at home.

I am sorry if I am not getting it. I'm using the system that
I installed from my usb stick. I know to do that.

Putting my installed system on my usb

Revision history for this message
Maxim Petrov (maximpetrov) said :
#9

Hmm... May be i misunderstand you. You have ubuntu installed on your pc. You want to get copy of that ubuntu on your usb stick. Or not?

Revision history for this message
oocevin (ccct007) said :
#10

Most definitely.

I want to clone my hdd to the
usb stick..

Lets say my hdd is empty. I plug in the usb and and
turn on the pc and it goes to the desktop of my
lubuntu 10.10 with gnome-panel on it.

Be just like if I carried my pc with me. But on the usb
stick.

Revision history for this message
Maxim Petrov (maximpetrov) said :
#11

Your hdd is empty now? Or you mean that you want to boot without system on hdd?

Revision history for this message
oocevin (ccct007) said :
#12

No my hdd is not empty. I want to clone it.

I want to put my hdd system lu 10.10 on the usb stick so
I can boot it on other pc-laptop which ever one that I am
on at the time.

I'm using the system that I want to clone.

Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#13

You can create cloned copies of an Ubuntu installation using CloneZilla (http://clonezilla.org) or, probably less preferably, dd (http://manpages.ubuntu.com/manpages/natty/en/man1/dd.1.html).

Maxim Petrov's original suggestion should also work, though it is more complicated. In a bit more detail than he stated it, it is:

(1) Create an ext4 filesystem on the target drive. You might want to use a utility like GParted for this. If you want the target system to have a swap partition, create that too.

(2) Boot from a live CD/DVD/USB that is neither the source nor the target drive.

(3) Mount the source and target drives' root filesystems, which might look like this (but don't just run these commands as-is, check to make sure they have the right device names):

sudo mkdir /source /target
sudo mount /dev/sda1 /source
sudo mount /dev/sdb1 /target

(4) Copy all the files from the source drive to the target drive:

sudo cp -R /source/* /source/.* /target

(5) [Re]install the GRUB2 boot loader to the target drive's Master Boot Record (https://help.ubuntu.com/community/Grub2#Copy%20LiveCD%20Files).

Using CloneZilla would probably be easier. Either way you do it (CloneZilla/dd or the above recursive file copy method), you may have to reinstall GRUB2 to the drive's MBR. And either way you do it, if there are problems, you might end up needing to edit /etc/fstab in the newly created system.

Revision history for this message
oocevin (ccct007) said :
#14

Thanks Eliah Kagan, that solved my question.