Article View: alt.os.linux.slackware
Article #50Re: migrating slackwareOS to a new hard drive?
From: William Hunt
Date: Tue, 03 Aug 2004 18:51
Date: Tue, 03 Aug 2004 18:51
92 lines
3491 bytes
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
Technical Details
Message-ID:
<Pine.LNX.4.58.0408031001140.11811@worker.huntbros.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!sn-xit-02!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!worker.huntbros.net!wjhReferences:
<ceo4b9$7cc$1@spacebar.ucc.usyd.edu.au>Show Full Headers
Complete Article Headers
X-Google-Thread: f906c,d77a150c151ff0fb X-Google-Thread: 102983,d77a150c151ff0fb X-Google-Attributes: gidf906c,gid102983,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!sn-xit-02!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!worker.huntbros.net!wjh From: William Hunt <wjh@huntbros.net> Newsgroups: alt.os.linux.slackware,aus.computers.linux Subject: Re: migrating slackwareOS to a new hard drive? Date: Tue, 3 Aug 2004 11:51:24 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <Pine.LNX.4.58.0408031001140.11811@worker.huntbros.net> In-Reply-To: <ceo4b9$7cc$1@spacebar.ucc.usyd.edu.au> References: <ceo4b9$7cc$1@spacebar.ucc.usyd.edu.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: abuse@supernews.com Lines: 92