LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2013, 03:56 PM   #1
fusionstate
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Rep: Reputation: Disabled
Moving Ubuntu 12 LTS from USB to Hard Drive- How do I ??


Installed Ubuntu 12 LTS recently. Dumped Windows XP after I couldn't reinstall even though had CD and Codes so I've quit that buisness. No more Drugs-

These are my problems:

Installed Ubuntu 12 LTS operating system on Flash drive and running on Acer Extensa 4620. Runs fine but- I want to move the operating system to the recently installed hard drive to increase speed.

I used Gpart to create the following structure: /dev/sda1 31 GiB, (an unallocated space 9.7 GiB), /dev/sda3 107 GiB.

The unallocated space in between the two ntfs partions is for the swap file 9.7 GiB.


First problem, can't figure out how to change unallocated space to swap file status.

Second problem: I tried to use dd I believe it was, to move the operating system to the hardrive but got errors in the command line execution.

Caveat- The file system on the Flash drive is ext4. It is smaller and not even close to fully used. Boot section is: 28 GiB with 14 GiB used.

As a newbie with other operating system experience I may be more comfortable than most with the process, however due to the radically different nature of Linux I'll need some precise instructions if you can help

Thanks for any assistance,

FusionState.
 
Old 12-20-2013, 02:00 PM   #2
yooy
Senior Member
 
Registered: Dec 2009
Posts: 1,387

Rep: Reputation: 173Reputation: 173
when it comes to moving ubuntu, i offen do a fresh install, select the same username&password, copy over /home folder, and set permissions for home folder and install desired applications on new machine.
 
Old 12-20-2013, 03:35 PM   #3
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837
you most certainly can't just dd it to your hard drive. if you tried that, chances are you have to repeat the partition/format process you described. which will loose all existing data. so if you have important data, move it to somewhere else first.

apart from that i'd do as yooy suggested.

ps: swap on linux is usually 1:1 to physical ram, so if you have 4gb ram, use 4gb swap.

suggest you read up on the whole topic, there's gazillions of how-tos on the web.
 
Old 12-20-2013, 05:09 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
[experimental]: if nothing is important on the internal drive you can probably
Code:
dd if=/dev/[whatever-device-the-external-drive-is-attached-to] of=/dev/[whatever-device-the-internal-drive-is-attached-to]
and get a bootable system. then you can boot a gparted-live-usb to increase the partitions sizes.
 
Old 12-20-2013, 05:21 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
Quote:
First problem, can't figure out how to change unallocated space to swap file status.
9l7GB seems excessive for swap. If you have something like 4-8GB of RAM, you would not need nearly that much. If you have a big drive, I guess it doesn't matter. In GParted, you should see the unallocated space in the main window. Click on it to highlight it and then click the Partition tab at the top and you should have the 'New' option, click it and you should be able to set it as swap. If you've done this and it failed you need to post more detail on what exactly you did and the results.
 
Old 12-20-2013, 07:47 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,848

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Quote:
Originally Posted by fusionstate View Post
I used Gpart to create the following structure: /dev/sda1 31 GiB, (an unallocated space 9.7 GiB), /dev/sda3 107 GiB.

The unallocated space in between the two ntfs partions is for the swap file 9.7 GiB.
Huh ???. You do *not* want to use NTFS for Linux.
Swap needs to be in a partition, not un-allocated space.

"dd" is absolutely the worst option in this situation. You can just preallocate partitions and create Linux filesystems on them and copy everything across, or (better) do as suggested by @yooy, and re-install from scratch. Much better option - Ubuntu is (was, last I tried) good at recognising prior userid/password on install.
 
Old 12-20-2013, 08:35 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,398

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
You could use a tool like redobackup or clonezilla. They tend to work OK. Or partimage or g4u or g4l maybe.

Actually gparted can copy partitions.

dd should or might work. Kind of depends on some things. It wouldn't be my first choice to suggest.


After you clone it, you should be able to resize it.
 
Old 12-20-2013, 10:31 PM   #8
fusionstate
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the replies. I do have a good backup option so I'll be able to wipe the drive and start over if need be.

schneidz: I may well try the dd if statement first. I do not understand the function though. if of ?? I've just run the concept through an Internet search and will read up on it. Sounds promising and "if" I try it I'll let you know what the outcome is. Could it possibly damage the hard drive by creating an USB image on a Hard Drive device. (I'm new to this..)

Alternatively-

Is there a way to turn the existing system on the USB Flash Drive into an ISO or distribution of some sort and then install that to the hard drive?

The reason for wanting to do that is: I've got a setup with various programs installed already and I don't want to have to reinstall all the programs again.

Thanks,

fusionstate.
 
Old 12-20-2013, 11:42 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
The dd command does a byte for byte copy. dd if/dev/sda of/dev/sdb will copy from sda to sdb and overwrite anything on sdb.

Quote:
Is there a way to turn the existing system on the USB Flash Drive into an ISO or distribution of some sort and then install that to the hard drive?
I've used remastersys to do that on Ubuntu 12.04. The program is no longer be developed but should work on 12.04.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 12.04 LTS very slow to mount internal hard drive lavere Linux - Newbie 7 05-31-2012 05:57 PM
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 10:19 AM
Uninstalling Ubuntu 10.10 (or moving onto another hard drive) jlcrogue Linux - Newbie 3 04-02-2011 05:13 PM
Cannot Install Ubuntu 8.04 LTS - WD Hard Drive missing Paul Langdon Linux - Newbie 5 03-31-2009 06:56 AM
Need Help Moving Files From Hard Drive to USB Device Nobody404 Linux - Newbie 20 09-17-2007 08:39 PM


All times are GMT -5. The time now is 01:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration