LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2009, 03:35 PM   #1
Asinine
Member
 
Registered: Jul 2009
Location: Germany
Distribution: Arch
Posts: 52

Rep: Reputation: 15
Two partitioning questions


Hello. I'm running Ubuntu 9.04 (I envision Uncle Joey everytime I see "jackalope") on my eee pc (full install, not a eee-specific version). I've got two questions regarding partitioning.

The first is more newbish: how do I see if I erroneously set up a swap partition during the installation, and in the case that I have, what can I do (if anything) to 1) remove the partition and 2) set the system up to stop trying to write all over it?

The second is still newbish, but... well, whatever. I've got an external hard drive with some stuff that I want to keep, but I'm currently holed up in a hotel waiting for an available flight, and I'm getting the itch to explore more exciting versions of Linux... so I want to partition the hard drive (safely: without removing my movies/tv shows), and install lots more distros so I can stay up all night playing with them so I can sleep on the flight home [that I'm hopefully going to get] tomorrow. And gain knowledge of other distros (preferably less-"easy" versions).

Plus, I'm quite sure once I get to my destination, the in-laws/relatives will bore me enough to keep wanting to play with new distros hehe.

Another thing, fdisk -l doesn't seem to work...
but
fdisk -v = fdisk (util-linux-ng 2.14.2)

Thanks in advance.

Last edited by Asinine; 07-12-2009 at 03:36 PM. Reason: typo
 
Old 07-12-2009, 04:47 PM   #2
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
First I do not recommend repartitioning any hd without backing up all the data you want to save. It will be hard to give you any futhere advice with out knowing your current partitioning.

Try 'sudo fdisk -l' and see if it will not work. (without the quotes)

Last edited by Larry Webb; 07-12-2009 at 04:49 PM.
 
Old 07-12-2009, 04:57 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
I'm not quite sure about Ubuntu, but normally you'd need to be root to do this kind of thing, so you should try with sudo.

Having said that,
Code:
swapon -s
seems like the way to go if you want to know about your swap partition (still normally needs to be root, so sudo again, I suspect).
 
Old 07-12-2009, 05:01 PM   #4
Asinine
Member
 
Registered: Jul 2009
Location: Germany
Distribution: Arch
Posts: 52

Original Poster
Rep: Reputation: 15
The sudo worked.
This is my onboard SD status
Code:
Disk /dev/sda: 4034 MB, 4034838528 bytes
255 heads, 63 sectors/track, 490 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb698b698

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         462     3710983+  83  Linux
/dev/sda2             463         490      224910    5  Extended
/dev/sda5             463         490      224878+  82  Linux swap / Solaris
I know that partitioning something is always risky. But I also know that it's possible to partition without losing all data. (Did it on my first dual boot with windows and red hat 5.2. Have no recollection of how it happened though.)
Honestly, I'd really appreciate the data on the usb hard drive, but it's all from dvds back at home. So if I actually lost the data, it just means I have nothing to watch while stateside.

So, I'm willing to chance it, if it means I'm going to retain hours of fun (as well as information and knowledge). But note I say "chance it", not "outright format the drive".

Can I get rid of that swap file safely? Or just turn it off? (Or did I miss something?) I just "swapoff" with sudo, and now it doesn't show up in swapon, but it's still there in fdisk naturally.

Last edited by Asinine; 07-12-2009 at 05:08 PM. Reason: swapon info
 
Old 07-12-2009, 07:11 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by Asinine View Post
The first is more newbish: how do I see if I erroneously set up a swap partition during the installation, and in the case that I have, what can I do (if anything) to 1) remove the partition and 2) set the system up to stop trying to write all over it?
If Linux detects a swap partition(s) and decides to "write all over it", you probably need that swap.
What makes you think it's "erroneous", and why do you expect to benefit from removing it ?.

For playing with partitions, I recommend the gparted liveCD.
 
Old 07-12-2009, 07:26 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Check the output of free -m to see whether the swap space is being used and just how much of it. As syg00 says, it would not get used if it wasn't needed. Assuming this to be true, you can still disable/remove it but only at the risk of a severe performance hit.
 
Old 07-13-2009, 01:56 PM   #7
Asinine
Member
 
Registered: Jul 2009
Location: Germany
Distribution: Arch
Posts: 52

Original Poster
Rep: Reputation: 15
I've heard numerous times that swap files aren't good for the sdd memory. That's why I don't want swap files. I also upgraded the ram, so I figure that should relieve some of the pressure of having no swap file partition.

I've disabled the swap with swapoff, but the partition is still there.
 
Old 07-13-2009, 05:50 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
If it doesn't get used it won't matter. Swapoff if only for the duration of the boot - remove the swap entry from fstab. The initscripts will complain, but that's all.
After that you can delete the "disk" partition.

Make sure you don't attempt hibernation that expects a swap though.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitioning questions. Syrabane Linux - Newbie 2 12-15-2008 02:10 PM
Partitioning questions 200mg Linux - Newbie 2 03-27-2008 10:08 AM
Partitioning Questions cdrom600 Linux - General 3 05-13-2007 09:27 PM
Partitioning questions Hampster Mandriva 2 01-12-2005 04:19 AM
partitioning is necessary/okay, but I have a few questions beginnerx Linux - Newbie 2 09-26-2003 06:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration