🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.os.linux.slackware
16 messages
16 total messages Started by D. Phan Tue, 03 Aug 2004 13:35
migrating slackwareOS to a new hard drive?
#46
Author: D. Phan
Date: Tue, 03 Aug 2004 13:35
10 lines
1480 bytes
hello there

My old hard drive in which is running slackware 10.0 is now so noisy 
with high frequency. I now wanna move whole contents in the old to a new 
harddisk. Please tell me your experience about that
much appreciated,
regards
d.phan
my system: slackware 10 (ker-2.4.26/cpu 450mhz - 128MB ram) with no X 
and X apps, and managed by puTTY (ssh) from XP clients
Re: migrating slackwareOS to a new hard drive?
#47
Author: W
Date: Tue, 03 Aug 2004 13:44
24 lines
1696 bytes
In news:ceo4b9$7cc$1@spacebar.ucc.usyd.edu.au, D. Phan bitched and
moaned:
> hello there
>
> My old hard drive in which is running slackware 10.0 is now so noisy
> with high frequency. I now wanna move whole contents in the old to a
> new harddisk. Please tell me your experience about that
> much appreciated,
> regards
> d.phan
> my system: slackware 10 (ker-2.4.26/cpu 450mhz - 128MB ram) with no X
> and X apps, and managed by puTTY (ssh) from XP clients

1) cpio the entire drive to the new one.  Make sure the layout is the same,
if /dev/Xa1 is the swap on the old drive, then it is the same on the new.
2) Boot up either by bootdisk or through the CD with the new drive on the
same channel as the old
3) Mount the slice, and use chroot to set it to the root slice
4) Run lilo

You may need to edit your fstab if you add or remove mount points and
slices.

That should be enough though.
Re: migrating slackwareOS to a new hard drive?
#48
Author: Jem Berkes
Date: Tue, 03 Aug 2004 14:09
30 lines
2349 bytes
>> My old hard drive in which is running slackware 10.0 is now so noisy
>> with high frequency. I now wanna move whole contents in the old to a
>> new harddisk. Please tell me your experience about that
>> much appreciated,

First, excellent idea to move your data. If it sounds bad, there is a high 
likelihood of impending failure!

> 1) cpio the entire drive to the new one.  Make sure the layout is the
> same, if /dev/Xa1 is the swap on the old drive, then it is the same on
> the new. 2) Boot up either by bootdisk or through the CD with the new
> drive on the same channel as the old
> 3) Mount the slice, and use chroot to set it to the root slice
> 4) Run lilo
> 
> You may need to edit your fstab if you add or remove mount points and
> slices.

I would reiterate, make sure the physical layout looks the same after the 
data transfer. i.e. hda should be replaced by hda (not hdb).

This also makes me wonder, because I have considered using LVM (Logical 
Volume Management, for several physical disks)... am I correct in my 
understanding that under LVM, the provided tools can be used to move the 
data off the existing physical disk, and then back on to a new disk without 
risking corruption in the process?

-- 
Jem Berkes
http://www.sysdesign.ca/
Re: migrating slackwareOS to a new hard drive?
#49
Author: Thomas Overgaard
Date: Tue, 03 Aug 2004 17:11
11 lines
1206 bytes
D. Phan wrote :

>  I now wanna move whole contents in the old to a new harddisk.

Theres a howto that covers this issue here:
/usr/doc/Linux-HOWTOs/Hard-Disk-Upgrade
-- 
Thomas O.

This area is designed to become quite warm during normal operation.
Re: migrating slackwareOS to a new hard drive?
#50
Author: William Hunt
Date: Tue, 03 Aug 2004 18:51
92 lines
3491 bytes
On Tue, 3 Aug 2004, D. Phan wrote:
> My old hard drive in which is running slackware 10.0 is now so noisy
> with high frequency. I now wanna move whole contents in the old to a new
> harddisk. Please tell me your experience about that
> much appreciated,


i assume box has one old drive, hda;
i assume box has cabling to attach two drives;
i assume you have bootable floppy or cdrom ready.
test boot it to be certain.


(1) shutdown.  add the new drive into the box.
cable and jumper as needed.  for example i will call it hdb.
don't change anything else.

(2) reboot. use dmesg to verify that linux sees the new drive.

(3) fdisk, mkfs and mkswap on new drive as desired.
new partitioning scheme should resemble old scheme, but does
not need to be identical.  order of partitions should not be
altered (so as to keep procedure simple).
for example, if old drive has:
	hda1 as 256MB swap
	hda2 as 2GB /
	hda3 as 2GB /tmp
	hda4 as extended
	hda5 as 14GB /home
