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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-04-2008, 06:52 PM
Scarletdown
 
Default Replacing hda - Easiest Way?

I'm going to be upgrading my primary hard drive (80GB) with a new 500GB
drive today. The old drive has 7 assorted partitions on it:

/dev/hda1 - /
/dev/hda5 - /tmp
/dev/hda6 - /root
/dev/hda7 - /opt
/dev/hda8 - /var
/dev/hda9 - /usr
/dev/hda10 - /workspace

So, what would be the easiest way to transfer everything from the old
drive to the new one? I remember from previous experience that just
doing a straight up copy from one to the other didn't work. I need to
copy and
1: keep all permissions intact
2: Copy my boot loader from the old drive to the new one
(unfortunately, I can't remember if GRUB went on the mbr or on the boot
record of the first partition)






--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-04-2008, 08:14 PM
Shachar Or
 
Default Replacing hda - Easiest Way?

On Monday 04 August 2008 21:52, Scarletdown wrote:
> I'm going to be upgrading my primary hard drive (80GB) with a new 500GB
> drive today. The old drive has 7 assorted partitions on it:
>
> /dev/hda1 - /
> /dev/hda5 - /tmp
> /dev/hda6 - /root
> /dev/hda7 - /opt
> /dev/hda8 - /var
> /dev/hda9 - /usr
> /dev/hda10 - /workspace
> 
> So, what would be the easiest way to transfer everything from the old
> drive to the new one? I remember from previous experience that just
> doing a straight up copy from one to the other didn't work. I need to
> copy and
> 1: keep all permissions intact
> 2: Copy my boot loader from the old drive to the new one
> (unfortunately, I can't remember if GRUB went on the mbr or on the boot
> record of the first partition)

I like to use cfdisk to play with partitions. It's in the gpart package.

Consider using LVM2 for this. It makes life better. Read the LVM HOWTO in
http://tldp.org . Leave the /boot outside of LVM.

Do you really need all those different filesystems?

For copying files, instead of cp, use rsync -axhP .

--
Shachar Or | שחר אור
http://ox.freeallweb.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-04-2008, 08:33 PM
Rick Thomas
 
Default Replacing hda - Easiest Way?

On Aug 4, 2008, at 2:52 PM, Scarletdown wrote:

I'm going to be upgrading my primary hard drive (80GB) with a new
500GB

drive today. The old drive has 7 assorted partitions on it:

/dev/hda1 - /
/dev/hda5 - /tmp
/dev/hda6 - /root
/dev/hda7 - /opt
/dev/hda8 - /var
/dev/hda9 - /usr
/dev/hda10 - /workspace
So, what would be the easiest way to transfer everything from the old
drive to the new one? I remember from previous experience that just
doing a straight up copy from one to the other didn't work. I need to
copy and
1: keep all permissions intact
2: Copy my boot loader from the old drive to the new one
(unfortunately, I can't remember if GRUB went on the mbr or on the
boot

record of the first partition)


If you can leave the old disk in the box for a while, start by
installing the new drive as hdb, partition it and mkfs the
filesystems -- all while booted to the old drive. Set up a bunch of
mount-points for the new partitions, e.g.:


/dev/hdb1 /new
/dev/hdb5 /new/tmp
/dev/hdb6 /new/root
/dev/hdb7 /new/opt
...you get the idea...

Then boot single user to the old drive, mount the new drive
partitions and use rsync to copy the contents of the various
partitions to the new drive. Then install grub however you like on
hdb. Since eventually you will want to get rid of the old disk and
install the new one as hda, you may have to fiddle with things like /
etc/fstab and the grub menu.lst file, but that should be pretty obvious.


Take a look at places like http://www.troubleshooters.com/linux/grub/
grub.htm for hints.


Rick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-04-2008, 10:39 PM
Scarletdown
 
Default Replacing hda - Easiest Way?

On Mon, 2008-08-04 at 16:33 -0400, Rick Thomas wrote:

> If you can leave the old disk in the box for a while, start by
> installing the new drive as hdb, partition it and mkfs the
> filesystems -- all while booted to the old drive. Set up a bunch of
> mount-points for the new partitions, e.g.:
>
> /dev/hdb1 /new
> /dev/hdb5 /new/tmp
> /dev/hdb6 /new/root
> /dev/hdb7 /new/opt
> ...you get the idea...
>
> Then boot single user to the old drive, mount the new drive
> partitions and use rsync to copy the contents of the various
> partitions to the new drive. Then install grub however you like on
> hdb. Since eventually you will want to get rid of the old disk and
> install the new one as hda, you may have to fiddle with things like /
> etc/fstab and the grub menu.lst file, but that should be pretty obvious.

