LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-01-2007, 03:56 AM   #1
dms05
Member
 
Registered: May 2006
Location: Wirral
Distribution: Mepis, Mint, PCLinuxOS
Posts: 57

Rep: Reputation: 15
Can I move my Linux installation to another drive?


I have my Acer laptop dual booting to XP and PCLinuxOS 2007. XP and Linux share drive C: and I use lilo for booting. The Linux bit works well but recently XP has become very corrupted and needs to be reinstalled.

My laptop HDD is configured as 2 drives (C: and D of 50GB each. Is it possible to move the Linux to D: before reformatting C: (and expect it to be still available after XP is reinstalled)? Or do I have to accept that the XP failure means I have the loss of my Linux installation and need to start again for both OS's?

I'd like to finish up with Linux on D: and XP on C:. Would that work?
 
Old 11-01-2007, 08:22 AM   #2
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
You can reinstall XP by only formatting that partition. No reason to lose your linux installation. Just don't go for the option to use the entire drive.
 
Old 11-01-2007, 08:53 AM   #3
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
Your question is confusing because you are using DOS labels to describe your hard drive set up when what you really need to know is how your drive is partitioned.

Does your laptop have one or two physical drives?

C: and D: refer to hard drive partitions that Windows can see. Are you realy suggesting that your linux partition is on the same partition that is used by XP? It seems unlikely to me.

I suggest you post the output of fdisk -l so that it is clear what your set up is.

As far as moving the entire linux installation to another is concerned my answer is, yes, it can be done.
 
Old 11-01-2007, 11:35 AM   #4
dms05
Member
 
Registered: May 2006
Location: Wirral
Distribution: Mepis, Mint, PCLinuxOS
Posts: 57

Original Poster
Rep: Reputation: 15
fdisk

The output is:

fdisk -l

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 382 3068383+ 12 Compaq diagnostics
/dev/hda2 * 383 4650 34282710 c W95 FAT32 (LBA)
/dev/hda3 4651 6240 12771675 5 Extended
/dev/hda4 6241 12000 46267200 c W95 FAT32 (LBA)
/dev/hda5 4651 5613 7735266 83 Linux
/dev/hda6 5614 5806 1550241 82 Linux swap / Solaris
/dev/hda7 5807 6240 3486073+ 83 Linux

Disk /dev/sda: 2097 MB, 2097152512 bytes
255 heads, 63 sectors/track, 254 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 255 2047969 c W95 FAT32 (LBA)
Partition 1 has different physical/logical endings:
phys=(253, 254, 63) logical=(254, 245, 56)

Disk /dev/sdb: 2002 MB, 2002255872 bytes
58 heads, 57 sectors/track, 1182 cylinders
Units = cylinders of 3306 * 512 = 1692672 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 1183 1955263+ b W95 FAT32

Disk /dev/sdd: 65 MB, 65536000 bytes
8 heads, 32 sectors/track, 500 cylinders
Units = cylinders of 256 * 512 = 131072 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 500 63972+ b W95 FAT32


Sorry for the confusion by using DOS labels! I'm still getting to grips with Linux terminology. Basically it's a laptop with an approx 100GB HDD that is split into 2 identical drives using DOS terms. Using Unix terms hda1 is the hidden partition containing a recovery copy of XP. hda5/6/7 are the Unix partitions and the rest are currently XP. In DOS terms hda2/3/4 are for XP with hda4 been the DOS D: drive.
 
Old 11-01-2007, 01:25 PM   #5
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
It is not clear what you want to do. Do you want to move Linux onto the space currently occupied by hda4, 6241 to 12000?
 
Old 11-01-2007, 04:46 PM   #6
dms05
Member
 
Registered: May 2006
Location: Wirral
Distribution: Mepis, Mint, PCLinuxOS
Posts: 57

Original Poster
Rep: Reputation: 15
Exactly. Linux to hda 4. I can then reclaim the rest for XP.
 
Old 11-01-2007, 05:39 PM   #7
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
I think it would also help if you told us how your linux is spread across your partitions. Could you post the contents of /etc/fstab.


The truth is that the way your partitions are arranged is a bit of mess with your extended partition in the middle. You will need to work out a strategy to deal with this.

I would suggest
1. format hda4 as ext3
2. copy linux to hda4
3. change /etc/fstab and lilo so that linux is booting onto hda4
4. rewrite your partition table so that you have

hda1 1 382
hda2 383 around 6050 for XP
hda3 6050 6240 swap (the value of 6050 might be giving you more swap than you really need)
hda4 untouched

5. format hda2 for XP
6. Reinstall XP

All this is fraught with danger that you might trash your system so back up any data first.
 
Old 11-02-2007, 03:05 AM   #8
ch485de
LQ Newbie
 
Registered: Nov 2006
Distribution: PCLinuxOS
Posts: 29

Rep: Reputation: 15
Many thanks for you time and interest. The disorganised nature of my HDD derives from having XP and 2 DOS drives on a single physical drive. I simply installed PCLinuxOS 2007 from the LiveCD and selected the options that were offered automatically.

However your suggestions on rearranging the various partitions look a very good starting point and I will begin by backing up my data!

I did try to use 'remasterme' on my present PCLinuxOS installation with the intention of producing my own version of the iso file and using that to reinstall. However that didn't go well (it wouldn't work in Konsole but did using Xterm) and the resultant DVD (c.1.5GB) wouldn't boot even though I've burnt iso images before and know what to do). Now my PCLinuxOS User A/c won't start from the HDD and reports kstartupconfig is missing - however the Root account still functions.
 
Old 11-02-2007, 03:57 AM   #9
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
It makes you wonder with a cumbling XP and odd missing files whether your hard disc is failing.

As far as your user account is concerned you might try deleting (or just renamimg /home/user/.kde

That would wipe out all your KDE settings for the user but you ought to be able to use it with fresh settings.
 
Old 11-02-2007, 09:37 AM   #10
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
The only way you can 'reclaim' any of the drive for XP is to reformat the whole drive and restructure your partitions because hda3 is the extended partition that only encompasses partitions hda4-7. You don't use hda3 the way you use hda2,4,5,7. It just allows you to have more partitions than if you used only 'primary' partitions.
It seems to me that you could just reinstall XP to hda2, where is already is, without touching anything else. I would suggest using NTFS for XP since there is good support for accessing that now too. Why would you want to move your linux installation?
 
Old 11-03-2007, 03:04 AM   #11
ch485de
LQ Newbie
 
Registered: Nov 2006
Distribution: PCLinuxOS
Posts: 29

Rep: Reputation: 15
Many thanks everyone for your contributions.

I've decided to have a complete fresh installation of both XP and Linux. Not the easiest or quickest but perhaps the safest. I can then install both OS's where I want them and tidy them up.

All the problems were caused by XP and not Linux. I've learnt my lesson about keeping them both well apart so I can recover XP without destroying my very stable Linux installation in future.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to move installation to a new Hard Drive? mlitty Linux - General 26 09-22-2010 09:36 AM
How to move installation to a new Hard Drive? mlitty Linux - General 1 01-18-2007 08:34 PM
Move Suse installation to new drive sirmerced SUSE / openSUSE 1 02-07-2006 02:12 AM
Can I move my linux installation to another Hard Drive? enderjm Linux - Newbie 7 03-11-2004 02:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration