new install

Place to discuss Debian Linux and Debian based distributions
Post Reply
Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

new install

Post by Ice9 » Mon Mar 26, 2007 4:15 am

tonight I will get my hands on a shiny new Core 2 Duo system with a 320GB hard drive.
What would be my best option, do a full reinstall and then move my files from /home manually to the new system or could I transfer my existing system to the larger hard drive.

I cannot use the exact same partition scheme since I'm slowly but surely running out of space on all the partitions of my system at the moment, roughly had 6GB for / and 74GB for /home on a 80GB HDD.

User avatar
Basher52
guru
guru
Posts: 925
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Mon Mar 26, 2007 7:28 am

In this too curious I am, cos I've always made a fresh install when so much hardware is changed, but if Linux is able to do this... could be cool to hear


I know that winblows will go BSOD :P I tried it

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Mar 26, 2007 7:51 am

If it were me I would create the new partitions on the new drive larger than what they were on the old drive, then "dd" the raw file systems over to the new partitions and then resize them to the full capacity of the new partition with "resize2fs". It's very simple to do. If your partition names are different then they were on the old drive you'll need to modify the /etc/fstab to reflect the new names but other than that you should end up with exactly the same system, just more space available. Of course if you are running 3rd party drivers for video cards or network cards and these have changed on the new system you'll also might need to reconfigure some hardware configuration. If you have no 3rd party drivers and need no 3rd party drivers on the new system then your should should be done except for an X reconfig.

You could also rsync, specific file systems or the whole drive, or tar, or "cp -a" or ... ... . I always prefer the dd and resize2fs method so everything is exactly as I had it on the old system with little fuss. This is assuming you are replacing one machine with another.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Mon Mar 26, 2007 8:42 am

Ok so basically I would jjust partition the entire drive in a similar way to the old one, only larger partitions and the do

Code: Select all

dd if=/dev/hda of=/dev/sda
since I indeed replace an old machine (IDE drives) withh a new one (SATA drives)
I assume I can do that with a regular knoppix cd?

EDIT:
I seem to remember that you once told me to dd the partitions separately?
In my case it would only be swap, / and home
What would the typical best size be for /, 20GB enough?
I have 10GB now and it's almost full.

User avatar
Basher52
guru
guru
Posts: 925
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Tue Mar 27, 2007 1:24 am

You say you have a 10GB for /
I've always had that and my space is never out, but I do mount xtra space under /home and other places and that are other physical disks.

what kind of files do you place under / ?

but on the other hand with 320GB disk,
you could easily make 20Gb for /

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Mar 27, 2007 2:07 am

I don't place any specific files under /, I watch the log space and I periodically run apt-get clean and still I have less than 1GB free space left on /
I have lots of software installed though ...

User avatar
Basher52
guru
guru
Posts: 925
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Tue Mar 27, 2007 4:55 am

hmm wierd
my new installation of FC6 is on a 16GB partition and that also
includes 'rysnc' of all updates available and all that only take 2,7G
and this inludes KDE, so I have 13G left, no Open Office though

wonder if Debian is somewhat different maybe...

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Mar 27, 2007 8:11 am

Ice9 wrote:Ok so basically I would jjust partition the entire drive in a similar way to the old one, only larger partitions and the do

Code: Select all

dd if=/dev/hda of=/dev/sda
since I indeed replace an old machine (IDE drives) withh a new one (SATA drives)
I assume I can do that with a regular knoppix cd?

EDIT:
I seem to remember that you once told me to dd the partitions separately?
In my case it would only be swap, / and home
What would the typical best size be for /, 20GB enough?
I have 10GB now and it's almost full.
As you said, you don't want to dd /dev/sda or you'll just wipe out your partition tables and the drive, you want to do the individual partitions (/dev/sda1, etc). Regarding swap, just create a new one. If your swap partition is /dev/sda2 then "mkswap /dev/sda2". Of course also don't forget to set the partition type to "Linux Swap" in fdisk. Make "/" however big you want. You might consider only making it as big as you need leaving a chunk of the disk unallocated. You can always go back and increase the size if you need more (assuming the free space is just after the partition you want to make larger). This is where LVM comes in handy.

The only reason I say that is that you may want to create a new partition for something else later and you'll have that free space available to do so. Personally I usually just allocate the entire disk and deal with chopping it up later if need be. Also, some people are big fans of separating the directory structure into separate file systems (separate /, /home, /var, /tmp, /usr file systems) but for desktops I find that to be more of a pain than it is worth.

Regarding can you use KNOPPIX, sure you can, or you just add the drive to your existing machine, do the partitioning/copying (but be wary of disk writes while copying, single user mode would be wise) and then move the drive to the new machine.

Post Reply