On Friday 15 August 2008 14:41, Martin McCormick wrote:
>       I've got a working Debian system that I am about to
> break. I am replacing the master drive with a new one that is 32
> times the size of the old one and want to transfer the system
> intact from the old one to the new one so dd is not an option
> but I want to be sure to preserve all the special files and the
> boot sector for the new disk.

This is really easy :)
>
>       The a command in fdisk says to toggle a boot flag. When
> I make a Linux partition and then mkfs -text3, what state is
> that flag in? I looked at the known good disk and the new one
> and fdisk reported the same information except for size.

I must admit my ignorance in this matter.
>
>       I plan to use dar to put the old system on to the new
> drive. Will that preserve all the special files?
>
>       If not for those, ordinary tar would work for everything
> else?
>
>       The end result should be the same system as before but
> with a _LOT_ more space.
>
>       Thanks for any constructive ideas.

I'd do this:

1. plug the new one in and reboot and configure the bios
2. boot up debian into single user mode
3. create partition(s) in the new disk drive with cfdisk
4. create filesystems in the new disk drive with mkfs.ext3
5. create the swap space in the new disk drive using mkswap

 Here's mine (pasted from cfdisk):

   Name      Flags    Part TypeFS Type        [Label]     Size (MB)
 -----------------------------------------------------------------
   sda1      Boot      Primary Linux ext3                     57.58
   sda5                Logical Linux swap / Solaris         2000.0*
   sda6      NC        Logical Linux LVM                   72290.7*

 In this case I use LVM, which is a good idea in a lot of cases.

6. mount the new filesystem(s) in /mnt/newfs, for example
7. run 'rsync -axPh / /mnt/newfs'
8. edit /mnt/newfs/etc/fstab to reflect the changes; I'd use UUID's for the 
filesystems; you can determine the UUID's of your filesystems with 'blkid'

 Here's mine:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
UUID="f94f5a03-67ca-4932-a9d5-2328776c6285" /boot ext3 defaults
UUID="8a4fb183-7092-4041-af8f-41158e356df1" / ext3 defaults,errors=remount-ro 
0 1
UUID="4833592d-6afa-46c2-8c7c-35b85c7ac4ea" none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,utf8 0 0

# backup HDD
UUID="9bcab58b-1c0d-4bd9-888c-dc205117eb2a" /mnt/backup_hdd ext3 
defaults,noauto 0 0

9. 'shutdown -h now'
10. plug out the old disk drive
11. boot up debian from the new disk drive using the grub boot floppy you're 
prepared earlier (see the grub-disk package)
12. edit /boot/grub/menu.lst; specifically the #kopt option if it is necessary
13. run grub-install (man grub-install)
14. run update-grub
15. 'shutdown -r now' to see if it all works...

I wonder if I missed anything... Have fun!
>
> Martin McCormick WB5AGZ  Stillwater, OK
> Systems Engineer
> OSU Information Technology Department Telecommunications Services Group

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


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to