LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 02:56 PM   #1
fusionstate
Member
 
Registered: Dec 2013
Posts: 50

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, 01:00 PM   #2
yooy
Senior Member
 
Registered: Dec 2009
Posts: 1,387

Rep: Reputation: 174Reputation: 174
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, 02:35 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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, 04:09 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
[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, 04:21 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,537

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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, 06:47 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
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, 07:35 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,997

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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, 09:31 PM   #8
fusionstate
Member
 
Registered: Dec 2013
Posts: 50

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, 10:42 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,537

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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



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 04:57 PM
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 09:19 AM
Uninstalling Ubuntu 10.10 (or moving onto another hard drive) jlcrogue Linux - Newbie 3 04-02-2011 04:13 PM
Cannot Install Ubuntu 8.04 LTS - WD Hard Drive missing Paul Langdon Linux - Newbie 5 03-31-2009 05:56 AM
Need Help Moving Files From Hard Drive to USB Device Nobody404 Linux - Newbie 20 09-17-2007 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:43 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
Open Source Consulting | Domain Registration