Remove XP from XP-first Dual-boot?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Remove XP from XP-first Dual-boot?

Postby Tony G on Sun May 25, 2008 12:39 pm

I think I have come to where I no longer need Windows on my computer.8) As I added Mint to a computer that already had XP on it, though, I'm afraid of borking my computer if I start without a roadmap. I have Puppy Linux on a USB key, so I can modify any of my partitions with GParted, am at least somewhat familiar with manually editing GRUB, and I'm happy to burn a new SuperGrub disk, if needed.

Here's a snapshot of my current hard drive state:

Drive.png
Drive.png (52.41 KiB) Viewed 879 times

hda1 is XP;
hda2 is Mint 4 KDE CE;
hda6 is a separate /home;
hda7 is a shared "My Documents" ntfs partition
(I imagine I will move what I need from hda7 to hda6 and then delete hda7).

Your advice is greatly appreciated.

Best regards,

Anthony
"The greatest enemy of a good plan is the dream of a perfect plan."

--Carl von Clausewitz
User avatar
Tony G
Level 3
Level 3
 
Posts: 178
Joined: Wed Jan 16, 2008 9:36 pm
Location: Laramie, WY, US

Linux Mint is funded by ads and donations.
 

Re: Remove XP from XP-first Dual-boot?

Postby Fred on Sun May 25, 2008 12:50 pm

Tony,

I am a little under the weather right now, but if you don't get the answers you need in the next couple of days, I'll be happy to help you get it like you want it.

It will be 2 or 3 more days before I can help you though.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Remove XP from XP-first Dual-boot?

Postby Tony G on Sun May 25, 2008 1:36 pm

Tease. :wink:

Take care of yourself, Fred--I'm in no hurry.

Best,

Anthony
"The greatest enemy of a good plan is the dream of a perfect plan."

--Carl von Clausewitz
User avatar
Tony G
Level 3
Level 3
 
Posts: 178
Joined: Wed Jan 16, 2008 9:36 pm
Location: Laramie, WY, US

Re: Remove XP from XP-first Dual-boot?

Postby Lantesh on Sun May 25, 2008 4:19 pm

Ok I know I'm not Fred, but I would like to help if I can. Here would be my plan of attack.

I would format hda1 to ext3 thereby wiping out Windows. It's already a good size at 11.7 gigs to be used for your main / partition for Mint. I would then shrink hda2 down to 1 gig and reformat it as your linux swap file, and expand hda3 three to the left to take over the resulting empty space. Now within hda3 expand hda6 all the way to the left to take up the new free space within hda3. This will increase the size of hda6, but will move the data to the left. After this is complete shrink hda6 down to whatever size you want it to be. You will now be taking away from the right. Keep it large enough that you can copy over anything you need from from hda7, to store temporarily in hda6. You now have some empty space between hda6 and hda7. Delete hda7, and create a new logical ext3 partition (your new storage partition) in it's place taking up all the resulting space. Lastly reinstall Mint to hda1, and designate hda6 as the home partition, being careful not to reformat hda6 in the process. You will have to reinstall your applications, but your settings have been preserved.

Ok after reading through this again to myself I'm thinking you might also want to put the swap inside hda3 as a logical partition, instead of leaving it outside as a primary. I suppose it really doesn't matter. The important thing is that you have it as far left as possible which is right next to to your Mint install. Your old setup had it all the way to the right, which is the inside and therefore the slowest part of the hard disk...not where you want your swap to be.
Lantesh
Level 6
Level 6
 
Posts: 1219
Joined: Sat Apr 12, 2008 1:02 pm

Re: Remove XP from XP-first Dual-boot?

Postby Tony G on Sun May 25, 2008 4:56 pm

Lantesh, thanks for the answer, even if you're not Fred.:) As it's just now Spring in Wyoming, I'm going to pour some concrete today to try and fix a drainage issue with my house, but will review your post in depth later this long weekend.

Interesting about the swap. It ended up there with the default installation settings, but I will move it as part of this whole operation.

Wouldn't another side-effect of my having XP on hda1 / having used default install options be that my MBR is on hda1, which I'll be formatting?

Thanks,

Anthony
"The greatest enemy of a good plan is the dream of a perfect plan."

--Carl von Clausewitz
User avatar
Tony G
Level 3
Level 3
 
Posts: 178
Joined: Wed Jan 16, 2008 9:36 pm
Location: Laramie, WY, US

Re: Remove XP from XP-first Dual-boot?

Postby MagnusB on Sun May 25, 2008 5:04 pm

I might be mistaken, but isn't it hard to move "space" from a primary partition into a logical partition? It could be best to just backup the data you really need and create a new partition table, but I might be mistaken. And if Fred gets a chance to reply, he'll probably tell me on how many points I am wrong, after all, he is the resident partition expert ;)
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Remove XP from XP-first Dual-boot?

Postby Lantesh on Mon May 26, 2008 2:07 am

Tony G wrote:Lantesh, thanks for the answer, even if you're not Fred.:)
Wouldn't another side-effect of my having XP on hda1 / having used default install options be that my MBR is on hda1, which I'll be formatting?


Your welcome. 8)

That doesn't matter because when you reinstall Mint to hda1 it will rewrite the MBR.
Lantesh
Level 6
Level 6
 
Posts: 1219
Joined: Sat Apr 12, 2008 1:02 pm

Re: Remove XP from XP-first Dual-boot?

Postby Tony G on Sat Jun 07, 2008 5:03 pm

Today I popped in a copy of GPartEd and deleted my Windows partition.:D While I was there, I decided to delete the linux-swap at the end (/dev/hda5), and add a new swap at the beginning (now /dev/hda1). I then moved /dev/hda2 (Mint's root) to the left. So, now my drive looks like this:

Drive1.png
Drive1.png (74.99 KiB) Viewed 743 times
Although I had a copy of SuperGRUB disk handy, Mint booted up just fine. I then commented out Windows from my /boot/grub/menu.lst and my /etc/fstab. However, I can't help but notice that my deletion of the swap at /dev/hda5 led to my /dev/hda6 being rechristened /dev/hda5, and likewise with my former /dev/hda7 (which still has as its mount point /media/hda7). (Edit2: Also, given that my new swap doesn't have a lock in front of it, I surmise I'm currently not using the swap.) What do I need to do at this point to nip the problems I doubtless have created in the bud?

Thanks in advance,

Anthony

Edit1: I looked more closely at my /etc/fstab, and realized that it's messy beyond my current understanding, so I post it below:

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/hda2 :
UUID=8b99549b-51f9-4110-8002-e948d0e3da67 / ext3 defaults,errors=remount-ro 0 1

# Entry for /dev/hda5 (formerly hda6):
UUID=af8f4195-36e8-4a8e-a128-f89190109b3b /home ext3 defaults 0 2

# Entry for /dev/hda1 :
## Commented out because I formatted Windows
#UUID=5A18A76D18A746BB /media/hda1 ntfs-3g defaults,locale=en_US.UTF-8 0 1

# Entry for /dev/hda7 :
UUID=21096D840F19FC7C /media/hda7 ntfs-3g defaults,locale=en_US.UTF-8 0 1

# Entry for /dev/hda1(?) formerly /dev/hda5 :
# UUID=ed801a2f-7258-496f-ab08-46a9494aa9a4
UUID=44924ee6-a8cc-41f4-a4cd-7546b10da4ef none swap sw 0 0

# Entry for CD-RW
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto,exec 0 0

## Entry to add USB support to VirtualBox
none /proc/bus/usb usbfs devgid=46,devmode=664 0 0
"The greatest enemy of a good plan is the dream of a perfect plan."

--Carl von Clausewitz
User avatar
Tony G
Level 3
Level 3
 
Posts: 178
Joined: Wed Jan 16, 2008 9:36 pm
Location: Laramie, WY, US

Re: Remove XP from XP-first Dual-boot?

Postby Tony G on Sat Jun 07, 2008 9:10 pm

OK, I figured out how to get my new swap recognized:

Query its UUID with
Code: Select all
sudo vol_id -u /dev/hda1
(hda1 should be changed to whatever the disk volume is that one wants to query), and then edit the swap file in /etc/fstab to match the right UUID.

However, the UUID for my NTFS data partition matches what's already in my fstab, but if I change the fstab entry (UUID=21096D840F19FC7C /media/hda7 ntfs-3g defaults,locale=en_US.UTF-8 0 1) (emphasis added) to /media/hda6, Mint no longer "sees" it. As Mint sees it with the original fstab entry, do I just leave it alone, with Mint recognizing hda6 as /media/hda7, or is there something I ought to fix (with your kind help)?

Thanks in advance,

Anthony
"The greatest enemy of a good plan is the dream of a perfect plan."

--Carl von Clausewitz
User avatar
Tony G
Level 3
Level 3
 
Posts: 178
Joined: Wed Jan 16, 2008 9:36 pm
Location: Laramie, WY, US

Re: Remove XP from XP-first Dual-boot?

Postby Lantesh on Sat Jun 07, 2008 9:19 pm

Anthony,

Well you need to get your swap info added back in. Here is what mine looks like. Obviously your swap's UUID, and location will be different.

Code: Select all
# /dev/sdb5
UUID=93997bf5-dbf7-463e-8c86-803c9b04b493 none            swap    sw              0       0


You will need to look up what all your UUID's have changed to, and correct all of your entries to reflect the new ones. Type this command in terminal to get them.

Code: Select all
ls -l /dev/disk/by-uuid


Good luck, and let me know if I can be of more assistance.
Lantesh
Level 6
Level 6
 
Posts: 1219
Joined: Sat Apr 12, 2008 1:02 pm

Re: Remove XP from XP-first Dual-boot?

Postby Tony G on Sat Jun 07, 2008 9:28 pm

Thanks again, Lantesh. We must have cross-posted--I figured out how to get the swap recognized, though with a different command ("A million roads lead to Dublin.") (Yours is swifter, though, as it queries all UUIDs at once). Should I care that my NTFS data partition /dev/hda6 (formerly hda7) is only recognized when I leave it as /media/hda7 in fstab? (See my post above yours for clarification, if needed).

Best regards,

Anthony
"The greatest enemy of a good plan is the dream of a perfect plan."

--Carl von Clausewitz
User avatar
Tony G
Level 3
Level 3
 
Posts: 178
Joined: Wed Jan 16, 2008 9:36 pm
Location: Laramie, WY, US

Re: Remove XP from XP-first Dual-boot?

Postby Lantesh on Sun Jun 08, 2008 12:16 am

Tony G wrote:Should I care that my NTFS data partition /dev/hda6 (formerly hda7) is only recognized when I leave it as /media/hda7 in fstab?


I don't know what to make of that one. That's very odd. We need Fred for this. Unfortunately he is recovering from an injury right now. I guess hang in there, and hit him up with this question after he gets back on his feet.
Lantesh
Level 6
Level 6
 
Posts: 1219
Joined: Sat Apr 12, 2008 1:02 pm

Re: Remove XP from XP-first Dual-boot?

Postby Fred on Sun Jun 08, 2008 1:33 am

What you are seeing here is a name collision. The very thing that UUIDs were suppose to avoid. Unfortunately the UUID of an NTFS file system is not a unique character string. You can get the same UUID from two different NTFS partitions.

There are two ways to solve this problem. Use the legacy notation, ie. /dev/sdxx or use a partition label. I would suggest the label as the best alternative. You should have "ntfsprogs" already installed on your system. If not do so by typing in a terminal:

sudo aptitude install ntfsprogs

To assign a NTFS label, type in a terminal:

sudo ntfslabel /dev/sdxx newlabel

In you fstab change the UUID=some string to LABEL=Newlabel

That should fix the problem of fstab not knowing where the NTFS partition is.


You can change all your partitions over to label if you wish. Then you can say good-bye to UUID hell. :-)