then new drive might have:
	hdb1 as 512MB swap
	hdb2 as 4GB /
	hdb3 as 4GB /tmp
	hdb4 as extended
	hdb5 as 32GB /home
if adding a larger drive, and uncertain about partitioning schemes,
then just leave additional space unused.  it can be added in later.

(4) mdir new mountpoints and mount partitions as needed.
for example:
	mkdir /mnt/hdb2
	mount /dev/hdb2 /mnt/hdb2
	mkdir /mnt/hdb3
	mount /dev/hdb3 /mnt/hdb3
	mkdir /mnt/hdb5
	mount /dev/hdb5 /mnt/hdb5

(5) use tar to copy live data from old mountpoints to new mountpoints.
for example:

	OLDMNT=/
	NEWMNT=hdb2
	cd ${OLDMNT}
	tar --one-file-system -cpvf - . | ( cd ${NEWMNT} ; tar -xpf - )

repeat as needed (eg., /tmp and hdb3, /home and hdb5, ...)
you can switch to another console and check progress using 'df'.


(6) shutdown.  disconnect old drive.  cable and jumper new drive
as hda.  save old drive until system is verified running new drive.
if procedure fails then system can be restored by replacing new
drive with old drive.


(7) say prayers.  boot from floppy or cdrom.
use lilo bootprompt to mount filesystem from new drive.
for example:
	boot: mount root=/dev/hda2

(8) run lilo to make new drive bootable.

(9) shutdown, remove cd or floppy, reboot using new drive.
verify everything is working.
fill new drive up with lots of new stuff until full.
buy bigger drive.
goto (1).









-- 
Fire the Liars - Impeach Bush and Cheney!
Prosecute the criminals - Indict Rumsfeld and Ashcroft!
Corruption starts at the top.

William Hunt, Portland Oregon USA
Re: migrating slackwareOS to a new hard drive?
#51
Author: Stanislaw Flatto
Date: Tue, 03 Aug 2004 23:57
16 lines
1453 bytes
William Hunt wrote:

>verify everything is working.
>fill new drive up with lots of new stuff until full.
>buy bigger drive.
>goto (1).
>  
>
:-D

Should be published as Mini-HOWTO for *every* OS.

Having fun

Stanislaw
Slack user from Ulladulla.
Re: migrating slackwareOS to a new hard drive?
#52
Author: W
Date: Wed, 04 Aug 2004 00:11
11 lines
1202 bytes
In news:Pine.LNX.4.58.0408031001140.11811@worker.huntbros.net, William
Hunt bitched and moaned:
> (5) use tar to copy live data from old mountpoints to new mountpoints.
> for example:
>
> OLDMNT=/
> NEWMNT=hdb2
> cd ${OLDMNT}
> tar --one-file-system -cpvf - . | ( cd ${NEWMNT} ; tar -xpf - )

`tar` does not recreate /dev properly, the last time I looked.
Re: migrating slackwareOS to a new hard drive?
#53
Author: nxqo
Date: Wed, 04 Aug 2004 00:25
7 lines
1549 bytes
|> tar --one-file-system -cpvf - . | ( cd ${NEWMNT} ; tar -xpf - )
|
|`tar` does not recreate /dev properly, the last time I looked.

GNU tar does. I've done complete network transfers of disk contents
using tar and netcat.
-- 
Re: migrating slackwareOS to a new hard drive?
#54
Author: Jem Berkes
Date: Wed, 04 Aug 2004 01:33
10 lines
1448 bytes
> GNU tar does. I've done complete network transfers of disk contents
> using tar and netcat.

Aren't there also some other things that could be happening with /proc and 
/dev, like dynamic content creation? I can't remember the details but I 
thought I'd throw that out there.

-- 
Jem Berkes
http://www.sysdesign.ca/
Re: migrating slackwareOS to a new hard drive?
#55
Author: W
Date: Wed, 04 Aug 2004 01:36
10 lines
1410 bytes
In news:Xns953AD15B1D605jbuserspc9org@205.200.16.73, Jem Berkes bitched
and moaned:
>> GNU tar does. I've done complete network transfers of disk contents
>> using tar and netcat.
>
> Aren't there also some other things that could be happening with
> /proc and /dev, like dynamic content creation? I can't remember the
> details but I thought I'd throw that out there.

tar cannot read the entire /proc tree, but that is mostly the pid's
Re: migrating slackwareOS to a new hard drive?
#56
Author: qyswmhk
Date: Wed, 04 Aug 2004 02:33
10 lines
1824 bytes
|> GNU tar does. I've done complete network transfers of disk contents
|> using tar and netcat.
|
|Aren't there also some other things that could be happening with /proc and 
|/dev, like dynamic content creation? I can't remember the details but I 
|thought I'd throw that out there.

