FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-18-2009, 02:55 AM
Justin Gruenberg
 
Default Backing up with dd, and creating a file system on a new drive.

On Thu, Dec 17, 2009 at 9:08 PM, Ray Parrish <crp@cmc.net> wrote:
> Can I use gparted to create an ntfs volume of the drive first, then use
> dd to image the small one, or can I run dd on the unformatted drive
> first to create the backup partitions?


You REALLY don't want to be using dd for this task.

https://help.ubuntu.com/community/InstallingANewHardDrive

Take a look at that guide, it should walk you through setting up the
new hard drive. As for backing up your old one--do you just want the
data off it? Once you have the new hard drive setup, you should just
be able to copy the files over as you like. If you're looking to use
both drives, and automagically back up the old drive as it changes,
thats a different question entirely.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-18-2009, 03:40 AM
user1
 
Default Backing up with dd, and creating a file system on a new drive.

On Thu, 17 Dec 2009 21:55:59 -0600, Justin Gruenberg wrote:

> On Thu, Dec 17, 2009 at 9:08 PM, Ray Parrish <crp@cmc.net> wrote:
>> Can I use gparted to create an ntfs volume of the drive first, then use
>> dd to image the small one, or can I run dd on the unformatted drive
>> first to create the backup partitions?

Look at: http://www.minihowto.org

There are a couple of short minihowtos about dd backup.

I have all my ubunut distributions of 30 gb size


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-18-2009, 12:18 PM
"Karl F. Larsen"
 
Default Backing up with dd, and creating a file system on a new drive.

Ray Parrish wrote:
> Hello,
>
> I just got my new 500 GB drive, and am excited about being able to back
> up my 160 GB old drive. Since I am new to the LInux camp, I need to know
> how to set up the new drive, and how to use dd to image the 160 GB drive
> to the 500 GB drive.

Hi Ray, you need a liveCD from any of the latest Ubuntu
versions. It will have dd in it and also the partitioner.

First connect your USB hard drive and see where it shows up.
It is often at /media/. The whole address to your target might
be like /media/disk/whole-computer and the whole computer
source will be /dev/sda.

Here is the form of the dd command:

$ dd if=/dev/sda of=/media/disk/whole-computer
bs=2048conv=notrunc

Yours may be a little different but it should look about like
the above.

73 Karl






>
> After I do back up the small drive, and create partitions beyond what dd
> writes there, will there be a problem with using dd to rewrite the back
> up at a later date with the new partitions beyond the backup partitions?
>
> Can I use gparted to create an ntfs volume of the drive first, then use
> dd to image the small one, or can I run dd on the unformatted drive
> first to create the backup partitions?
>
> Thanks, Ray Parrish
>


--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
Key ID = 3951B48D


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-18-2009, 12:50 PM
Fred Roller
 
Default Backing up with dd, and creating a file system on a new drive.

Ray Parrish wrote:
> Hello,
>
> I just got my new 500 GB drive, and am excited about being able to back
> up my 160 GB old drive. Since I am new to the LInux camp, I need to know
> how to set up the new drive, and how to use dd to image the 160 GB drive
> to the 500 GB drive.
>
> After I do back up the small drive, and create partitions beyond what dd
> writes there, will there be a problem with using dd to rewrite the back
> up at a later date with the new partitions beyond the backup partitions?
>
> Can I use gparted to create an ntfs volume of the drive first, then use
> dd to image the small one, or can I run dd on the unformatted drive
> first to create the backup partitions?
>
> Thanks, Ray Parrish
>
>
Ray,
Install and format your new 500 Gb hdd. Personally, if you are
going to use it for backing up an external case may be worth the
investment (.02). At any rate, to use dd to back up your 160 Gb drive
do the following:

Assumptions:
- 160Gb drive is primary system drive.
- 160Gb drive is /dev/sda
- 500Gb drive is /dev/sdb1
- we want to create a file /not/ move an image.
- you know how to open a terminal


1. boot with a live CD
2. open terminal and become superuser:

sudo su -

3. mount the 500Gb hdd

mount /dev/sdb1 /mnt

4. insure 160Gb hdd is /not/ mounted:

df -h |grep /dev/sda

this should not return any results, if it does:

umount [mount point of /dev/sda*]

5. Create .img backup

dd if=/dev/sda of=/mnt/mybackup[date].img bs=512

6. take your spouse to dinner and a show, this will take a while, the
best I have seen is 25Mb/sec, average has been 12-14Mb/sec, lows around
3Mb/sec. Assuming low average your backup should take about 3.7 hours
(160000000000120000006060=3.703703704). End result, you should have
an .img file of the hard drive. Restoring is the same instructions
except the dd command is reversed:

dd if=/mnt/mybackup[date].img of=/dev/sda bs=512

two points to conclude on:
a. the .img is mountable so you can grab something if you need it.
b. it is possible to pipe the dd command through tar for a smaller archive.

I don't recall right off what those commands are; but, you should be
able to google them.




--
Fred
www.fwrgallery.com

"Life is like linux, simple. If you are fighting it you are doing something wrong."



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-18-2009, 12:55 PM
Tom H
 
Default Backing up with dd, and creating a file system on a new drive.

> I just got my new 500 GB drive, and am excited about being
> able to back up my 160 GB old drive. Since I am new to the
> LInux camp, I need to know how to set up the new drive, and
> how to use dd to image the 160 GB drive to the 500 GB drive.

> After I do back up the small drive, and create partitions
> beyond what dd writes there, will there be a problem with
> using dd to rewrite the back up at a later date with the new
> partitions beyond the backup partitions?

> Can I use gparted to create an ntfs volume of the drive
> first, then use dd to image the small one, or can I run dd
> on the unformatted drive first to create the backup
> partitions?

Since you are new to Linux, you may be better off installing KK anew
on your new disk and copying your data over. However, if you want to
copy your old disk to your new one:

1st and 3rd para answer:

I assume that you have Karmic on one partition (the default setup).

You can add the 500gb disk, boot from a Ubuntu CD, create an ntfs
partition, create another partition >160gb (no need to format it) , dd
your old install onto this partition, create a swap partition,
shutdown, remove the 160gb disk, boot from the Ubuntu CD again, mount
the new KK partition, run "grub-install --root-directory=<mountpoint>
/dev/sd<newdisk>", umount the partition, reboot.

The reason for the two boots that I am suggesting is that I expect the
"grub-install ..." to pick up the 160gb disk and to create device.map
that will be incorrect after the 160gb disk is removed.

PS: I prefer (although it is not necessary) to chroot the new disk's
mount before running "grub-install" but it is most probably
unnecessary...

2nd para answer:

