Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Questions about /etc/fstab
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Thomas Roberts
n00b
n00b


Joined: 20 Oct 2004
Posts: 13

PostPosted: Mon Jun 26, 2006 10:30 pm    Post subject: Questions about /etc/fstab Reply with quote

Here is some background information to get you up-to-date:

I am setting up a dual boot with OS X.
I created the three partitions mentioned in the installation guide

/dev/hda2 (bootstrap)
/dev/hda3 (swap)
/dev/hda4 (root)

I applied the ext3 filesystem to the root and swap partitions, but I did not touch the bootstrap partition thinking it was taken care of automatically. The root partition mounted fine, the swap would not, and I did not bother with the bootstrap.

I am at the point where I am setting up my /etc/fstab and the copy I am modifying has me stumped after looking at it. The <mountpoint> for the boot partition is /boot with <type> ext2, the <mountpoint> for the root partition is / with <type> ext3, and the <mountpoint> for the swap partition is none with <type> swap. The names of the partitions I have are bootstrap, swap, and root so I am not sure how I should continue.

My questions are:
1 - does the bootstrap partition get a filesystem assigned to it? If so, is ext2 recommended?
2 - do I mount the bootstrap partition? If so do I mount it to /mnt/gentoo (before I chroot) like /root gets mounted?
3 - Do I use /boot or /bootstrap for my boot mountpoint?
4 - Do I use / or /root for my root mountpoint?
5 - Do I need to include /dev/hda1 (Apple partition map), /dev/hda5 (OS X partition), /dev/hda6 (Free Space) since Gentoo and OS X do not need to read/write each other's partitions?
Back to top
View user's profile Send private message
dogunderdog
n00b
n00b


Joined: 31 Mar 2004
Posts: 19

PostPosted: Mon Jun 26, 2006 10:36 pm    Post subject: Reply with quote

1. do you mean boot partition? I am not quite sure with you mean with bootstrap.
I guess it is reasonable to use ext2 for the boot partition, even though I am not really sure what the advantage of a boot partition is at all.

2. yes you should mount it to /mnt/gentoo/boot

3. /boot

4. /

5 If you don't use the apple partitions you don't need to mount them in linux, I suppose

PS: I am not quite sure if I understood all your questions correctly, there was some confusion involved.
Back to top
View user's profile Send private message
Valkura
Apprentice
Apprentice


Joined: 27 Feb 2006
Posts: 242
Location: Ramsey, MN

PostPosted: Mon Jun 26, 2006 10:44 pm    Post subject: Reply with quote

I noticed you said you made the swap partition ext3.... they have their own type, the instructions are in the handbook:

http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=4#filesystems

Also, macs don't need a separate boot partition:
http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=4#doc_chap3

Other than that, dogunderdog answered all your questions fine.
_________________
last.fm
SFH, because it's awesome
Back to top
View user's profile Send private message
Thomas Roberts
n00b
n00b


Joined: 20 Oct 2004
Posts: 13

PostPosted: Tue Jun 27, 2006 1:22 am    Post subject: Reply with quote

dogunderdog wrote:
1. do you mean boot partition? I am not quite sure with you mean with bootstrap.
I guess it is reasonable to use ext2 for the boot partition, even though I am not really sure what the advantage of a boot partition is at all.


This is where I got confused myself. Since I am installing Gentoo on my iBook I have to use mac-fdisk to create partitions. The installation guide does not say to create a /boot partition but it does say to select 'b' to create a bootstrap partition, and the name of the partition displayed in the partition map is "bootstrap" which is why I asked if I should use /boot or /bootstrap in /etc/fstab.

My thinking is that since bootstrap is used to boot the system it automatically gets a file system when created, but the copy of /etc/fstab I will be modifying has it's /boot <type> as ext2. Is there a command I can execute to let me know if a partition has a file system assigned to it, and if so, which one is used? I would rather not change it if there is one assigned.
Back to top
View user's profile Send private message
Valkura
Apprentice
Apprentice


Joined: 27 Feb 2006
Posts: 242
Location: Ramsey, MN

PostPosted: Tue Jun 27, 2006 1:37 am    Post subject: Reply with quote

You seem to be installing Gentoo in the x86 way. ppc installs are different, the manual is your friend! It will address the /etc/fstab issue.

About telling whether a partition has a file system on it, I don't think it will mount w/o a fs. If it does, try to create a file there, it should complain at you. If it doesn't, it has a file system.
_________________
last.fm
SFH, because it's awesome
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1353

PostPosted: Tue Jul 04, 2006 6:24 am    Post subject: Reply with quote

Exactly where in the current ppc manual does it give an example of fstab with boot strap in it?
Seems like alot of people including me are having these issues with the combined handbook.
Example
http://www.linuxquestions.org/questions/showthread.php?t=278688
https://forums.gentoo.org/viewtopic-t-457922-highlight-ppc+fstab.html

