Linux server question: /etc/fstab entry

beast

Veteran XX
I have one single partition (hda1, 250gb, ext3) for my whole system. I'm installing debian and have to configure my /etc/fstab file.

What would an ideal line look like?
Something like this?:

/dev/hda1 / ext3 defaults 0 1

I'm mostly concerned about the 'defaults' option. Should I use any other options? Again, this will be my one and only partition.
 
/etc/fstab should be built automatically when you install teh operating system.

why is there only one line? you should have a /boot and a swap entry as well
 
you also might want to look at what the last two entries mean...

/etc/fstab under Linux

your shit *should* look something like this

/dev/hda2 / ext3 defaults 1 1
/dev/hda0 /boot ext3 defaults 1 2
/dev/hda1 swap swap defaults 0 0

defaults are fine unless you need to squeeze every little bit of performance out of your drive. if this is the case, you'll have to read up on system tuning.
 
Damnit.

@Wendel: I'm installing Linux (Debian) by shell command line on a remote server (using debootstrap). This means I have no graphical interface, and this is my first time using Linux. Also, I have to configure some system files manually manually. This is hell. : o

And about the 0 and 1, I know what they mean. Also, I did actually forget to create a swap partition. Is it really necessary? What happens if I don't create one?

Since this is my only partition, I already made sure it was flagged as boot when I used cfdisk to create the partition. Guess it can't hurt to add the /boot entry again. But if you're talking about a separate boot partition..I don't have one.

I guess I'll use defaults.

I don't think I'm gonna use dump=1, since it would dump my whole partition (= my whole system, 250gb).

What a mess. Thanks guys.
 
Damnit.

@Wendel: I'm installing Linux (Debian) by shell command line on a remote server (using debootstrap). This means I have no graphical interface, and this is my first time using Linux. Also, I have to configure some system files manually manually. This is hell. : o

And about the 0 and 1, I know what they mean. Also, I did actually forget to create a swap partition. Is it really necessary? What happens if I don't create one?

Since this is my only partition, I already made sure it was flagged as boot when I used cfdisk to create the partition. Guess it can't hurt to add the /boot entry again. But if you're talking about a separate boot partition..I don't have one.

I guess I'll use defaults.

I don't think I'm gonna use dump=1, since it would dump my whole partition (= my whole system, 250gb).

What a mess. Thanks guys.

Swap partition will help you when you run out of memory, but not only that, it'll let you cache more and your system will run faster.

I'm pretty sure you can run without it though.

I've been running lilo without a boot partition for years and years so you should be fine in that respect.
 
You haven't provided any information on what the machine is to be used for, so I'm not really too sure what to advise at this point, although the first thing I would have suggest is that you use LVM.

I'd also suggest you do go ahead and have a swap partition carved out. Exactly how much swap you should set up, depends on (again) the use of the machine, as well as the amount of memory the machine has.

Ext3 settings involve tradeoffs. Some of them do provide a performance boost. Read this: HowTos/Disk Optimization - CentOS Wiki

Although this is a Centos page, the information is still relevant to your use of an ext3 fs. One setting you probably want to go ahead and use is the "noatime". This stops the FS from updating the "Access Time" any time a file happens to be read. As you can imagine, on a busy server with a lot of files being accessed this is a lot of unnecessary overhead, as there are almost no modern applications that make use of the atime variable. I've turned this setting off on a lot of different servers and never had a problem.
 
Back
Top