CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  Resizing CentOS boot partition, dual-booting

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  mytwocentos
      mytwocentos
Resizing CentOS boot partition, dual-booting
#1
Newbie
Joined: 2009/6/9
From
Posts: 9
I have a laptop that came with Windows Vista (64-bit) installed. I created a new partition and installed XP (also 64-bit) alongside it.

Last night I shrunk my XP partition and created another new partition and installed Linux (CentOS 64-bit) on it. I made an error in judgment and didn't allocate enough space, so I need about 10 more gigs for the Linux partition. It boots up and runs, but I need about 10 more gigs of storage for the files I want to keep on the partition (and yes, they have to be on the partition, I definitely need to know how to do this, not a workaround)

I went into Vista and shrunk the XP partition by 10 gigs, so now I have 10 gigs of free, non-partitioned space.

As it stands, when I start up the computer I get the GRUB boot loader. I can boot my Linux install or choose "Other" and be taken to the Vista boot loader. From there I can choose XP or Vista to boot.

So, my question is... what is the best way to append the 10 gigs of free space to the Linux partition? Is this something I should do inside of Linux? I have the option to do it in Vista, but the partition shows up as "healthy" but without a file system type.

I just don't want to screw up the boot loader, partitions or anything else.

This isn't my area of expertise, so if anyone could give me a good suggestion or solid answer, that would be great! Thanks!

It's CentOS 5.3 and the partition I need to resize is the partition with the CentOS installation and boot loader.
Posted on: 2009/6/9 20:23
Create PDF from Post Print
Top
  •  Jack-Burton
      Jack-Burton
Re: Resizing CentOS boot partition, dual-booting
#2
Peeking in the Member Window
Joined: 2009/4/18
From
Posts: 22
Quote:

mytwocentos wrote:
I have a laptop that came with Windows Vista (64-bit) installed. I created a new partition and installed XP (also 64-bit) alongside it.

Last night I shrunk my XP partition and created another new partition and installed Linux (CentOS 64-bit) on it. I made an error in judgment and didn't allocate enough space, so I need about 10 more gigs for the Linux partition. It boots up and runs, but I need about 10 more gigs of storage for the files I want to keep on the partition (and yes, they have to be on the partition, I definitely need to know how to do this, not a workaround)

I went into Vista and shrunk the XP partition by 10 gigs, so now I have 10 gigs of free, non-partitioned space.

As it stands, when I start up the computer I get the GRUB boot loader. I can boot my Linux install or choose "Other" and be taken to the Vista boot loader. From there I can choose XP or Vista to boot.

So, my question is... what is the best way to append the 10 gigs of free space to the Linux partition? Is this something I should do inside of Linux? I have the option to do it in Vista, but the partition shows up as "healthy" but without a file system type.

I just don't want to screw up the boot loader, partitions or anything else.

This isn't my area of expertise, so if anyone could give me a good suggestion or solid answer, that would be great! Thanks!

It's CentOS 5.3 and the partition I need to resize is the partition with the CentOS installation and boot loader.


You make no mention of how you did the initial resize, or what program you used.

That said I believe what you want to do is expand your CentOS lvm partition using the spare space you made. The below link should get you sorted.

Expanding a LVM logical volume

Welcome to the CentOS fora.
Posted on: 2009/6/9 20:42
Create PDF from Post Print
Top
  •  mytwocentos
      mytwocentos