Quote from http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=8#doc_chap1
Quote:
Creating /etc/fstab
/etc/fstab uses a special syntax. Every line consists of six fields, separated by whitespace (space(s), tabs or a mixture). Each field has its own meaning:
The first field shows the partition described (the path to the device file)
The second field shows the mountpoint at which the partition should be mounted
The third field shows the filesystem used by the partition
The fourth field shows the mountoptions used by mount when it wants to mount the partition. As every filesystem has its own mountoptions, you are encouraged to read the mount man page (man mount) for a full listing. Multiple mountoptions are comma-separated.
The fifth field is used by dump to determine if the partition needs to be dumped or not. You can generally leave this as 0 (zero).
The sixth field is used by fsck to determine the order in which filesystems should be checked if the system wasn't shut down properly. The root filesystem should have 1 while the rest should have 2 (or 0 if a filesystem check isn't necessary).
The default /etc/fstab file provided by Gentoo is not a valid fstab file, so start nano (or your favorite editor) to create your /etc/fstab:
Code Listing 1: Opening /etc/fstab
# nano -w /etc/fstab

Let us take a look at how we write down the options for the /boot partition. This is just an example, so if your architecture doesn't require a /boot partition (such as Apple PPC machines), don't copy it verbatim.
In our default x86 partitioning example /boot is the /dev/hda1 partition, with ext2 as filesystem. It needs to be checked during boot, so we would write down:
Code Listing 2: An example /boot line for /etc/fstab
/dev/hda1 /boot ext2 defaults 1 2

Some users don't want their /boot partition to be mounted automatically to improve their system's security. Those people should substitute defaults with noauto. This does mean that you need to manually mount this partition every time you want to use it.
Now, to improve performance, most users would want to add the noatime option as mountoption, which results in a faster system since access times aren't registered (you don't need those generally anyway):
Code Listing 3: An improved /boot line for /etc/fstab
/dev/hda1 /boot ext2 defaults,noatime 1 2

If we continue with this, we would end up with the following three lines (for /boot, / and the swap partition):
Code Listing 4: Three /etc/fstab lines
/dev/hda1 /boot ext2 defaults,noatime 1 2
/dev/hda2 none swap sw 0 0
/dev/hda3 / ext3 noatime 0 1

To finish up, you should add a rule for /proc, tmpfs (required) and for your CD-ROM drive (and of course, if you have other partitions or drives, for those too):
Code Listing 5: A full /etc/fstab example
/dev/hda1 /boot ext2 defaults,noatime 1 2
/dev/hda2 none swap sw 0 0
/dev/hda3 / ext3 noatime 0 1

none /proc proc defaults 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0

/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0

auto makes mount guess for the filesystem (recommended for removable media as they can be created with one of many filesystems) and user makes it possible for non-root users to mount the CD.
Now use the above example to create your /etc/fstab. If you are a SPARC-user, you should add the following line to your /etc/fstab too:
Code Listing 6: Adding openprom filesystem to /etc/fstab
none /proc/openprom openpromfs defaults 0 0

Double-check your /etc/fstab, save and quit to continue.


All it mentions is that it is the x86 example and not to follow it if you have a ppc.
thats like a pioneer stereo with sony instructions.
EDIT for clarifiaction.
To quote the dev
Quote:
I removed the /boot line because it's useless on ppc

You dont enter a line for apple boot strap
or that partition map usualy peoples hda1 and hda2

I dont think you want to mount the apple bootstrap from the live cd. ybin or yabootconfig write to it.
Helpful info for the currious http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/ch8.en.shtml
(please edit your original post with [solved] if this resolves your problem
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
timotheus25
Apprentice
Apprentice


Joined: 27 Dec 2005
Posts: 162
Location: *upstate* New York, USA

PostPosted: Tue Jul 04, 2006 7:22 am    Post subject: /boot is useful Reply with quote

FYI: you don't want to touch the bootstrap directly.

However, there are advantages to a /boot partition (ideally the first partition past the bootstrap) often overlooked. This is independent of machine type.


  1. system security is increased by a separate filesystem for kernel images, using fstab option of "noauto" or "ro". No script or random rm -rf is likely to kill your system's ability to boot a kernel (although INIT might disappear). No local single-file-access-as-root exploit can touch a kernel image.
  2. system stability is increased, especially if you use an experimental filesystem on / such as reiser4. Keeping ext2 on /boot prevents corruption of the kernel or, more likely, corruption of its entry in the filesystem
  3. all images are guaranteed to reside near to logical front of the drive, with low possibility of fragmentation (not true if you have one big "/")
  4. granularity for automated filesystem dumping/backup


If you're a security nut, or perform dangerous experiments, you really should have a /boot (likely /dev/hda3).
_________________
http://tstotts.net/linux/gentoopb.html
http://tstotts.net/linux/gentooinsp640m.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum