[ale] what should I do when resizing ext4 partition
Ron Frazier (ALE)
atllinuxenthinfo at techstarship.com
Tue Jun 11 10:57:47 EDT 2013
Hi guys,
Thanks for these tips. With all the partition resizing and uuid
changing, I didn't know how radical to get rebuilding the swap
partition. The system is running now, but, if the need arises again,
I'll probably try the commands you listed.
I know it's been mentioned before to some extent, but could you (or
anyone) comment on the virtues of using a swap partition versus using a
swap file. Windows uses a swap file. Years ago I had Ubuntu running
with a swap file using a procedure I found online. When I installed
Mint recently, I set up a swap partition just because it's easier.
These days, I generally set the swap space as 1X RAM on Linux and 2X RAM
on Windows. If I have the money, I try to put 8 GB of RAM in right off
the bat. That gives the system lots of breathing room. The one big
advantage of a swap file, versus a swap partition, is that it's much
easier to expand it later.
Sincerely,
Ron
On 6/11/2013 10:01 AM, Chuck Payne wrote:
> Ron,
>
> I would do as Derek said, just do a mkswap, I have done on systems
> where I dropped the old swap and created a new one that was a bit
> bigger.
>
> Just make do the following
>
> swapoff
>
> del or resize the old swap
>
> mkswap /dev/partition of the swap
>
> swapon
>
> Update fstab if you delete it and created a new one.
>
>
>
> On Tue, Jun 11, 2013 at 9:43 AM, Derek Atkins<warlord at mit.edu> wrote:
>
>> "Ron Frazier (ALE)"<atllinuxenthinfo at techstarship.com> writes:
>>
>>
>>> On the Linux side of the fence, the boot loader was indeed broken. I
>>> used the Ubuntu boot repair disc which rebuilt grub for me. Mint then
>>> booted fine, but the swap partition was not active according to system
>>> monitor. I used gparted to delete and recreate the swap partition,
>>> then rebooted. The swap was still not active. I looked at the
>>> /etc/fstab file and found in the comments that you can use blkid to
>>> read the UUID of each partition. I also found that the UUID was wrong
>>> for both the / partition and the swap. I'm not sure how the system
>>> booted in this case, but I'm not complaining. I changed the UUID for
>>> both entries in the fstab file to the correct number for the / and
>>> swap partitions respectively and rebooted again. This time, the swap
>>> partition was working.
>>>
>> Ah, most likely the was Acronis did it was to actually mkfs new
>> filesystems on the new drive, which generated new UUIDs, instead of
>> doing a 'dd' and then fs-resize. That would explain the UUID changes.
>>
>> As for the swap, depending on what acronis did you might just need to
>> "mkswap" to re-initialize the swap partition. You shouldn't need to
>> erase and recreate the partition..
>>
>> -derek
>>
>> --
>> Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>> Member, MIT Student Information Processing Board (SIPB)
>> URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
>> warlord at MIT.EDU PGP key available
>>
>>
--
(PS - If you email me and don't get a quick response, you might want to
call on the phone. I get about 300 emails per day from alternate energy
mailing lists and such. I don't always see new email messages very quickly.)
Ron Frazier
770-205-9422 (O) Leave a message.
linuxdude AT techstarship.com
Litecoin: LZzAJu9rZEWzALxDhAHnWLRvybVAVgwTh3
Bitcoin: 15s3aLVsxm8EuQvT8gUDw3RWqvuY9hPGUU
More information about the Ale
mailing list