LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 09-05-2009, 07:50 PM   #1
lpmorgan1
LQ Newbie
 
Registered: Jul 2008
Posts: 16

Rep: Reputation: 0
Question I want to copy my hard drive to a larger hard drive and boot from the new drive.


I am new to Linux and Ubuntu. I want to copy my hard drive to a larger hard drive and begin using that newer, larger hard drive to boot Ubuntu Linux.
I believe the command line command begins with
sudo rsync -av

I have learned that GRUB requires a hard drive name in a file to boot properly. I have not learned how to locate modify that file.

I believe there is more involved.

Can anyone point me to a place that has answers to this question?

lpmorgan1
 
Old 09-05-2009, 08:23 PM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
hi

I think you may like to run a live cd/dvd such as knoppix and image your partition to a backup hard drive or dvdrw etc....depending on its data size.

2) use the live cd/dvd to create a new partition table to your desire. Format those new partitions as swap or ext3 etc.

See label info in (4)...meaning read all of suggestion before dismissing it...lol

3) Copy (restore) the partition image...to the new bigger partition on that new drive.

4) Now grub-legacy is not yet in the mbr of your new bigger partition so use the live cd to install it....assuming you have removed older drive and newer one is now the first bootable device...change grub commands if different

Code:
root (hd0,0)
setup (hd0)
You must see a message that grub has found the booting files and has succeeded.

4) Now still in that live cd/dvd mode...edit the new /etc/fstab to reflect your build.

If you created labels with gparted or qtparted from Knoppix etc....you can now use labels in your partition table.

eg.....UUID versus LABEL for same partition

-----------/etc/fstab-----------
UUID=ba23e80d-f21f-4c43-9d7e-0701bb041a66 / ext3 defaults,errors=remount-ro,noatime 0 1


LABEL=WDP1 / ext3 defaults,errors=remount-ro,noatime 0 1
-------------------------------------------

5) how do we get to edit it?

Code:
su
mkdir /z
mount /dev/sda1 /z
kwrite (or other editor)
(and navigate to /z/etc/fstab)
 
Old 09-06-2009, 09:14 AM   #3
lpmorgan1
LQ Newbie
 
Registered: Jul 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Unhappy I am too new

I am afraid I am too new to follow this advice.
I do not understand all that is being said.
 
Old 09-06-2009, 09:43 AM   #4
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Rep: Reputation: 59
There is a program/script for this, it was reccomended to me and I cannot for the life of me remember the name or find the thread. I tried to google it but I couldnt find any solutions LESS complicated than the one mentioned.
 
Old 09-06-2009, 10:45 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Try this link: http://www.linuxjournal.com/article/10093
 
Old 09-06-2009, 11:09 AM   #6
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
You can use the parted magic cd for a similar purpose.


1. Make image of relevant partitions in another partition of the same drive or the other drive

2. Restore these images on a freespace of the same size on the other drive in the same order on the new drive (there is no need of making partitions there, but you need a disk label (DOS))

Do everything with parted magic CD or Clonezilla live CD
 
Old 09-06-2009, 11:18 AM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
I was just reading about clonezilla
Here's a review. If you'd rather use a GUI, then the clonezilla live-CD looks very good.
 
Old 09-07-2009, 08:29 PM   #8
lpmorgan1
LQ Newbie
 
Registered: Jul 2008
Posts: 16

Original Poster
Rep: Reputation: 0
I do not care if instructions are complicated.
For me to follow them they most include language someone new to Linux, but experienced in Windows, can understand.
For example

3) Copy (restore) the partition image...to the new bigger partition on that new drive.
My question is "How do you do this?"

Another example:
4) Now grub-legacy is not yet in the mbr of your new bigger partition so use the live cd to install it....assuming you have removed older drive and newer one is now the first bootable device...change grub commands if different

Code:

root (hd0,0)
setup (hd0)

You must see a message that grub has found the booting files and has succeeded.\

My question is "How do I get to where this code can be entered, and what does the code mean?"

I have no Linux experience, but I am generally computer savy.
I would be glad to learn how to do everything from the Linux command line.
That is where I want to be, but it will take me awhile to build up enough expertise to get there.

In the meantime, I appreciate the tip on Clonezilla. That may meet my immediate need.

I want to make a clone of the current version of Ubuntu before upgrading to the new version -- this will allow me to "back out" if there is a problem. It will also allow moving to a larger hard drive.

Thanks for the suggestions. Any further posts to instructions for Linux newbys to help them become knowledgeable would be appreciated. I know nobody personally that is experience in Linux who can coach me, so I am dependent on what has been written.

Thanks for all efforts.
 
Old 09-07-2009, 11:26 PM   #9
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,667

Rep: Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730
Since you are new to Linux, I would second the suggestion that you try Clonezilla because it is designed to do exactly what you want and has good documentation. I would read documentation on their page before trying anything. It gives you a number of options, create an image of a partition/disk, copy a partition to another partition on the same or another drive, copy an entire drive. How to is explained on their site.

Booting after you have copied to another drive will depend upon whether you have the drive on the same or another computer. I think the file of Grub you were referring to in your initial post is the menu.lst file in /boot/grub directory.

Quote:
root (hd0,0)
setup (hd0)

You must see a message that grub has found the booting files and has succeeded.\

My question is "How do I get to where this code can be entered, and what does the code mean?"
You do this in a terminal/konsole window. The root (hd0,0) part needs to be done from a grub prompt (grub>) which you get to by typing "grub" (w/o quotes) at a command prompt as root user and tells Grub the bootloader files are on the first hard drive, first partition, the setup (hd0) tells it to put the initial Grub file, stage1, in the master boot record of the first hard drive.
 
  


Reply

Tags
copy, disk


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: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
Copy Fedora 5 Hard Drive to another Hard Drive Using Knoppix 5.1.1 lud477 Linux - Software 2 03-17-2007 05:06 PM
Easiest way to copy a boot drive to a new hard drive lsgko Linux - Software 3 05-24-2005 09:38 PM
How to copy ext2fs from failed hard drive to good drive? DogWalker Linux - Hardware 2 08-30-2004 10:52 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 02:47 AM


All times are GMT -5. The time now is 10:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration