LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-03-2007, 10:00 AM   #1
lcc00123
LQ Newbie
 
Registered: Oct 2006
Distribution: FreeBSD 6-STABLE
Posts: 4

Rep: Reputation: 0
Question Moving windows XP to the end of a disk?


I know you can shrink a windows XP partition with ntfsresize, but is there a way to move winXP to the end of a disk while keeping the filesystem data updated so I can still use windows without needing to reinstall?
 
Old 04-03-2007, 10:13 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,500

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
No.
The linux-ntfs people even warn against this. See the project site.
 
Old 04-03-2007, 03:21 PM   #3
lefty.crupps
Member
 
Registered: Apr 2005
Location: Minneap USA
Distribution: Debian, Mepis, Sidux
Posts: 470

Rep: Reputation: 32
Generally Windows takes the first partition and names it C:\. I don't know if you can install on a D:\ partition even, or if the first FAT/NTFS just gets named C:\ (not necessarily the first partition) and you could place this at the end.

But moving something? eh. Try DD to copy the data to the end of the drive and then use a boot floppy or bootable XP-CD to try to rewrite the bootloader/boot sector... or just don't even try it as it might be more trouble than its worth, leaving you without Windows (which may be OK!)

Back everyting up. Everyting
 
Old 04-03-2007, 03:33 PM   #4
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Well, certain people are dual-booting windows so it's definitely possible to put it on a second partition or even a third. I actually know of a guy who installed his to second partition by accident, it still worked. But placing it at then end of a disk? I don't know, maybe it still has limitations which make it impossible for it to boot beyond a certain point? Or maybe it does work? I don't think many have tried that actually.
 
Old 05-10-2007, 12:21 PM   #5
stunted
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
it *can* work

On my dual boot machines I often install windows on /hdc2 with a dedicated windows swap partition on hda1 and a dedicated linux swap on /hdc1
The problem is moving partitions around after install brakes the boot process somehow.

Last year I was trying to figure this out and I found a thread on a forum that claimed it could be done and that you could fix the boot process with a with a Hex editor, the post then went on to explain how, I failed to bookmark and I've been looking for the thread ever since (this thread came up while looking for that one) but with no luck.
 
Old 05-10-2007, 02:09 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
XP can be installed in any of the 4 primary partitions. In Linux term there are hda, hdb, hdc and hdd (or sda to sdd for a Sata). There is no technical difficulty associated with it but the user must not move it into another partition because the installation will have a record of the partition number. If you do not believe it just take a look at the boot.ini yourself.

Here is the boot.ini of my XP installed in sda1. The red bit is the record of it being installed in the partition (1).
Code:
root@slax:~# cat /mnt/sda1/boot.ini
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn
It can be moved around by the current version of "gparted" or "Parted Magic" which have the latest version of ntfsresize inside.

When one install XP for the first time in a hard disk the information goes to hda1 slot. Even if the OS later moved to the rear end of the disk its occupation in the hda1 will never change. If one use a Linux boot loader like Grub to fire up hda1 Grub just go to hda1 slot and use the hard disk addresses to locate the XP. Therefore even if a user creates a second ntfs partition physically in front of xp in the hard disk it can only take the drive number "D" because the operating system always assigns drives in the ascending order of the 4 slots in the partition table.

I have installed and booted XP and Vista in all 4 primary positions before. This thread shows a Vista installed in hda1 and hda2 booted by Grub without a Linux installed

Last edited by saikee; 05-10-2007 at 02:39 PM.
 
Old 05-10-2007, 04:52 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,500

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Quote:
Originally Posted by saikee
It can be moved around by the current version of "gparted" or "Parted Magic" which have the latest version of ntfsresize inside.
Have you done this - successfully ???.
Any time I have moved a bootable NTFS partition it has broken.

@stunted, I recently stumbled on this. Maybe it was what you were referring to.
Looks interesting, but I haven't tried it.
 
Old 05-10-2007, 05:39 PM   #8
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,496

Rep: Reputation: 68
You should be able to fix the partition latter by booting from your windows xp cdrom going into recovery and typing fixboot

The actual windows system can be installed anywhere but the boot loader needs to be on the first partition on the first drive.

I think fixboot needs additional options that I fail to remember as I haven't done windows XP support for about 2 years now but im pretty sure this can be fixed and moving the partition shouldn't make any difference.

Last edited by exvor; 05-10-2007 at 05:43 PM.
 
Old 05-10-2007, 05:41 PM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
syg00,

I am a member of Justlinux forum and was alerted by the author of Parted Magic, who is a member there as well as an ex-maintainer for gparted, that there had been a big advance recently in Linux's ability to resize NTFS partitions.

I gave it a trial on Win2k and XP and the results were perfect. I was assured these latest software work on Vista too but I later discovered Vista has a built-in resizer program that runs faster and is obviously error-free.