If you want to create a backup of the 160gb disk, you will have to
boot from a CD, create a partition on the 500gb disk > 160gb, create a
file (eg 160gbbackup), and dd the 160gb disk to 160gbbackup (you could
also pipe the dd to gzip/bzip2 to compress the image.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-19-2009, 12:41 PM
Ray Parrish
 
Default Backing up with dd, and creating a file system on a new drive.

Fred Roller wrote:
> Ray Parrish wrote:
>
>> Hello,
>>
>> I just got my new 500 GB drive, and am excited about being able to back
>> up my 160 GB old drive. Since I am new to the LInux camp, I need to know
>> how to set up the new drive, and how to use dd to image the 160 GB drive
>> to the 500 GB drive.
>>
>> After I do back up the small drive, and create partitions beyond what dd
>> writes there, will there be a problem with using dd to rewrite the back
>> up at a later date with the new partitions beyond the backup partitions?
>>
>> Can I use gparted to create an ntfs volume of the drive first, then use
>> dd to image the small one, or can I run dd on the unformatted drive
>> first to create the backup partitions?
>>
>> Thanks, Ray Parrish
>>
>>
>>
> Ray,
> Install and format your new 500 Gb hdd. Personally, if you are
> going to use it for backing up an external case may be worth the
> investment (.02). At any rate, to use dd to back up your 160 Gb drive
> do the following:
>
> Assumptions:
> - 160Gb drive is primary system drive.
> - 160Gb drive is /dev/sda
> - 500Gb drive is /dev/sdb1
> - we want to create a file /not/ move an image.
> - you know how to open a terminal
>
>
> 1. boot with a live CD
> 2. open terminal and become superuser:
>
> sudo su -
>
> 3. mount the 500Gb hdd
>
> mount /dev/sdb1 /mnt
>
> 4. insure 160Gb hdd is /not/ mounted:
>
> df -h |grep /dev/sda
>
> this should not return any results, if it does:
>
> umount [mount point of /dev/sda*]
>
> 5. Create .img backup
>
> dd if=/dev/sda of=/mnt/mybackup[date].img bs=512
>
> 6. take your spouse to dinner and a show, this will take a while, the
> best I have seen is 25Mb/sec, average has been 12-14Mb/sec, lows around
> 3Mb/sec. Assuming low average your backup should take about 3.7 hours
> (160000000000120000006060=3.703703704). End result, you should have
> an .img file of the hard drive. Restoring is the same instructions
> except the dd command is reversed:
>
> dd if=/mnt/mybackup[date].img of=/dev/sda bs=512
>
> two points to conclude on:
> a. the .img is mountable so you can grab something if you need it.
> b. it is possible to pipe the dd command through tar for a smaller archive.
>
> I don't recall right off what those commands are; but, you should be
> able to google them.
>
Helo again,

Sorry I haven't gotten back to this thred until now, but I have been
pretty busy around here.

You were the person who got closest to what I wanted, but you are still
off the mark due to my not explaining myself well enough.

I do not want to make an .img file, I want to make a duplicate of my
dual boot 160 GB main drive, on the 500 GB so that I can swap places
with the drives, and run from the big one instead, in case the little
one goes dead.

I know dd can do this, as I have read a tutorial explaining how to do it
in the past, but I cannot find the same tutorial again.

Could you please help me out with this?

Thanks, Ray Parrish

--
The Future of Technology.
http://www.rayslinks.com/The%20Future%20of%20Technology.html
Ray's Links, a variety of links to usefull things, and articles by Ray.
http://www.rayslinks.com
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
http://www.writingsoftheschizophrenic.com



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-19-2009, 12:52 PM
Steve
 
Default Backing up with dd, and creating a file system on a new drive.

On Sat, 19 Dec 2009 13:41:19 -0000, Ray Parrish <crp@cmc.net> wrote:

> Helo again,
> Sorry I haven't gotten back to this thred until now, but I have been
> pretty busy around here.
> You were the person who got closest to what I wanted, but you are still
> off the mark due to my not explaining myself well enough.
> I do not want to make an .img file, I want to make a duplicate of my
> dual boot 160 GB main drive, on the 500 GB so that I can swap places
> with the drives, and run from the big one instead, in case the little
> one goes dead.
> I know dd can do this, as I have read a tutorial explaining how to do it
> in the past, but I cannot find the same tutorial again.
> Could you please help me out with this?
> Thanks, Ray Parrish
>
What I’ve done in the past is use gParted, from a live disc, to copy/paste
the partitions from one disk to another. If you copy each partition one
at a time and then contract/expand it to the size you want before copying
the next. You then need to use SuperGrub or edit Grub to sort out the
boot process and UUIDs.

--
Steve

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-19-2009, 08:30 PM
Fred Roller
 
Default Backing up with dd, and creating a file system on a new drive.

Ray Parrish wrote:
> Helo again,
> Sorry I haven't gotten back to this thred until now, but I have been
> pretty busy around here.
>
> You were the person who got closest to what I wanted, but you are still
> off the mark due to my not explaining myself well enough.
>
> I do not want to make an .img file, I want to make a duplicate of my
> dual boot 160 GB main drive, on the 500 GB so that I can swap places
> with the drives, and run from the big one instead, in case the little
> one goes dead.
>
> I know dd can do this, as I have read a tutorial explaining how to do it
> in the past, but I cannot find the same tutorial again.
>
> Could you please help me out with this?
>
> Thanks, Ray Parrish
>
>
No Problem, Same instructions as before except omit:

3. mount the 500Gb hdd

mount /dev/sdb1 /mnt

ensure neither drive is mounted in step 4

and your dd command now looks like this:

dd if=/dev/sda of=/dev/sdb bs=512 conv=noerror

assuming the your 500Gb drive is /dev/sdb

From here it's choose your own adventure:
a.) If you just want to create an additional partion(s) for general use
between the dual boot systems:

fdisk /dev/sdb

then once the program is up:

n

"n" for new partition and accept the defaults for a single partition.
Understand what you are doing in this program or you could sh--can the
drive and have to start over.

Once the partition is created type:

w

to (w)rite to disk and exit the program. Once the partition is
completed and you are on the command line again then format the
partition (assuming it is /dev/sdb3 and it needs to be formatted for
both windows and linux) with:

mkfs.vfat /dev/sdb3

reboot in to your linux boot and open a terminal.

sudo mkdir /Data

mount the new partition:

sudo mount /dev/sdb3 /Data

the system should auto detect the type of file system. Edit your
"fstab" as necessary for a permanent mount point.

or by GUI

b.) Once you are done and while you are still in the terminal

sudo apt-get install gparted

because the live CD does not ship with the partitioner. Resize your
disk or add a new partition. Reboot and create the directory and set up
fstab. Hope this helps.

--
Fred
www.fwrgallery.com

"Life is like linux, simple. If you are fighting it you are doing something wrong."


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-23-2009, 04:16 AM
Ray Parrish
 
Default Backing up with dd, and creating a file system on a new drive.

Fred Roller wrote:
> Ray Parrish wrote:
>
>> Helo again,
>> Sorry I haven't gotten back to this thred until now, but I have been
>> pretty busy around here.
>>
>> You were the person who got closest to what I wanted, but you are still
>> off the mark due to my not explaining myself well enough.
>>
>> I do not want to make an .img file, I want to make a duplicate of my
>> dual boot 160 GB main drive, on the 500 GB so that I can swap places
>> with the drives, and run from the big one instead, in case the little
>> one goes dead.
>>
>> I know dd can do this, as I have read a tutorial explaining how to do it
>> in the past, but I cannot find the same tutorial again.
>>
>> Could you please help me out with this?
>>
>> Thanks, Ray Parrish
>>
>>
>>
> No Problem, Same instructions as before except omit:
>
> 3. mount the 500Gb hdd
>
> mount /dev/sdb1 /mnt
>
> ensure neither drive is mounted in step 4
>
> and your dd command now looks like this:
>
> dd if=/dev/sda of=/dev/sdb bs=512 conv=noerror
>
> assuming the your 500Gb drive is /dev/sdb
>
> From here it's choose your own adventure:
> a.) If you just want to create an additional partion(s) for general use
> between the dual boot systems:
>
> fdisk /dev/sdb
>
> then once the program is up:
>
> n
>
> "n" for new partition and accept the defaults for a single partition.
> Understand what you are doing in this program or you could sh--can the
> drive and have to start over.
>
> Once the partition is created type:
>
> w
>
> to (w)rite to disk and exit the program. Once the partition is
> completed and you are on the command line again then format the
> partition (assuming it is /dev/sdb3 and it needs to be formatted for
> both windows and linux) with:
>
> mkfs.vfat /dev/sdb3
>
> reboot in to your linux boot and open a terminal.
>
> sudo mkdir /Data
>
> mount the new partition:
>
> sudo mount /dev/sdb3 /Data
>
> the system should auto detect the type of file system. Edit your
> "fstab" as necessary for a permanent mount point.
>
> or by GUI
>
> b.) Once you are done and while you are still in the terminal
>
> sudo apt-get install gparted
>
> because the live CD does not ship with the partitioner. Resize your
> disk or add a new partition. Reboot and create the directory and set up
> fstab. Hope this helps.
>
Thanks for the directions. I've been busy the past couple of days so I
couldn't get back to you until now. What you told me here seems like
what i want to do, and i thank you again for telling me the procedure.

Have a good holiday season everyone!

Later, Ray Parrish

--
The Future of Technology.
http://www.rayslinks.com/The%20Future%20of%20Technology.html
Ray's Links, a variety of links to usefull things, and articles by Ray.
http://www.rayslinks.com
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
http://www.writingsoftheschizophrenic.com



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 01:11 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org