Thanks for the tips. Should be useful for this upcoming project. There
has been a slight change of plans though. The drive I bought is SATA II
instead of EIDE. The sales rep at Circuit City convinced me to consider
SATA for the speed, so I went next door to Office Depot and shelled out
a little under $100 for a 500GB Maxtor SATA drive.

So that being the case, I am guessing that the SATA drive will show up
in /dev as something other than hdd (hda is the current primary IDE, hdb
is the secondary (which will then become the primary after this is all
over), and hdc is the DVD-RW. So, before I power down and install the
new drive, can anyone give me an idea of what type of device this will
show as?

Also, the MaxBlast CD that came with the drive says that there is a disk
cloning utility as well. Hopefully, this will work with ext3 partitions
and will copy the GRUB stuff over as well. (crossing fingers...)

Now that I am thinking about this more, perhaps I should go ahead and
clone hdb (where /home, /shared, and /workspace are at) then make the
old hdb, which is 200GB, the new boot drive.




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-04-2008, 10:50 PM
Rick Thomas
 
Default Replacing hda - Easiest Way?

On Aug 4, 2008, at 6:39 PM, Scarletdown wrote:


On Mon, 2008-08-04 at 16:33 -0400, Rick Thomas wrote:


If you can leave the old disk in the box for a while, start by
installing the new drive as hdb, partition it and mkfs the
filesystems -- all while booted to the old drive. Set up a bunch of
mount-points for the new partitions, e.g.:

/dev/hdb1 /new
/dev/hdb5 /new/tmp
/dev/hdb6 /new/root
/dev/hdb7 /new/opt
...you get the idea...

Then boot single user to the old drive, mount the new drive
partitions and use rsync to copy the contents of the various
partitions to the new drive. Then install grub however you like on
hdb. Since eventually you will want to get rid of the old disk and
install the new one as hda, you may have to fiddle with things like /
etc/fstab and the grub menu.lst file, but that should be pretty
obvious.


Thanks for the tips. Should be useful for this upcoming project.
There
has been a slight change of plans though. The drive I bought is
SATA II
instead of EIDE. The sales rep at Circuit City convinced me to
consider
SATA for the speed, so I went next door to Office Depot and shelled
out

a little under $100 for a 500GB Maxtor SATA drive.

So that being the case, I am guessing that the SATA drive will show up
in /dev as something other than hdd (hda is the current primary
IDE, hdb

is the secondary (which will then become the primary after this is all
over), and hdc is the DVD-RW. So, before I power down and install the
new drive, can anyone give me an idea of what type of device this will
show as?

Also, the MaxBlast CD that came with the drive says that there is a
disk
cloning utility as well. Hopefully, this will work with ext3
partitions

and will copy the GRUB stuff over as well. (crossing fingers...)

Now that I am thinking about this more, perhaps I should go ahead and
clone hdb (where /home, /shared, and /workspace are at) then make the
old hdb, which is 200GB, the new boot drive.


Unless your motherboard has SATA onboard, you'll need a SATA PCI
controller card.


In any case, your SATA drive will probably show up as /dev/sda .

Rick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-04-2008, 10:52 PM
Rick Thomas
 
Default Replacing hda - Easiest Way?

On Aug 4, 2008, at 6:39 PM, Scarletdown wrote:

Also, the MaxBlast CD that came with the drive says that there is a
disk
cloning utility as well. Hopefully, this will work with ext3
partitions

and will copy the GRUB stuff over as well. (crossing fingers...)


I know nothing about what's on the MaxBlast CD, but I'm betting it's
Windows-only. "Stick with rsync" is my advice.



Rick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-04-2008, 10:58 PM
Shachar Or
 
Default Replacing hda - Easiest Way?

On Tuesday 05 August 2008 01:39, Scarletdown wrote:
> On Mon, 2008-08-04 at 16:33 -0400, Rick Thomas wrote:
> > If you can leave the old disk in the box for a while, start by
> > installing the new drive as hdb, partition it and mkfs the
> > filesystems -- all while booted to the old drive. Set up a bunch of
> > mount-points for the new partitions, e.g.:
> >
> > /dev/hdb1 /new
> > /dev/hdb5 /new/tmp
> > /dev/hdb6 /new/root
> > /dev/hdb7 /new/opt
> > ...you get the idea...
> >
> > Then boot single user to the old drive, mount the new drive
> > partitions and use rsync to copy the contents of the various
> > partitions to the new drive. Then install grub however you like on
> > hdb. Since eventually you will want to get rid of the old disk and
> > install the new one as hda, you may have to fiddle with things like /
> > etc/fstab and the grub menu.lst file, but that should be pretty obvious.
>
> Thanks for the tips. Should be useful for this upcoming project. There
> has been a slight change of plans though. The drive I bought is SATA II
> instead of EIDE. The sales rep at Circuit City convinced me to consider
> SATA for the speed, so I went next door to Office Depot and shelled out
> a little under $100 for a 500GB Maxtor SATA drive.
>
> So that being the case, I am guessing that the SATA drive will show up
> in /dev as something other than hdd (hda is the current primary IDE, hdb
> is the secondary (which will then become the primary after this is all
> over), and hdc is the DVD-RW. So, before I power down and install the
> new drive, can anyone give me an idea of what type of device this will
> show as?

/dev/sda , probably. You also the symbolic links under /dev/disk , which you
can use.
>
> Also, the MaxBlast CD that came with the drive says that there is a disk
> cloning utility as well. Hopefully, this will work with ext3 partitions
> and will copy the GRUB stuff over as well. (crossing fingers...)

Don't use that proprietary garbage when you've got debian. Boot single user
mode and do your transfers on the file level and not the partition level.
>
> Now that I am thinking about this more, perhaps I should go ahead and
> clone hdb (where /home, /shared, and /workspace are at) then make the
> old hdb, which is 200GB, the new boot drive.

With LVM2 you can make all your devices into one volume group and make as many
logical volumes as you like out of that. You can, for example, have:

/dev/hda1 as /boot
/dev/mapper/your_vg-lv_root as /
/dev/mapper/your_vg-lv_home as /home

This is while /dev/hda2 and /dev/sda1 together make up the volume group
your_vg .

You can play with this as much as you like and you'll be keeping it all
flexible for future changes.
--
Shachar Or | שחר אור
http://ox.freeallweb.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-05-2008, 12:55 AM
"Mumia W.."
 
Default Replacing hda - Easiest Way?

On 08/04/2008 05:52 PM, Rick Thomas wrote:


I know nothing about what's on the MaxBlast CD, but I'm betting it's
Windows-only. "Stick with rsync" is my advice.



Rick




I'm genuinely curious. Why is rsync better than "cp -a"?



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-05-2008, 08:01 AM
Johannes Wiedersich
 
Default Replacing hda - Easiest Way?

On 2008-08-05 00:39, Scarletdown wrote:
> So that being the case, I am guessing that the SATA drive will show up
> in /dev as something other than hdd (hda is the current primary IDE, hdb
> is the secondary (which will then become the primary after this is all
> over), and hdc is the DVD-RW. So, before I power down and install the
> new drive, can anyone give me an idea of what type of device this will
> show as?

fdisk -l will tell you about all disks available on your system.

Johannes
 
Old 08-05-2008, 10:53 AM
Alex Samad
 
Default Replacing hda - Easiest Way?

On Tue, Aug 05, 2008 at 10:01:25AM +0200, Johannes Wiedersich wrote:
> On 2008-08-05 00:39, Scarletdown wrote:
> > So that being the case, I am guessing that the SATA drive will show up

sata's normally turn up as scsi devices so sda

> > in /dev as something other than hdd (hda is the current primary IDE, hdb
> > is the secondary (which will then become the primary after this is all
> > over), and hdc is the DVD-RW. So, before I power down and install the
> > new drive, can anyone give me an idea of what type of device this will
> > show as?
>
> fdisk -l will tell you about all disks available on your system.
>
> Johannes
>



--
"I just want you to know that, when we talk about war, we're really talking about peace. "

- George W. Bush
06/18/2002
Washington, DC
 

Thread Tools




All times are GMT. The time now is 03:21 AM.

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