swap partition disappeared after dist-upgrade
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
swap partition disappeared after dist-upgrade
I just noticed that my swap partition disappeared. (Oddly, after the dist-upgrade, my original partition set of an ext3 partition and a swap partition changed into a single ext4 partition.)
This is sorta scary.
What are my options here? Resizing the ext4 partition and adding a swap partition doesn't appeal to me (resizing any ext-based partition seems scary).
Thanks.
This is sorta scary.
What are my options here? Resizing the ext4 partition and adding a swap partition doesn't appeal to me (resizing any ext-based partition seems scary).
Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: swap partition disappeared after dist-upgrade
Resizing scares me too. You could always do this to add a swap file.
Surf to http://www.cyberciti.biz/faq/linux-add- ... ile-howto/
Hope this helps. I had to do this a while ago, and it works very well.
Cheers
Patrick
Surf to http://www.cyberciti.biz/faq/linux-add- ... ile-howto/
Hope this helps. I had to do this a while ago, and it works very well.
Cheers
Patrick
Re: swap partition disappeared after dist-upgrade
I seemed to have solved it by installing the dphys-swapfile package. It's pretty automatic.
But, I'm still baffled as to why dist-upgrade deleted the swap partition. (Maybe some package desires an ext4 file system initially?) This is especially disconcerting given that I was planning on installing Linux Mint Debian Edition on a dual-boot machine -- I don't want it to wipe out partitions willy-nilly upon its first dist-upgrade.
But, I'm still baffled as to why dist-upgrade deleted the swap partition. (Maybe some package desires an ext4 file system initially?) This is especially disconcerting given that I was planning on installing Linux Mint Debian Edition on a dual-boot machine -- I don't want it to wipe out partitions willy-nilly upon its first dist-upgrade.
Re: swap partition disappeared after dist-upgrade
I could see where possibly a swap partition was no longer recognized due to a uuid change or something like that, possibly... there were some issues along those lines at one point, as I recall. But the partition was still there, it just wasn't labeled correctly so it wasn't mounted or some similar issue. After I installed straight Debian I had to re-label my swap partition and added the new LABEL to the fstab.
But, to have it disappear and have the file system type change? That's very odd... I can't imagine it would do such a thing without some warning. In the 2 years I've been using linux, I've not heard of that happening willy-nilly.
But, to have it disappear and have the file system type change? That's very odd... I can't imagine it would do such a thing without some warning. In the 2 years I've been using linux, I've not heard of that happening willy-nilly.
Re: swap partition disappeared after dist-upgrade
So, if my partition does still exist, how do I find it? I tried sudo parted -l and it just showed a single contiguous partition. See below. Because /etc/fstab had "swap was on /dev/sda2 during installation" in it, I tried looking at /dev/sda2, but it didn't seem to exist.
There was a point during dist-upgrade when grub-pc complained that the UUID of my drive changed. At that point, I agreed to reinstall GRUB since I was afraid of my computer not being able to boot -- that was the only evidence that anything changed.
There was a point during dist-upgrade when grub-pc complained that the UUID of my drive changed. At that point, I agreed to reinstall GRUB since I was afraid of my computer not being able to boot -- that was the only evidence that anything changed.
Code: Select all
% sudo parted -l
Model: ATA SAMSUNG HM250HI (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 250GB 250GB primary ext4
Re: swap partition disappeared after dist-upgrade
From your output, you're right it appears there's no sda2, or 3+. It's possible something like smartmontools (I think that's the name of the package...) would give you more details. Or something like gparted may be able to create new partition space and re-size your current sda1 down. However before you attempt anything like that, of course you'd want to make sure your important data is backed up, and know there's a possibility that you'd have to re-install. That would be your call, of course.
Or someone who's more expert at this sort of thing may have some input, too.
Or someone who's more expert at this sort of thing may have some input, too.
Re: swap partition disappeared after dist-upgrade
What is the output of:
and:
Code: Select all
sudo fdisk -l
Code: Select all
df -v
Re: swap partition disappeared after dist-upgrade
xircon wrote:What is the output of:Code: Select all
sudo fdisk -l
Code: Select all
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00076aa2
Device Boot Start End Blocks Id System
/dev/sda1 1 30337 243673088 83 Linux
xircon wrote:and:Code: Select all
df -v
Code: Select all
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 239847968 45269912 182394404 20% /
tmpfs 508180 0 508180 0% /lib/init/rw
udev 502540 484 502056 1% /dev
tmpfs 508180 0 508180 0% /dev/shm
Re: swap partition disappeared after dist-upgrade
That is really weird! One partition only. Can't see how any update could do this. I wouldn't mess around, I would back-up my home directory, create a list of installed packages, reformat the drive from a live CD, then reinstall, update, upgrade, reinstall packages and finally reinstate my home directory.
Re: swap partition disappeared after dist-upgrade
I agree with xircon. But on the bright side, the upgrade saved you some space, which otherwise would have gone waste if it had been allocated as swap.frankly I see no use for swap on modern machines,by that i mean personal computers and not servers.
Re: swap partition disappeared after dist-upgrade
xircon wrote:That is really weird! One partition only. Can't see how any update could do this. I wouldn't mess around, I would back-up my home directory, create a list of installed packages, reformat the drive from a live CD, then reinstall, update, upgrade, reinstall packages and finally reinstate my home directory.
My machine is working perfectly (with the swap file workaround) and it took me about 20 hours to get everything in its current state. I don't savor the idea of spending another 20 hours to reinstall everything. I'll just use it, do regular back-ups, and let it be.Pranaone wrote:I agree with xircon. But on the bright side, the upgrade saved you some space, which otherwise would have gone waste if it had been allocated as swap.frankly I see no use for swap on modern machines,by that i mean personal computers and not servers.
I'm wondering, 'tho, if I had done things in the wrong order when installing Mint in the first place. I had
- installed,
- restored my package list (via dpkg --set-selections),
- and then upgraded.
- install,
- dist-upgrade,
- and then install one-by-one (or in batches) packages that I had had originally.
Re: swap partition disappeared after dist-upgrade
2000+ packages the best i got to is 1200 before screwing everything up.. Currently running katya rc.. I hope clem would release an updated snapshot of lmde.