For an ext3 partition:

sudo e2label /dev/sdxx NewName

If NewName is left off, the command displays the current LABEL


For your swap partition you can set a label using mkswap,
but you need to turn swap off first:

sudo swapoff -a
sudo mkswap -L NewName /dev/sdxx
sudo swapon -a

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Remove XP from XP-first Dual-boot?

Postby Lantesh on Sun Jun 08, 2008 1:43 am

Fred to the rescue. I hope you are feeling better. I didn't even think to tell Anthony about naming collisions, although you mentioned them to me once before. Hell I've even taken your advice and have all my storage partitions mounted using Labels, although some of my other partitions are still using UUIDs.
Lantesh
Level 6
Level 6
 
Posts: 1219
Joined: Sat Apr 12, 2008 1:02 pm

Re: Remove XP from XP-first Dual-boot?

Postby Tony G on Sun Jun 08, 2008 2:12 am

Thanks Fred. Sorry to be a bother. Hope you feel better.

I think I understand what I ought to do from here (and will post back if not). I'm curious, though, as to what happened and why my computer still works.

Here's what I do understand: When I deleted Windows from my hda1 and then deleted swap from my hda5 and created a new swap at hda1, this had a few effects--my new swap had a new uuid that needed to be accounted for, and when accounted for, all's well; since I deleted hda5, hda6 (/home) was "promoted" to hda5; likewise, hda7 (NTFS shared) to hda6.

Since /home is ext3 and its uuid didn't change, its change from hda6 to 5 was dealt with easily. What I don't get is how/why hda6 (NTFS, formerly hda7) works when I leave fstab alone (although it mounts as /media/hda7), but if I try to change fstab to make it /media/hda6, it becomes invisible to the file managers.

First question: Is there any risk to my system if I simply leave things alone and let /dev/hda6 mount as /media/hda7?

Second (and what's really of interst to me): How on earth is is that my computer recognizes the NTFS partition when I let it "imagine" that hda6 is still hda7, but not if I tell it that hda6 is in fact hda6? This seems totally counter-intuitive, although I'm happy to lay that at the feet of it being NTFS.

Sorry to go on about this, it's just interesting to me because I have no idea what's really happening.

Best,

Anthony

#Edit. A little more reading of the forums, and I think getting my ntfs partition recognized under its "true" name may just be a question of my failing to
Code: Select all
sudo mkdir /media/hda6
and reboot. Yep, there it is. But correcting it made my VirtualBox XP unusable, so I'll revert.
"The greatest enemy of a good plan is the dream of a perfect plan."

--Carl von Clausewitz
User avatar
Tony G
Level 3
Level 3
 
Posts: 178
Joined: Wed Jan 16, 2008 9:36 pm
Location: Laramie, WY, US

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: Neil Edmond and 19 guests