1 |
On Thursday 30 July 2009 17:45:30 Grant wrote: |
2 |
> >> Sounds good. Will commenting the swap line out of /etc/fstab and |
3 |
> >> rebooting disable swap? |
4 |
> > |
5 |
> > Yes. Or, temporarily, the 'swapoff' command. |
6 |
> > |
7 |
> >> In order to resize the root partition to |
8 |
> >> include the swap paritition, I'll have to boot to LiveCD right? |
9 |
> > |
10 |
> > I think it might work without. If you have hda1=boot, hda2=root, |
11 |
> > hda3=swap, you could delete hda3 and hda2 with [c]fdisk and make hda2 the |
12 |
> > size of hda2+hda3, then use resize2fs to increase the size of hda2. |
13 |
> > Increasing a file system's size works online nowadays. I don't think it |
14 |
> > would work with hda2=swap and hda3=root, but I'm not sure. |
15 |
> |
16 |
> Thanks everyone. |
17 |
> |
18 |
> I have sda1=boot, sda2=swap, sda3=root. Does anyone know if I'm |
19 |
> required to use a LiveCD in this case? |
20 |
|
21 |
Not only do you need a LiveCD, you need a backup and restore of your root |
22 |
partition. If you try and resize it from the front, you WILL LOSE THE |
23 |
FILESYSTEM ON IT. |
24 |
|
25 |
Do this: |
26 |
|
27 |
1. Backup / |
28 |
2. Delete sda2 and sda3 |
29 |
3. Create a new sda2 the full size of the old sda2 and sda3 combined |
30 |
4. Reorder partition table in fdsisk. |
31 |
5. Fix entries in fstab from sda3 and higher. |
32 |
6. REBOOT into LiveCD (or run partprobe if you aware of the effects) |
33 |
7. mkfs sda2 |
34 |
8. Restore / |
35 |
9. Reboot into main system |
36 |
|
37 |
-- |
38 |
alan dot mckinnon at gmail dot com |