It is a good practice to defrag a NTFS partition before resizing it.

Personally I find the current gparted and Parted Magic dependable. I have used it to move an entire extended partition with 59 logical partitions inside. Earlier versions are musch less robust/successful. Don't use the old version inside the distro. Download directly from gparted and Parted Magic sites and run the latest versions as Live CDs. Parted Magic actually use the same gparted engine. Both have a simple desktop and all the essential partitioning tools but in the latest versions.

The site you shown involves hacking the XP system by altering the XP bootsector.

All the booting I have done never involves anything other than the standard XP or Vista installations. The making active of a partition, the hiding/unhiding of partitions and re-mapping the disk order are standard commands available both in Grub and Lilo. All I did was to use them. With Linux I never had a need to hack an operating system.

The hiding of a partition is just altering the partition type number, by altering a designated bit, resulting a MS system treating its own partitions as foreign and therefore will not mount it or assign a drive letter for it. That was invented in the Dos era and is part of the PC standard, otherwise Linux wouldn't be able to come up over 100 partitions types.

Last edited by saikee; 05-10-2007 at 05:45 PM.
 
Old 05-10-2007, 05:46 PM   #10
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,496

Rep: Reputation: 68
Quote:
XP can be installed in any of the 4 primary partitions. In Linux term there are hda, hdb, hdc and hdd (or sda to sdd for a Sata).
Saikee your thinking physical disks on the cable not partitions there.

partitions in Linux are numbered like so

/dev/hda1
/dev/hda2
/dev/hda3
/dev/hda4

these would be the 4 primary partitions on the first disk in the system.
 
Old 05-10-2007, 06:21 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
exvor,

You are right. I meant hda1 to hda4. I must be thinking XP can be installed in any of the 4 IDE channels. In one computer I have the 5th Windows, a win2k, in the 5th disk sdb after hda, hdc, hdd and sda. Think age has finally caught up with me.
 
Old 05-10-2007, 06:50 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,500

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Quote:
Originally Posted by saikee
... there had been a big advance recently in Linux's ability to resize NTFS partitions.
Yeah, resizing I don't have an issue with - even bootable NTFS. Physically moving somewhere else I do; I've just never had a successful outcome with a bootable NTFS partition.
Every one of these tools use ntfsprogs - and as I posted above, even the folks that wrote the code advise against moving NTFS around. Maybe I'll have a play over the weekend - I've been looking for a reason to try out the latest gparted/clonezilla combined liveCD.
 
Old 05-11-2007, 10:39 PM   #13
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Well
For the record, and to answer the posters question. Because of my boot manager 'bootitng'. I can make an image of any OS including Windows and put the image in a new partition anywhere on the drive in as many partitions as I want (up to 254 primary partitions on the same drive) all at the same time and boot any one of them without editing any files except my boot manager's menu to add the new installation.
If the poster were to refer to "ancient" traditional partition schemes (4 primary partitions, 1 extended and a few logicals), this post would not apply.

Which means "YES", it can be done without problems.
 
Old 05-12-2007, 04:32 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Junior Hacker,

We know you have a commercial software that does thing like a virtual machine giving you a complete freedom to install into any of 256 partitions.

Our ancient way is using the standard functions as provided by Linux.

If you use VMware you don't even need to worry about booting because you boot to one host and all other OSs are guests operating as files inside the host.

Your commecial software will appear ancient by the Virtual machine standard where booting beyond the host is unnecessary.

If a user has a good understanding of the basics of how a hard disk works he/she has a better chance to know the difference of all these various alternatives and management layers. Such knowledge is vital even it may be ancient to some.

You can drive a car with an automatic shift but it still needs a gear box mechanically. You simply have a management layer we call the torque convertor.
 
Old 05-12-2007, 11:21 PM   #15
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,496

Rep: Reputation: 68
How do you make that many primary parttions on a drive? I thought it was limited by the hardware to 4?
 
  


Reply

Tags
move, ntfs, ntfsresize, resize, windows, winxp


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
LXer: Linux Distributor Interactive Ideas To Deliver Xandros' End-to-End Windows Alternatives To UK LXer Syndicated Linux News 0 09-16-2006 01:33 PM
I have quite a few badblocks at the end of the disk. Is it OK? kornerr Linux - General 1 08-12-2005 02:46 PM
Partition begins after end-of-disk cornleader Linux - Hardware 3 04-15-2005 10:45 AM
Partition ends after end-of-disk. lhto Linux - Hardware 1 06-19-2004 08:20 AM
Ran out of disk space at the end of chapter 6!! DarkDrive Linux From Scratch 4 08-22-2003 05:15 AM


All times are GMT -5. The time now is 03:10 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration