Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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!)
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.
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.
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).
root@slax:~# cat /mnt/sda1/boot.ini
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
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.
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.
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.
... 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.
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.
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.