should not format swap partitions

Bug #40788 reported by Martin Bergner on 2006-04-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)

Bug Description

Espresso should not format swap partitions by default, nor should it touch swap partitions on the system if they are enabled in the system.

Reason: I tried to install xubuntu on my Satellite Pro Notebook with 64 MB of RAM. Since this is not enough, I tried to activate a swap partition on my system. Since that didn't work (dev/resource busy) I suppose the Live CD already did that. Now, I just clicked standardly through the install and decided to let espresso do the partitioning stuff. It did so and deleted & formatted the used swap partition (or tried) -> result: xsession was killed.

I suppose this is a very special situation, but since xubuntu is meant for legacy systems, this case is not really that uncommon.

Martin Bergner (martin-bergner) wrote :

Ok, just to add that comment, the live cd does indeed search for swap partitions, if it is low on memory, so this is really a problem!

Colin Watson (cjwatson) wrote :

I sort of agree, in principle. However, if you try to change the partition table in any way, it is necessary to disable swap for a time in order to persuade the kernel to re-read the partition table; if you leave swap enabled, the partition will be busy and it simply won't work. Given that you have to disable swap it doesn't make much difference to go on and format it as well.

I don't see that the installer has any generally viable alternative here.

Changed in ubiquity:
status: Unconfirmed → Confirmed
Colin Watson (cjwatson) wrote :

If memory restrictions mean that Ubiquity is unlikely to be usable on the sorts of systems that Xubuntu is targetting (which wouldn't surprise me), then perhaps you should be focussing on the traditional installer instead ...

Martin Bergner (martin-bergner) wrote :

Yes, I agree, I thought there might be an alternative like keeping the swap partition as is and just repartition the rest.

And honestly, ubiquity was unusable on that system. So this is really not that important. Maybe a little check that will warn the user if the swap was enabled would be enough.

Colin Watson (cjwatson) wrote :

If the swap partition is busy, then you can't change the partition table *at all* and expect the kernel to notice. (Well, you could change the partition table on a different disk.)

Some hack to try to work out whether enough memory is available might be possible.

From duplicate bug #65018:

I have tried for a while to install different brands of Ubuntu Dapper Drake 6.06 on a 400 MHz iMac DV with 128 Mb RAM. I finally got it right but it was not out of the box. One problem was that the installer turned of the swap once I fugured out that one was needed to be able to install at all.

Workaround for this problem could be 'cp /bin/true /sbin/swapoff'
I think that the live cd has to consider the following:

- If no swap is present on lowmemory machines create (a temporary?) one before entering X, otherwise the system will be hogged by decompressing pages from the squashfs on the CD and freeze doing this.

- The installer should not do a swapoff but also be able to resuse the swap partition and even not consider to initialize the swap if it is used already.

My workaround resulted in creating a new swap so now I have two.

Phillip Susi (psusi) wrote :

"If the swap partition is busy, then you can't change the partition table *at all* and expect the kernel to notice. (Well, you could change the partition table on a different disk.)"

This is no longer the case today; as long as you don't change the swap partition itself, then there's no need to unmount it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers