View previous topic :: View next topic |
Author |
Message |
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Thu Sep 09, 2004 9:32 pm Post subject: Adding a Partition from a Downsized XP Partition [SOLVED] |
|
|
question is pretty simple. i have a laptop, 30G, thinkpad x23 with Win XP and Gentoo partitions. Gentoo's now my primary environment, so i'd like to downsize my Win XP partition and devote more space to Gentoo.
my line of thinking was something like this:
1. downsize Win XP using Acronis (it's what i have avail)
2. log in to GNOME, fdisk the new partition and format as ReiserFS
3. add new partition to fstab
and that's about it. but i don't know:
1. if it matters where on the disk (track-wise) the partition is loaded
2. how to tell fstab where to find the new partition
3. what to format it as
any thoughts or guidance? _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Last edited by sog on Sat Sep 25, 2004 4:07 pm; edited 1 time in total |
|
Back to top |
|
|
slycordinator Advocate
Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Thu Sep 09, 2004 9:46 pm Post subject: Re: Adding a Partition from a Downsized XP Partition |
|
|
sog wrote: | question is pretty simple. i have a laptop, 30G, thinkpad x23 with Win XP and Gentoo partitions. Gentoo's now my primary environment, so i'd like to downsize my Win XP partition and devote more space to Gentoo.
my line of thinking was something like this:
1. downsize Win XP using Acronis (it's what i have avail)
2. log in to GNOME, fdisk the new partition and format as ReiserFS
3. add new partition to fstab
and that's about it. but i don't know:
1. if it matters where on the disk (track-wise) the partition is loaded
2. how to tell fstab where to find the new partition
3. what to format it as
any thoughts or guidance? |
Your line of thinking is close to right.
1) All you gotta do is downsize using any tool you want and make sure that it truly did create extra-space.
2) boot up linux.
3) run fdisk on the DISK (not the partition), create a new partition using the freespace, and write the new partition table to disk
4) format the partition using mke2fs (for ext2/3), mkreiserfs (for reiserfs), etc.
and for your questions:
1) When you downsize the XP partition, the free space will be directly next to the old partition. So, it is guarenteed to be there. The problem with this is that this could screw up your partitioning scheme if you are creating a new partition in-between 2 others (changes the numbering). So you'll need to change /etc/fstab to represent the changes.
2) All you have to do is set up a new entry in /etc/fstab for your new partition. Set it up in the same way all the other entries work:
<device location> <mount point> <options> <pass/check>
3) What file system you want to use depends. If you need to work well/quickly with lots of very small files then reiserfs is awesome. If you want it to be rock-solid/tried-and-true then you go with ext2 or ext3. I've also heard xfs is a good "all-around" file system (better on bigger files than reiser). |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Fri Sep 10, 2004 12:02 am Post subject: |
|
|
thx for the feedback slycordinator.
one quick follow up:
Code: |
1) When you downsize the XP partition, the free space will be directly next to the old partition. So, it is guarenteed to be there. The problem with this is that this could screw up your partitioning scheme if you are creating a new partition in-between 2 others (changes the numbering). So you'll need to change /etc/fstab to represent the changes. |
is there any danger to redoing the partition numbers as long as i update my fstab? i don't suppose i can make a partition in the middle of the disk an arbitrary number? _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Sep 10, 2004 12:31 am Post subject: |
|
|
as long as they can find the right mount pounts on the right numbers eg you have done them correctly, then it all should be ok _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Sun Sep 12, 2004 5:24 am Post subject: |
|
|
thanks for all the help. have a problem, however.
so i chopped about 6.5 GB's off my XP partition using acronis. booted back into Windows - it's showing the space as unallocated - same as when i originally set up my Linux partitions.
but when i boot back into Gentoo to fdisk that space, it doesn't show. an fdisk /dev/hda option p gives me the following:
Code: | Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1576 11914528+ 7 HPFS/NTFS
/dev/hda2 2489 2593 793800 1b Hidden W95 FAT32
/dev/hda3 2594 2626 249480 83 Linux
/dev/hda4 2627 3876 9450000 5 Extended
/dev/hda5 2627 3139 3878248+ 82 Linux swap
/dev/hda6 3140 3876 5571688+ 83 Linux |
where's my unallocated space? i can always have acronis format it for me, but would rather do it in fdisk. _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
Psych0 Tux's lil' helper
Joined: 10 Jan 2004 Posts: 127 Location: Carson City, Nevada USA
|
Posted: Sun Sep 12, 2004 6:17 am Post subject: |
|
|
If I remember right the unallocated space don't show up. If you do n (for new partition) if should open a dialog for the start and end points (cylinders or whatever). Taking the defaults should consume tne empty space.
You can use x for expert or extra functionality, then you can renumber the partitione if out of sequence partitions bothers you. It does me.
Finally, boot a rescue disk and correct fstab. Or you could actually do that just before you reboot. _________________ Proud GNU/Linux user 158149 |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Sun Sep 12, 2004 4:40 pm Post subject: |
|
|
no joy. fdisk /dev/hda option n gives me a
Code: | Command (m for help): n
No free sectors available
|
it's not seeing my unallocated space for some reason. anybody know why? _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
slycordinator Advocate
Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Sun Sep 12, 2004 11:26 pm Post subject: |
|
|
The space wasn't allocated correctly obviously. |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Mon Sep 13, 2004 12:51 am Post subject: |
|
|
Code: | The space wasn't allocated correctly obviously. |
ok...any recommendations on a fix? in Win XP it's showing as unallocated. should i just format it over there and hope it shows when i fdisk it under Gentoo? i don't think i can't unllocate it again _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
johngalt Apprentice
Joined: 09 Sep 2004 Posts: 258 Location: 3rd Rock
|
Posted: Mon Sep 13, 2004 1:05 am Post subject: |
|
|
whoa, there, tiger.
Code: |
/dev/hda1 * 1 1576 11914528+ 7 HPFS/NTFS
/dev/hda2 2489 2593 793800 1b Hidden W95 FAT32
|
look at the stopping points and starting points there. there is a gap between sectors 1576 and 2489 - there is your unallocated space.
However, the reason it is unable to access it is that you already have 3 primary partitions and the 4 is the logical extended partition - which by normal conventions should be starting with 5.
According to the parameters of fdisk, it can assign primary to the first 4 partitions and logical 5+ - but somehow you got the logical to start on 4 - leaving you with no spaces ti insert the partition between 1 and 2.
Therein lies the problem.
I recommend that you use the partition manager to move the other partitions around to get that free space inside of the extended block - partition Magic can do this - after you resize the original partition down, you can then move the subsequent partitions around on the drive (and the data contained with them).
I am pretty sure that is where your trouble lies in.
I still wonder how you managed to get an extended partition and make it number 4 instead of 5 - but I haven't used too many other partitions managers other than fdisk for DOS, fdisk in Linux and Partition Magic, so I may have missed that functionality in other managers. _________________
desultory wrote: | If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior. |
Amen. |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Thu Sep 16, 2004 1:52 am Post subject: |
|
|
Code: | I recommend that you use the partition manager to move the other partitions around to get that free space inside of the extended block - partition Magic can do this - after you resize the original partition down, you can then move the subsequent partitions around on the drive (and the data contained with them).
|
thanks much for the insightful feedback.
i'm not sure i'm following here though. should i - in Windows - move the Reiser partition into the unallocated space? i don't think i can move the unallocated space anywhere, as acronis doesn't provide for that. i take it partition magic does? what would happen if i moved HDA6 into the unallocated space, would i then be able to free up space at the end of the partition?
Code: | I still wonder how you managed to get an extended partition and make it number 4 instead of 5 - but I haven't used too many other partitions managers other than fdisk for DOS, fdisk in Linux and Partition Magic, so I may have missed that functionality in other managers. |
i really couldn't tell you, but everything was done in linux with fdisk. the only possible complication was that the gentoo partition replaced a JDS one. and i basically started from scratch.
really need to figure this out as i'm real short on space on the disk now. any and all help appreciated. [/code] _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Thu Sep 16, 2004 3:55 am Post subject: |
|
|
well, i can rule one thing out - formatting the unallocated space in Windows isn't the way to go. i formatted it using Acronis as ReiserFS, and when i tried to boot into Gentoo I got a kernelpanic as it couldn't find the boot partition.
i'm leaning torwards moving the current partitions into the unallocated space, but am unsure how it's going to affect my current setup - will my current config/fstab etc be able to find the partitions if they're still in the same order, but moved up on the disk? _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
baldeante Guru
Joined: 17 Jan 2004 Posts: 498 Location: Caldas da Rainha, Portugal
|
Posted: Thu Sep 16, 2004 6:45 pm Post subject: |
|
|
sog wrote: | well, i can rule one thing out - formatting the unallocated space in Windows isn't the way to go. i formatted it using Acronis as ReiserFS, and when i tried to boot into Gentoo I got a kernelpanic as it couldn't find the boot partition.
i'm leaning torwards moving the current partitions into the unallocated space, but am unsure how it's going to affect my current setup - will my current config/fstab etc be able to find the partitions if they're still in the same order, but moved up on the disk? |
If they apear at fdisk with the same name (hda1, hda2, etc) after you move them it will be ok as far as i know but if the names change after you move your partitions you will need to update your fstab for sure.
I don't think that the names will change after moving the partitions but in your place i would make a note of the names and partitions sizes before moving them just in case you will need to update your fstab. _________________ Never Quit, Never Get Mad, Get Even |
|
Back to top |
|
|
slycordinator Advocate
Joined: 31 Jan 2004 Posts: 3065 Location: Korea
|
Posted: Thu Sep 16, 2004 11:36 pm Post subject: |
|
|
sog wrote: | well, i can rule one thing out - formatting the unallocated space in Windows isn't the way to go. i formatted it using Acronis as ReiserFS, and when i tried to boot into Gentoo I got a kernelpanic as it couldn't find the boot partition.
i'm leaning torwards moving the current partitions into the unallocated space, but am unsure how it's going to affect my current setup - will my current config/fstab etc be able to find the partitions if they're still in the same order, but moved up on the disk? |
You could simply use fdisk, change the partition type to 83 (linux), re-write the partition table, and then use mkreiserfs to format it. Isn't that simpler?
edit: And why move it into the extended? |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Fri Sep 17, 2004 12:07 am Post subject: |
|
|
which partition do you mean? i can't fdisk the unallocated partition b/c it's not displaying - would you have me change the parition type on the XP partition?
or do you mean do that in windows? _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
sog Guru
Joined: 04 Apr 2004 Posts: 356
|
Posted: Sat Sep 25, 2004 4:07 pm Post subject: |
|
|
solved this. here's what i did.
1. moved linux partitions up on the disk into the unallocated space
2. that broke just about everything. see this thread https://forums.gentoo.org/viewtopic.php?t=228119&highlight= for the fix.
3. booted back into windows - unallocated space was now located at the end of the disk, adjacent to my root reiserfs partition
4. using acronis - resized my root partition to encompass the unallocated space
5. result? i have 7 more GB's to play with
thx to amiatrom (in the other thread), the gentoo documentation (for the mount/chroot instructions), slycordinator, Psych0, cokehabit, johngalt, and baldeante for all of their respective help.
very pleased with my newly freed up machine, and couldn't have gotten here w/o the help.
cheers. _________________ ------------------------------------------------
(blog) http://www.redmonk.com/sogrady/ |
|
Back to top |
|
|
|