Re: Resizing CentOS boot partition, dual-booting
#3
Newbie
Joined: 2009/6/9
From
Posts: 9
Thanks, I was just looking at that. As for my partitions, I just used the built-in Vista partition tools in disk manager. The link you sent me to (and the reason I didn't consider it completely before) says that the instructions are for adding another PHYSICAL volume. Will these instructions work for my unpartitioned free space that is on the same disk?
Posted on: 2009/6/9 20:48
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: Resizing CentOS boot partition, dual-booting
#4
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
The free space needs to be allocated to a partition. I've never messed with a disk partitioned by Vista, but the fact that you've gotten this far indicates that it is possible. Details depend on the current partition layout, but in general you should be able to run "fdisk" as root, create a new partition using the free space, and either create a new ext3 filesystem on it and mount it (easier), or add it to your LVM setup as a new physical volume (PV). If you need additional help, post the output of:
fdisk -l

Note that the LVM Wiki page does not address resizing a root filesystem. That really IMHO needs to be done using a LiveCD or rescue boot, although the new online resizing claims to work on a mounted filesystem I've not been brave enough to try it, and others have reported problems.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/6/9 20:59
Create PDF from Post Print
Top
  •  mytwocentos
      mytwocentos
Re: Resizing CentOS boot partition, dual-booting
#5
Newbie
Joined: 2009/6/9
From
Posts: 9
I might ad that my volume groups are as follows:

VolGroup00 (Physical)
/dev/sda
Partition 6 9.41 GB

VolGroup00 (Logical)
LogVol00 13.59 GB (Root filesystem)
LogVol01 (swap, unmounted)

Uninitialized Entities
/dev/sda
Partition 1 125.92 GB (Vista)
Partition 2 19.53 GB (This says W95 Ext'd (LBA) I don't know what this is, it may be the placeholder for the 19.41 and .09 of Linux they add up to 19.5)
Partition 3 128.91 GB (XP)
Partition 4 12.95 GB (HP Recovery partition)
Partition 5 .09 GB (Linux, .09 GB)
Unpartitioned Space 10.78 GB (free, unpartitioned)


What I want to accomplish here is for the 13.59 GB LogVol00 boot partition to become 23.59 GB using 10 GB from the Unpartitioned Space
Posted on: 2009/6/9 21:06
Create PDF from Post Print
Top
  •  mytwocentos
      mytwocentos
Re: Resizing CentOS boot partition, dual-booting
#6
Newbie
Joined: 2009/6/9
From
Posts: 9
Here is my fdisk -l:

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 16438 132033740 7 HPFS/NTFS
/dev/sda2 16438 18988 20480000 f W95 Ext'd (LBA)
/dev/sda3 18988 35816 135171068 7 HPFS/NTFS
/dev/sda4 37223 38913 13582957+ 7 HPFS/NTFS
/dev/sda5 16439 16450 96390 83 Linux
/dev/sda6 16451 18987 20378421 8e Linux LVM
Posted on: 2009/6/9 21:08
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: Resizing CentOS boot partition, dual-booting
#7
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Looks like our posts crossed in the ether.

Yes, the 2nd partition is an extended partition containing your logical partitions - 5 and higher.
From the info you posted, you've alread added /dev/sda6 as an LVM partition. You should be able to follow the Wiki to add it to the LVM. I'd just do the final resize2fs after booting into rescue mode from the installation media and choosing to skip mounting the disks.

Edit: on a 2nd look I'm a bit confused. Looks like /dev/sda6 is the original LVM partition (which seems inconsistent with the previous post), in which case you need to add another partition of type 8e that will end up as /dev/sda7.
fdisk /dev/sda<enter>
n<enter>
<enter>
<enter>
t<enter>
7<enter>
8e<enter>
w<enter>

SHOULD do it.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/6/9 21:14
Create PDF from Post Print
Top
  •  mytwocentos
      mytwocentos
Re: Resizing CentOS boot partition, dual-booting
#8
Newbie
Joined: 2009/6/9
From
Posts: 9
Whew, ok, I really don't know much about this stuff and I need to be careful with this setup.

First, my mistake on:

VolGroup00 (Physical)
/dev/sda
Partition 6 9.41 GB

Should have been

VolGroup00 (Physical)
/dev/sda
Partition 6 19.41 GB

So, the sda1 through sda6 are partitions with "something on them.

This one:

Unpartitioned Space 10.78 GB (free, unpartitioned)

does not show up in the fdisk -l

It only shows up in the CentOS LVM

If I do the instructions you told me, this will create that partition from the empty space even if it isn't showing up in fdisk but is in Logical Volume Manager?
Posted on: 2009/6/9 21:25
Create PDF from Post Print
Top
  •  mytwocentos
      mytwocentos
Re: Resizing CentOS boot partition, dual-booting
#9
Newbie
Joined: 2009/6/9
From
Posts: 9
A new development. I have tried both gparted and qtparted and neither let me modify the Unpartitioned Space. If I right click and hit "new" in gparted, it tells me that I can only have 4 primary partitions anedd must delete one or create and extended instead, but all of the other options are greyed out, so I have no way to do this.

Any ideas?

I'm not sure what I need to do here to get what I want...
Posted on: 2009/6/9 22:18
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: Resizing CentOS boot partition, dual-booting
#10
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Reread post #7.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/6/9 22:57
Create PDF from Post Print
Top
  •  mcstuffy
      mcstuffy
Re: Resizing CentOS boot partition, dual-booting
#11
Newbie
Joined: 2009/6/10
From
Posts: 3
You can do your job with Gparted. When you repartitioned your disk with VISTA you wound up with three primary partitions since the HP recovery partition was all ready there.
The second resize of VISTA freed space physically between VISTA and the XP partition. Centos recognized that and made an extended partition so you could have both a boot and root partition. Therefore the extended partition is in the middle of the drive.

When you resized the XP partition the unpartitioned space is physically at the end of the XP partition.

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 16438 132033740 7 HPFS/NTFS VISTA
/dev/sda2 16438 18988 20480000 f W95 Ext'd (LBA)
/dev/sda3 18988 35816 135171068 7 HPFS/NTFS XP
/dev/sda4 37223 38913 13582957+ 7 HPFS/NTFS HP recovery
/dev/sda5 16439 16450 96390 83 Linux boot
/dev/sda6 16451 18987 20378421 8e Linux LVM Linux LVM

freespace 35817 37222


With Gparted from a live cd or usb drive you can move the XP PARTITION to make the free space physically adjacent to the extended partition and resize the extended partition to include that space. You can't do it from the LINUX on the hard drive. It will take quite a bit of time. Then you can partition it and add it to your LVM. You may get a message about the partition table entries being out of order but the system can handle that.

Hopefully you made a recovery DVD from your HP system before you started all this as the recovery partition is probably useless with a change in the original disk structure.
Posted on: 2009/6/11 17:49
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com