LinuxQuestions.org
Social Bookmarking all things Linux and Open Source
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 09-05-2009, 08:50 PM   #1
lpmorgan1
LQ Newbie
 
Registered: Jul 2008
Posts: 6
Thanked: 0
Question I want to copy my hard drive to a larger hard drive and boot from the new drive.


[Log in to get rid of this advertisement]
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
linuxubuntu lpmorgan1 is offline  
Tag This Post ,
Reply With Quote
Old 09-05-2009, 09:23 PM   #2
aus9
Senior Member
 
Registered: Oct 2003
Location: Australia
Posts: 3,765
Thanked: 42
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)
linux aus9 is offline     Reply With Quote
Old 09-06-2009, 10:14 AM   #3
lpmorgan1
LQ Newbie
 
Registered: Jul 2008
Posts: 6
Thanked: 0

Original Poster
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.
linuxubuntu lpmorgan1 is offline     Reply With Quote
Old 09-06-2009, 10:43 AM   #4
linuxpokernut
Member
 
Registered: Jul 2007
Location: Pikksburgh PA
Distribution: Slackware 12.2
Posts: 156
Blog Entries: 6
Thanked: 11
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.
linux linuxpokernut is offline     Reply With Quote
Old 09-06-2009, 11:45 AM   #5
tredegar
Senior Member
 
Registered: May 2003
Location: London, UK
Distribution: Kubuntu6.06.1LTS (still excellent!). Kubuntu 8.04.1
Posts: 4,381
Thanked: 143
Try this link: http://www.linuxjournal.com/article/10093
linuxubuntu tredegar is offline     Reply With Quote
Old 09-06-2009, 12:09 PM   #6
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit Source, Kubuntu64, Slamd64. Fedora QA
Posts: 1,684
Thanked: 55
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
linuxubuntu amani is offline     Reply With Quote
Old 09-06-2009, 12:18 PM   #7
tredegar
Senior Member
 
Registered: May 2003
Location: London, UK
Distribution: Kubuntu6.06.1LTS (still excellent!). Kubuntu 8.04.1
Posts: 4,381
Thanked: 143
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.
linuxubuntu tredegar is offline     Reply With Quote
Old 09-07-2009, 09:29 PM   #8
lpmorgan1
LQ Newbie
 
Registered: Jul 2008
Posts: 6
Thanked: 0

Original Poster
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.
linuxubuntu lpmorgan1 is offline     Reply With Quote
Old 09-08-2009, 12:26 AM   #9
yancek
Senior Member
 
Registered: Apr 2008
Posts: 1,043
Thanked: 91
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.
linux yancek is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 05:44 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration