Ubuntu :: Swap Partition Access / Cant See That Partition
May 21, 2011
I've recently just installed ubuntu 11.04 but seem to have made a big mistake. During the install process I was asked to specify a location to be used for swap. Not really understanding what this meant I chose another partition on my drive with some free space but also a lot of my data. Needless to say I now cant see that partition. Is there anyway for me to access it? or to at least recover the information I need from there? its about a 200gig partition, and it used to be ntfs.
I wanted to delete the Snow Leopard partition and format the Swap Disk partition to something else. exFat was causing major file size bloat on small files. QT sdk bloated to like 11 gigs or something ridiculous like that. Anyways, I loaded up an Ubuntu 10.04 LTS live cd and gparted then deleted the Snow Leopard partition. Gparted said "Mission Accomplished" and tried to rescan the drive, but never found it. At this point I restarted the computer, a dell laptop, which didn't boot with an unable to find a bootable device error. The ubuntu live cd doesn't see the drive anymore. gparted scans for drives indefinitely and fdisk -l has no output.
I was reading another thread about someone with a bad partition table and I decided to join this forum. I'm not going to take any drastic actions with the partition (/dev/sda3) in question. I am going to wait for instructions on what to do first. I am not very good with Linux and need some hand holding. System: DELL 4550 Dual-Booted with XP and Ubuntu. Works OK, just no swap. Well, here's what I did: I deleted a partition for Windows XP Pro because it was a trial, and it ran out. I then decided to slide the swap partition for the Ubuntu Linux that I dual-boot into over. (If this was successful, I was going to try expanding the root partition to take up the unused space.) I used Gparted on a CD to do this, as I figured it was safe to do.
I now cannot mount the swap space at bootup (and have to go into a backup version of the OS), although I can use Gparted in Linux to execute the "swapon" command, and it appears that it worked because I now see "swapoff" as an option on the context menu. (I actually don't even need a swap partition, except to hibernate.) If I highlight the swap partition and click on "Drive" on Gparted's menu bar and select "Create Partition Table", it will erase all data on /dev/sda, so how do I fix the bad partition table non-destructively?
I am having issues with Grub 2 after installing Debian 7.8.0.The computer is a HP Pavilion 500-307nb. I made the original harddrive /dev/sdb and inserted a Samsung Evo 840 as /dev/sda. From the original hard drive (/dev/sdb), I wiped the windows partition, but left all other partitions unchanged (in case I would ever want to recover the desktop to its original state). I replaced the wiped windows partition with a swap partition and an LVM partition.These are my hard drive partitions:
/dev/sda (Samsung Evo 840)
Number Start End Size File system Name Flags 1 1049kB 3146kB 2097kB primary bios_grub 2 3146kB 944MB 941MB ext4 boot 3 944MB 94.4GB 93.4GB host lvm 4 94.4GB 1000GB 906GB guests lvm
The partition /dev/sda3 has 2 logical volumes with filesystem ext4 that I mount to / and /home.The partition /dev/sda2 is mounted to /boot..When I install like this, Debian installs fine, however Grub2 is not installed correctly.Debian installs grub-pc which seems not able to boot the gpt partition. So I boot the Debian CD in rescue mode and execute:
mount /dev/sda2 /boot aptitude purge grub-pc aptitude -y install grub-efi
After rebooting, I come in the grub rescue shell, which says: error: no such device: 986f2176--4a4b-4222-83b9-8636a034b3c7.
When I then enter in the grub rescue shell: set boot=(hd0,gpt2) set prefix=(hd0,gpt2)/grub insmod normal normal
Grub and Debian start up correctly.why can Grub not start up automatically correctly? Where does the UUID 986f2176--4a4b-4222-83b9-8636a034b3c7 come from? I have reinstalled Grub several times, I have reinstall Debian several times, I have even wiped all partitions from /dev/sda and recreated a new gpt table with parted and manually set the partitions in parted. Still on each reinstallation, Grub fails because it cannot find exactly the same UUID. Since this UUID is always the same, it must be stored somewhere, but it cannot be the partitions, I have wiped them and the partition table several times.
I did though a firmware update of the Samsung Evo 840 before reinstallation, could this be a cause?Also the problem is not in grub.cfg. Grub starts correctly if I enter the commands above in the grub rescue screen and the UUID value does not appear there.
I have a brand new thinkpad X301 with 4GB of RAM and thinking of getting fedora 11 on it. The plan is to have it triple boot with vista/seven and hopefully OSx86. I am aware of the 4 primary partitions limit on an MBR disk. I was thinking of having a swap file instead of swap partition and not creating a boot partition as well. If I install the boot loader(GRUB?) on the root partition will I be able to boot it without any problems by using vista's boot loader?
Or Maybe I should install GRUB on the MBR and add all the other operating systems on it? Does anyone have any objections for not creating a swap partition or a boot partition? When comes to desktop environment I've been using KDE in the past, is there any major advantage of using Gnome over it? KDE seems to look really nice on fedora where Gnome is maybe more stable?
My motherboard supports up to 8GB DDR2. I currently have 4GB installed. If I maxed out my RAM, and installed 10.10 without a swap partition, I've heard this would increase speeds significantly. Would it? This particular rig runs multiple servers including an Asterisk PBX with FreePBX, XBMC, and Boxee. XBMC and Boxee do not run at the same time, only one at a time. Would it be safe to run with 8GB ram, and no swap partition? Running FreePBX/asterisk, XBMC, playing videos or ....., and every other background processes, free shows on average 50% free. Opinions?
I am getting a new SSD for my laptop and I have been researching the different tweaks for an SSD. I still have a question regarding the swap partition: is it better to not have one for an SSD? (I have 4GB of RAM...)
If I don't, how would I specify it during the installation process for 10.04?
I recently installed Ubuntu Server, the 8.04LTS release, on my dad's computer which, for the time being, has to dual-act as both a server and a desktop. Will be running solely as a server pretty soon, though. Anyway - since I was down on the budget and the project I put up the server for is still in a development phase and not worth to invest serious money in (at this stage), it has to run on a computer with the following hardware configuration (I left out the non-important parts):
It has 80 or so GBs of disk space, so I went for the low-mem, high-disk scenario and created a swap partition of 1,5 GB. However, I can notice that is rarely even used! I have set the vm.swappiness parameter to 95 but my swap partition is still not being used, even when the memory usage goes up to 90%. I saw it being used once, but only when the needed memory size exceeded 500.
Does anybody know how to force Ubuntu Server to use the swap partition?
I read an article earlier that suggested the swap partition is encrypted by default if you select an encrypted /home folder during installation, is that true (for Lucid)? I am suspecting it isn't because my hibernation works, which I believe shouldn't be the case?
How do fix my Swap Partition? Last night I added unused space to the main Ubuntu partition. Now I noticed the Swap Partition is always at 0 bytes. I'm using a Sony Laptop, and have enclosed two screenshots. One of the Disk Utility and a system monitor.
I have a live/persistent installs of Lubuntu 10.04 on a USB-HDD. It's on a 320 GB portable drive. I've partitioned it so that 80 GB is for the Lubuntu live install and the remaining 240 GB is another partition dedicated to storing stuff. So this USB-HDD is doing double duty. The thing is, I was paying so much attention to making the persistent install work without making a mess of the boot loader (I did that in the past; twice!) that I had overlooked the fact my live install does not have a swap sartition on it. I just assumed (incorrectly) that the swap partition on would just be part and parcel of the installation. Can anyone tell me of a way to add a swap partition to each of my live installs? Without losing any data or anything like that. It's probably not doing any harm not having a swap partition, but I'm assuming that my live install would be that much more efficient with it.
After unsuccessfully trying to install Oracle Express I find that for some reason the swap partition on my server disk does not get used.
My setup: 10.10 server x64 on an intel server with two 500gb HDs in a mirror array
This is puzzling, because I definitely created a swap partition for this system and indeed if I look at /etc/fstab I actually have two swap partitions, one on /dev/mapper/[some long raid name]_ar05 and one on /dev/mapper/cryptswap1, but AFAIK this is normal with 10.10.
"swapon -a" fails with this message:
Code: swapon: /dev/mapper/[raid name]_ar05: read swap header failed: Invalid argument swapon: /dev/mapper/cryptswap1: stat failed: No such file or directory
there's always the option of using a file on the server's filesystem, but I want to see if this can be fixed. I only have remote access to server via SSH, which makes startup troubleshooting pretty impossible.
I have a local server at home also using 10.10 server 64-bit with an encrypted swap file running on a RAID array, but it does not have this problem.
I didn't like the fact that Ubuntu allocated like 5gigs of swap with its automatic partitioning / install. So I decided to shrink it with gparted now it doesn't show up when I boot I have to select swap on in gparted to use it.
Ubuntu has been complaining about swap not being ready during boot. The swap partition was showing up un-known in gparted. I booted off CD, reformatted it to swap. Error message gone but system monitor > resources shows my swap size to be 86GB (the exact size of my shared NTFS volume). gparted shows the swap partition as not 'swapped on'
I am running Ubuntu 11.04 along side Windows 7 (as well as my factory restore partition) and an NTFS shared partition.
My partition structure in order of location on disc. Screen shot below to help. sda1-2 Windows 7 sda4, extended partition --sda6 Ubuntu --sda7 swap --sda5 NTFS shared partition sda3 Factory restore image
Since I tested with suspending/hibernating my laptop, the system seems to have lost the swap partition. That is to say: it cannot find it at boot anymore. Some message shows during boot like "waiting for device listed in fstab: swap" or something and then it continues toboot normally. When I start the systemmonitor it reports Swap usage 0 byte out of 0 byte.
I checked my devices with Code: blkid in terminal and it lists one of the partitions with its UUID as TYPE="swap".
Then I opened fstab with Code: sudo mousepad /etc/fstab and noticed the line for the swap partition was using a completely different UUID. After changing the UUID to the correct (new) one and reactivatin swap with Code: sudo swapon -a in terminal, all was well again but...
How could the UUID suddenly have changed? Did that indeed have something to do with trying (and failing) Suspend and Hibernate ? If so, should I stay away from those features (that served me well under Windows) or is there something to be done about it?
I'm installing a new SSD this upcoming weekend. My thought was to go easy on it so it lasts longer by putting my swap files on a mechanical drive instead of the SSD. I don't - however - want to waste space for swap files. It would be nice if I could use the same 6GB FAT32 partition for swap files for both Windows 7 and Ubuntu. Is this possible? It might not even be necessary though, I have enough RAM that I rarely use the swap file at all (I've even considered going without swap all together), so it probably won't pose a huge load to the drive.
KDE partition manager reports /dev/sda3 is currently type "unknown".I have tried reformatting this partition as linux swap, it says successfully done, but both Kde partition manager and gparted still immedietly report this partition as "unknown" again.
I set my swap partition a bit high and now want to shrink it down and possibly merge it with one of my other partitions. I don't have dual boot, just have a second partition on the drive for data. Can I merge these easily?
I am new to Ubuntu so I am not quite familiar with UNIX commands yet. I would like to know how to find the ID of my swap partition (I am positive the there is one) and what lines to add or change in my FSTAB to activate the swap partition.
I have Ubuntu 10.04 installed. When I run Ubuntu 10.04 LiveCD and I start GParted I see that there is a "key" on my swap partition marking it as locked I guess. When I right click, I cannot select "Delete" option. What does this mean? What if I want to rearange my partitions sizes including swap partition for whatever reason?
I currently have Ubuntu Desktop 10.10 installed and have a great setup. However, I'm trying to install another OS on the hard drive and need to remove a partition. I've read online that I can remove the Swap partition and use a "Swap file". My question is this: Is it possible to replace the Swap partition with a "swap file" without having to re-install linux?
Dual-booting: Mac OS X 10.6.3 / Ubuntu Desktop 10.10 Macbook Pro 6,1 2.8 GHz Intel Core i7, 4 GB RAM
I'm triple booting Windows 7 32-bit (that's the only version I had), Ubuntu 10.10 64-bit, and Backtrack 4 R1.
Windows 7 installed and runs fine. Ubuntu installed and runs fine. I try to install Backtrack 4 R1, create a / partition, create a /boot partition (do I need to create a /boot for Backtrack?), and I don't create a swap file because the Ubuntu swap file is already in there.
I click "forward", the install starts up, then I get "The attempt to mount a file system with type swap...yadda yadda yadda...has failed." I google this, I get some results talking about an mkswap command, but in my noobness, I don't understand.
Can Ubuntu 64 bit and Backtrack not share a swap file? I don't want to create 2 swap files