On Thursday 30 July 2009 17:45:30 Grant wrote:
> >> Sounds good.  Will commenting the swap line out of /etc/fstab and
> >> rebooting disable swap?
> >
> > Yes. Or, temporarily,  the 'swapoff' command.
> >
> >> In order to resize the root partition to
> >> include the swap paritition, I'll have to boot to LiveCD right?
> >
> > I think it might work without. If you have hda1=boot, hda2=root,
> > hda3=swap, you could delete hda3 and hda2 with [c]fdisk and make hda2 the
> > size of hda2+hda3, then use resize2fs to increase the size of hda2.
> > Increasing a file system's size works online nowadays. I don't think it
> > would work with hda2=swap and hda3=root, but I'm not sure.
>
> Thanks everyone.
>
> I have sda1=boot, sda2=swap, sda3=root.  Does anyone know if I'm
> required to use a LiveCD in this case?

Not only do you need a LiveCD, you need a backup and restore of your root 
partition. If you try and resize it from the front, you WILL LOSE THE 
FILESYSTEM ON IT.

Do this:

1. Backup /
2. Delete sda2 and sda3
3. Create a new sda2 the full size of the old sda2 and sda3 combined
4. Reorder partition table in fdsisk.
5. Fix entries in fstab from sda3 and higher.
6. REBOOT into LiveCD (or run partprobe if you aware of the effects)
7. mkfs sda2
8. Restore /
9. Reboot into main system

-- 
alan dot mckinnon at gmail dot com

Reply via email to