I normally exclude /proc from the tar since its contents are virtual.
/dev is ok to tar, GNU tar knows what to do with device files.
-- 
Re: migrating slackwareOS to a new hard drive?
#57
Author: Art Clemons
Date: Wed, 04 Aug 2004 03:16
10 lines
1964 bytes
Jem Berkes wrote:

> Aren't there also some other things that could be happening with /proc
> and /dev, like dynamic content creation? I can't remember the details
> but I thought I'd throw that out there.

With /proc, just creating the directory should be sufficient since it's
dynamically created and altered as Linux runs.  /dev can change,
however unless udev is being used, the individual devices can be copied
and used quite easily.
Re: migrating slackwareOS to a new hard drive?
#58
Author: D. Phan
Date: Wed, 04 Aug 2004 04:39
14 lines
1756 bytes
D. Phan wrote:
> hello there
> 
> My old hard drive in which is running slackware 10.0 is now so noisy 
> with high frequency. I now wanna move whole contents in the old to a new 
> harddisk. Please tell me your experience about that
> much appreciated,
> regards
> d.phan
> my system: slackware 10 (ker-2.4.26/cpu 450mhz - 128MB ram) with no X 
> and X apps, and managed by puTTY (ssh) from XP clients
Thanks for all information and help
this weekends would be relaxed right at the box to move data to the new one.
cheers
Re: migrating slackwareOS to a new hard drive?
#59
Author: William Hunt
Date: Wed, 04 Aug 2004 04:42
36 lines
2455 bytes
On Wed, 4 Aug 2004 qyswmhk@ojdmyw.com wrote:

> |> GNU tar does. I've done complete network transfers of disk contents
> |> using tar and netcat.
> |
> |Aren't there also some other things that could be happening with /proc and
> |/dev, like dynamic content creation? I can't remember the details but I
> |thought I'd throw that out there.
>
> I normally exclude /proc from the tar since its contents are virtual.
> /dev is ok to tar, GNU tar knows what to do with device files.


/proc is a seperate filesystem.  if you give tar the --one-file-system,
it will be excluded.  tarring it up is kind of pointless anyway, since
only a snapshot of it's outputs is preserved, and restoring it does not
producce a functional proc filesystem.

note, just for giggles, that you can mount a proc filesystem anywhere.
eg., mkdir /tmp/foo && mount -t proc none /tmp/foo.

but above /dev, i just did a fast test, tar -cpf /tmp/dev.tgz /dev/,
and tar did bitch about socket /dev/log ... not sure if that's a
problem or not.  but i've never notied any negative results from
using the technique in practice.





-- 
Fire the Liars - Impeach Bush and Cheney!
Prosecute the criminals - Indict Rumsfeld and Ashcroft!
Corruption starts at the top.

William Hunt, Portland Oregon USA
Re: migrating slackwareOS to a new hard drive?
#61
Author: William Hunt
Date: Wed, 04 Aug 2004 04:48
29 lines
1590 bytes
On Tue, 3 Aug 2004, Stanislaw Flatto wrote:
> William Hunt wrote:
>
>> verify everything is working.
>> fill new drive up with lots of new stuff until full.
>> buy bigger drive.
>> goto (1).
>>
>>
> :-D
>
> Should be published as Mini-HOWTO for *every* OS.
> Having fun
> Stanislaw
> Slack user from Ulladulla.

but of course - what is the point of newer, bigger, and
faster if not to fill it up, tear it up, and wear it out ?



>

-- 
Fire the Liars - Impeach Bush and Cheney!
Prosecute the criminals - Indict Rumsfeld and Ashcroft!
Corruption starts at the top.

William Hunt, Portland Oregon USA
Re: migrating slackwareOS to a new hard drive?
#62
Author: ptdhsnj
Date: Wed, 04 Aug 2004 04:57
12 lines
1945 bytes
|> I normally exclude /proc from the tar since its contents are virtual.
|> /dev is ok to tar, GNU tar knows what to do with device files.
|
|but above /dev, i just did a fast test, tar -cpf /tmp/dev.tgz /dev/,
|and tar did bitch about socket /dev/log ... not sure if that's a
|problem or not.  but i've never notied any negative results from
|using the technique in practice.

Yes, that's the other little detail, tar doesn't grab Unix sockets but
that's ok since those will be created by the app that needs them on the
other side.
-- 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads