LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-10-2008, 08:31 PM   #1
equazcion
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Rep: Reputation: 0
problem editing fstab


I just installed Ubuntu with no swap partition. I'm now trying to follow the instructions here: https://help.ubuntu.com/community/SwapFaq, to create a swap file.

When it comes time to save changes to etc/fstab, I get an error in the text editor saying that I don't have the right permissions.

I've looked around for an answer but can't find any. I did manage to set a root password, but the Ubuntu GUI doesn't allow me to log in to root.

I'm assuming there's a way to start Ubuntu without the GUI and/or edit fstab using a command prompt, but if someone could tell me how to edit files using the GUI, even when they require root access, I'd really appreciate it.

Thanks!

Last edited by equazcion; 12-10-2008 at 08:33 PM.
 
Old 12-10-2008, 08:36 PM   #2
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Need root access.

Try 'sudo nano /etc/fstab' Can replace nano with your preferred editor.

sudo grants you temporary root privileges.

Last edited by Hern_28; 12-10-2008 at 08:37 PM.
 
Old 12-10-2008, 09:34 PM   #3
TheBigMing
Member
 
Registered: Dec 2008
Location: east anglia
Distribution: SuSE, antiX
Posts: 40

Rep: Reputation: 8
RE: fstab + swap

OK! How new are you? This is fairly complicated stuff - not that complicated; not something that if it's explained properly you can't do; but not totally straightforward.

In Unix, a swap partition is what used to be called, in my middle age, 'virtual memory'. It is a part of the disk where, when the memory becomes overcrowded, stuff can be 'swapped' and recovered later. DesqView used to do this when the core memory of the PC was 64k (OK Smartarse, whoever you are, let's not get into a flame war about this. We're trying to help someone here).

What is your setup? Are you running Linux and Windows together? If you are, what species of Windows are you running? When you installed Linux did you create a Swap Partition (a Swap Partition in Unix has its own format)?

Oce we know this, we will be able to help you.
 
Old 12-10-2008, 10:43 PM   #4
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Swapfile.

I was just guessing he wanted to run ubuntu with a swapfile.
 
Old 12-10-2008, 11:03 PM   #5
equazcion
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Hern_28:

You're correct, that's just what I needed. Thanks

TheBigMing:

I'm extremely new to Linux, but I'm no stranger to PCs. I know all about virtual memory/swap files. I'm dual-booting Windows XP and Ubuntu.

Like I said, I installed Ubuntu with no swap partition, and I'd rather not do any more partitioning. Ubuntu seems to throw an error when I try playing with the partitions (at least during the install) so I needed to boot Windows and use PartitionMagic to create the Linux partition. Rather than having to make more partitions I'd rather just designate a swap file on the root partition, unless there's some reason not to.
 
Old 12-10-2008, 11:47 PM   #6
Loosewheel
LQ Newbie
 
Registered: Jan 2006
Location: Montana
Distribution: PCLinuxOS-2007
Posts: 24

Rep: Reputation: 15
equazcion,
The swap partition is a type 82 file system. Your / partition is probably ext3, I think type 83. I'm guessing you can't make a swap file on your root partition.
The command 'cfdisk' or the application 'gparted' may be what you need to look at.
 
Old 12-10-2008, 11:53 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
He is creating a swap file which the system uses via losetup instead of accessing a real device. It is usually better to let Linux create the partitions. You can use Partition magic to reduce the size of the Windows partition, if you want, but I don't think that an ext3 partition created in Partition magic would have support for extended attributes, quotas or acls.
 
Old 12-11-2008, 12:04 AM   #8
equazcion
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I'd have loved to let Linux do the partitioning, but like I said, it gave me an error. And not a terribly descriptive error, just one of those "there was an error" errors.

I did the partitioning via PartitionMagic, but I did have the Ubuntu installer format the root partition. I chose ext2 (even though it seems now I should've chosen ext3), because I had no idea what I was doing.

Should I reformat the partition as ext3, create another swap partition, and reinstall? Or what else would you guys recommend?

Thanks for all the help, I really appreciate it.

Last edited by equazcion; 12-11-2008 at 12:06 AM.
 
Old 12-11-2008, 12:11 AM   #9
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Reading a post earlier.

Can't find the post i read like 30 mins ago now but apparently theres no real difference in speed anymore so no real reason why a swap file is not any more or less preferable than a partition.

I create them on my old laptop and use them when recompiling openoffice or anything that required more than the 256M swap partition it normally runs with and delete them when I'm done.

Only advice is make it hidden and make sure is somewhere no users can delete (except root of course).

A newbie did his own research and mostly solved his problem himself. I would say Gratz .

Edit: I would play with the system and make any corrections you feel are needed when you need to re-install.

Last edited by Hern_28; 12-11-2008 at 12:14 AM. Reason: Was typing this when you submitted your next.
 
Old 12-11-2008, 09:24 AM   #10
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
This will show you how to edit your fstab from the command line.

http://www.psychocats.net/ubuntu/mountlinux
 
Old 12-11-2008, 11:13 AM   #11
equazcion
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks

Thanks Hern, and everyone else
 
Old 12-11-2008, 11:34 AM   #12
equazcion
LQ Newbie
 
Registered: Dec 2008
Posts: 13

Original Poster
Rep: Reputation: 0
By the way, jschiwal, in answer to your signature:

A while ago I once asked the same question about the abbreviation "no." for "number", since there seems to be no "o" in that word either. It turns out that "no." is actually short for the Latin word, "numero".

So after reading your signature, I looked up the Latin word for "distribution", and sure enough, "dispensatio" is the translation. I'd personally conjecture that "distro" grew out of a simple phonetic shortening of the word "distribution", but now you've got a viable technical explanation as well.
 
Old 12-11-2008, 04:47 PM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Quote:
Originally Posted by equazcion View Post
By the way, jschiwal, in answer to your signature:

A while ago I once asked the same question about the abbreviation "no." for "number", since there seems to be no "o" in that word either. It turns out that "no." is actually short for the Latin word, "numero".

So after reading your signature, I looked up the Latin word for "distribution", and sure enough, "dispensatio" is the translation. I'd personally conjecture that "distro" grew out of a simple phonetic shortening of the word "distribution", but now you've got a viable technical explanation as well.
Thank you. That explains why there even Russian documents will use an `No.' typographical character.

Now I'll have to think up a new signature.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Editing Fstab linda Linux - General 4 09-03-2006 02:59 PM
fstab editing similar Linux - Newbie 4 03-15-2006 06:52 AM
editing the fstab nkoplm Linux - Newbie 1 06-30-2005 03:21 AM
Editing etc/fstab- yet again:-) hitest Slackware 7 04-21-2005 01:50 PM
Editing fstab jodef Yoper 4 11-27-2004 10:06 AM

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

All times are GMT -5. The time now is 11:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration