I need to upgrade to Fedora 13 but my boot partition is too small (200 MB) and it needs to be at least 500 MB. The boot partition is followed by an LVM volume goup composed of a 145 GB root LV and a 5GB swap LV. How can I 'safely' decrease the size of the volume group and increase the size of the physical boot partition?
Thanks in advance.
- Tod
On Sat, 11 Sep 2010, Tod Thomas wrote:
I need to upgrade to Fedora 13 but my boot partition is too small (200 MB) and it needs to be at least 500 MB. The boot partition is followed by an LVM volume goup composed of a 145 GB root LV and a 5GB swap LV. How can I 'safely' decrease the size of the volume group and increase the size of the physical boot partition?
You can resize a physical volume of a volume group with the pvresize command, though this only resizes the contents and you will need to use something like fdisk or parted to resize the partition to match.
However this will free up space at the end of the physical volume partition, and to make the boot partition bigger you probably want to move the start which is rather more tricky.
Michael Young
On Sat, Sep 11, 2010 at 4:31 PM, M A Young m.a.young@durham.ac.uk wrote:
On Sat, 11 Sep 2010, Tod Thomas wrote:
I need to upgrade to Fedora 13 but my boot partition is too small (200 MB) and it needs to be at least 500 MB. The boot partition is followed by an LVM volume goup composed of a 145 GB root LV and a 5GB swap LV. How can I 'safely' decrease the size of the volume group and increase the size of the physical boot partition?
You can resize a physical volume of a volume group with the pvresize command, though this only resizes the contents and you will need to use something like fdisk or parted to resize the partition to match.
However this will free up space at the end of the physical volume partition, and to make the boot partition bigger you probably want to move the start which is rather more tricky.
One earlier list suggestion had been to keep just one kernel in /boot and to change the reserved-blocks-percentage to 0% with tune2fs to get a few more (supposedly enough) MB for pre-upgrade to run.
On Sat, 2010-09-11 at 12:09 -0400, Tod Thomas wrote:
I need to upgrade to Fedora 13 but my boot partition is too small (200 MB) and it needs to be at least 500 MB. The boot partition is followed by an LVM volume goup composed of a 145 GB root LV and a 5GB swap LV. How can I 'safely' decrease the size of the volume group and increase the size of the physical boot partition?
Tod,
Michael Chronenworth posted a simple solution to preupgrade's /boot space problem. He moved install.img (148MB) from /boot to a thumb drive. When anaconda doesn't find it in /boot, it asks for its location. Point anaconda to the thumb drive and the upgrade will proceed without a hitch.
HTH --Doc Savage Fairview Heights, IL
On 09/11/2010 08:52 PM, Robert G. (Doc) Savage wrote:
On Sat, 2010-09-11 at 12:09 -0400, Tod Thomas wrote:
I need to upgrade to Fedora 13 but my boot partition is too small (200 MB) and it needs to be at least 500 MB. The boot partition is followed by an LVM volume goup composed of a 145 GB root LV and a 5GB swap LV. How can I 'safely' decrease the size of the volume group and increase the size of the physical boot partition?
Tod,
Michael Chronenworth posted a simple solution to preupgrade's /boot space problem. He moved install.img (148MB) from /boot to a thumb drive. When anaconda doesn't find it in /boot, it asks for its location. Point anaconda to the thumb drive and the upgrade will proceed without a hitch.
HTH --Doc Savage Fairview Heights, IL
Doc,
This sounds like what I'm looking for. So now for dumb questions.
Is this something I can do when upgrading from a wireless box using yum? If so where in the process does install.img become available to me for copying? Should I just let it run through to the confirmation screen and then say no, perform the copy process, and then yes at confirmation or do the copy before hand?
Also, I'm assuming preupgrade never enters the picture - correct?
Thanks for your patience.
- Tod
On Sun, 2010-09-12 at 15:27 -0400, Tod Thomas wrote:
On 09/11/2010 08:52 PM, Robert G. (Doc) Savage wrote:
Tod,
Michael Chronenworth posted a simple solution to preupgrade's /boot space problem. He moved install.img (148MB) from /boot to a thumb drive. When anaconda doesn't find it in /boot, it asks for its location. Point anaconda to the thumb drive and the upgrade will proceed without a hitch.
HTH --Doc Savage Fairview Heights, IL
Doc,
This sounds like what I'm looking for. So now for dumb questions.
Is this something I can do when upgrading from a wireless box using yum? If so where in the process does install.img become available to me for copying? Should I just let it run through to the confirmation screen and then say no, perform the copy process, and then yes at confirmation or do the copy before hand?
Also, I'm assuming preupgrade never enters the picture - correct?
Thanks for your patience.
Tod,
Just passing along the tip. I've never used the pre-upgrade method myself, preferring to back up my home directory and do a from-scratch install. I can't speak as an authority about its detailed choreography. That said...
As someone else has already suggested, there's at least one fairly obvious step you could take to maximize the available space in /boot before running pre-upgrade: Use 'yum erase ...' to remove any kernels you are no longer using. You really need just the latest one. That should leave you with about 180M in /boot.
If that still isn't enough, face the music, back up your home directory, and do a from-scratch installation. When you do, make sure you set aside 500GB for /boot. (Upgrade demands on /boot, now and in the future, will force you to do this sooner or later.)
It seems to me that after running pre-upgrade, it will probably pause or return you to a prompt where you can mv install.img to that thumb drive. If unsure, a quick check from another terminal window will tell you if it's there.
Do keep a CD #1 handy as a rescue disk in case something goes wrong. Upgrading may be nice & easy, but if that's all you ever do you'll forget how to do a from-scratch installation. That's one skill you never want to lose.
HTH, --Doc
On 09/11/2010 12:09 PM, Tod Thomas wrote:
I need to upgrade to Fedora 13 but my boot partition is too small (200 MB) and it needs to be at least 500 MB. The boot partition is followed by an LVM volume goup composed of a 145 GB root LV and a 5GB swap LV. How can I 'safely' decrease the size of the volume group and increase the size of the physical boot partition?
Thanks in advance.
- Tod
Turns out my hardrive was dying. I had a lot of bad sectors which probably explains my machine locking up in the first place. I decided to replace the bad drive and at the same time migrate of of LVM and go back to traditional disk partitions.
I dd_rescued my entire hard drive because dd couldn't read it 100%, luckily the bad sectors were confined to the boot partition and were unallocated (figured this out via a lot of trial and error). I bought a new hard drive, created four linux partitions (three including swap - /dev/sda1-4), loopback mounted the disk image and dd'ed back all of my original boot partition (sda1), mounted my VG and dd'ed its contents over to sda2, modified grub.conf, fstab, mtab to point to the new partitions, mkswap, and two weeks later life seems to be good.
There are a lot of details I'm not listing, if anyone is interested I'll be happy to write it up. Thanks to all those that helped me out. Now off to FC13...
- Tod