NotebookForums.com › Forums › General Notebook Discussions › Linux & Other OS's › problems emerging grub in gentoo
New Posts  All Forums:Forum Nav:

# problems emerging grub in gentoo

i have a predicament. if you've seen my "how long for stage 1 install" thread, you know i know little about what im doing, and i've had snags. here's the latest:

im trying to emerge grub as my bootloader, and its spitting back a bunch of errors saying that i need to manually mount my boot partition rw. i figured that since i had to restart the computer several times, i must have forgotten to re mount the boot and gentoo partitions. so i:
Code:
mount /dev/hda2 /mnt/gentoo/boot

and it says that mnt/gentoo/boot does not exist. of course i forgot to mount the gentoo bit, so i
Code:
mount /dev/hda4 /mnt/gentoo

and it spits out "must declare filesystem." this doesnt make sense, since i formatted it a while ago. the only way i can think to specify would be to reformat, which would kill the bootstrapping and all of the rest of my wonderful labor. what am i missing? do i need to edit my fstab file or something?

i set the hda2 (boot for linux) and hda1 (windowsXP) both to bootable in fdisk, and i set them both to /boot in fstab
I don't think you can mount two partitions (of any kind) on the same mount point. You need to create another directory: "/WinXP" or "/mnt/gentoo/WinXP" if during install for example, and mount hda1 to that.
but before, when i did it all the first time, it worked. could i just mount xp to /mnt/WinXp, so as to not have windows messin with my gentoo?

EDIT: new problem, I emerged gentoo, but now when i boot linux, i get a bunch of cannot write to file errors that all fly by. i think it's seeing the entire gentoo install as read only, not read-write. im using reiserfs. i tried using emerge --sync, but it couldnt find the rsync. i tried to move on and emerge kde, but it gave me cannot write errors. i did some finangling with my fstab to get grub to emerge, could the problem be in there? or is it deeper than that?

my roomates keep telling me to give up and just do an easy distro like kubuntu (which is awesome, btw)!!
Dang it I got half way through the post and something happened to erase it all...

By the way I am willing to bet you have learned a trick or two since starting this install about how linux and your computer operate? That is the advantage of doing Gentoo as opposed to Ubuntu, though your roomate is right, ubuntu would be much easier.

So I am sorry if this is a little short, ask for clarification if you dont understand any of it, I just really dont feel lilke retyping the entire thing.

For your first problem, check your /etc/fstab The way mount works is first it looks up the mount point or the dev in fstab and sees if their is an entry for it. If there is it uses that information, otherwise you must provide all of it using the appropriate commandline switches(Man mount for these).

If your /etc/fstab is set up correctly have you tried just..

mount /mnt/gentoo

or

mount /dev/hda4

Starcub I believe is right on in his/her assesment. You CAN mount one drive in multiple locations, but I dont believe you can mount 2 drives in the same location. Make a /mnt/WinXP or the like and use that for your windows mountpoint, and no windows wont screw with your gentoo setup, Windows probably will never realise it is there.

IN as far as y our new problem, I would say yes you might be right on the guess it is mounting read only. Post up your /etc/fstab for us? By the way if you get errors like that somewhere in /var/log you will find a series of log files for bootup and the like(Or whatever else youtell to log to there) that you can go through. Learn to love those and grep and pipes(Pipes are invoked on the commandline with the | (Shift-backslash on most keyboards) and cause the output of one program to go into another program, very useful when combined with grep and less).

Quote:
 Originally Posted by tlo i have a predicament. if you've seen my "how long for stage 1 install" thread, you know i know little about what im doing, and i've had snags. here's the latest: im trying to emerge grub as my bootloader, and its spitting back a bunch of errors saying that i need to manually mount my boot partition rw. i figured that since i had to restart the computer several times, i must have forgotten to re mount the boot and gentoo partitions. so i: Code: mount /dev/hda2 /mnt/gentoo/boot  and it says that mnt/gentoo/boot does not exist. of course i forgot to mount the gentoo bit, so i Code: mount /dev/hda4 /mnt/gentoo  and it spits out "must declare filesystem." this doesnt make sense, since i formatted it a while ago. the only way i can think to specify would be to reformat, which would kill the bootstrapping and all of the rest of my wonderful labor. what am i missing? do i need to edit my fstab file or something? i set the hda2 (boot for linux) and hda1 (windowsXP) both to bootable in fdisk, and i set them both to /boot in fstab

from the commands that were posted it looks to be pre-chroot. in the hand book it specifically tells you to mount one then the other. just do a mount -t fstype /source /mount/point. that will tell mount how and where to mount what. Clear as mud?
I love new smilies.
this is the uncommented portion of my fstab:
Code:
/dev/hda1     /WinXP           ext2      noauto,noatime   1 2
/dev/hda2     /Gentoo/boot  ext3       defaults,noatime  1 2
/dev/hda3     /none            swap      sw                     0 0
/dev/hda4    /Gentoo          ReiserFS  noatime              0 1
/dev/cdroms/cdrom0     /mnt/cdrom    auto      noauto,user   0 0

proc            /proc              proc       defaults              0 0

shm            /dev/shm         tmpfs       nodev,nosuid,noexec    0 0

The question I have is it pre chroot while you get these errors? Uhhh I just noticed are you sure that you are mounting /Gentoo not /gentoo case matters.... silly I know but I gotta ask. I've done it a bazillion times.
He's also assigning the wrong filesystem type to his XP mount point. The default IIRC is ntfs, but it's possible to use fat32 as well. My guess is that he's going to have to change "ext2" to "ntfs". FYI, tlo, the Gentoo install guide will save you alot of headaches.
Hmm ok looking at your fstab definitly got me a bit confused and like everyone else here I have to ask, have you chroot'd into your new environment yet?

Someone else brought it up, and I realised I was assuming you were using it, you are reading along in your gentoo handbook arent you?

Anyways the reason I ask about the chroot is your moint point choices indicate a VERY strange setup, namely you are trying to mount your root directory on /Gentoo , However as far as I know this is not possible as you have to have a root directory (aka / ) in order to set up mount points for the rest of your mounts, if that makes any sense. Mind you I could be wrong, but I have certainly never seen it done, and would be willing to bet it would only give you loads of problems later on when compiling and installing things expecting to be installed in /usr and their libs to be installed in /lib and var to be at /var etc. You would have to change every reference to the appropriate directory and mount point if you could do it at all.

So really if you are past your chroot point(Which I think you are from reading your fstab) then you have the problem of you have no root directory( this is the / directory, not the /root directory I am referring to, /root I refer to as your root home directory, or at least try to anyways)

So my suggestions, assuming you are past your chroot point, is to change where you are mounting /dev/hda4, which I am assuming is supposed to be your root directory, and instead of mounting it on /Gentoo, which doesnt exist due to no root directory, change it to / which is your standard anyways. That would also mean you would probably want to change the /Gentoo/boot mount point to just /boot

Add on to that to putting the correct file system on your WinXP mount and I think that will help you out a bit most likely.

the problems i have arent during the install at all, they happen when i reboot into my gentoo environment. i listed xp as ext2 because thats what the handbook said to do. im in xp now and it runs fine, so i guess its ok (although you're right, im really running ntfs, wierd). i had to say /Gentoo instead of / because grub wouldnt emerge with just /but now that i think about it i dont think i had chrooted in before i tried.

question: if i chroot into gentoo, how do i tell fstab to put windows on mnt/winXP, since mnt directory is below gentoo?
Here's my fstab in it's entirety
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp$
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.

# <fs>          \t<mountpoint>    <type>  \t<opts>      \t\t<dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hdd1\t\t/boot\t\text3\t\tnoatime\t\t1 1
/dev/hdd3\t\t/\t\text3\t\tnoatime\t\t\t0 0
/dev/hdd2\t\tnone\t\tswap\t\tsw\t\t\t0 0
#/dev/cdroms/cdrom0\t/mnt/cdrom\tiso9660\t\tnoauto,rw\t\t0 0
#/dev/fd0\t\t/mnt/floppy\tauto\t\tnoauto\t\t\t0 0

# NOTE: The next line is critical for boot!
none\t\t\t/proc\t\tproc\t\tdefaults\t\t0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none\t\t\t/dev/shm\ttmpfs\t\tdefaults\t\t0 0
/dev/hdc                /media/cdrecorder       auto    user,exec,noauto,managed 0 0

maybe that would help
hda1, 6, and 5 are all NTFS stuff.
I have grub in the mbr of hdd and use a .bin file to call it from xp's loader. That way I can pull my secondary drive and still have it function with windows. I don't know if my cdrom even works at this stage I had been playing with some stuff.
When you chroot into gentoo you can edit the fstab with no problem You can use mine as a template if you want.
as to your xp mount try this in your fstab /dev/hda1 /mnt/winxp ntfs deafaults 0 0
Quote:
 Originally Posted by tlo the problems i have arent during the install at all, they happen when i reboot into my gentoo environment. i listed xp as ext2 because thats what the handbook said to do. im in xp now and it runs fine, so i guess its ok (although you're right, im really running ntfs, wierd). i had to say /Gentoo instead of / because grub wouldnt emerge with just /but now that i think about it i dont think i had chrooted in before i tried. question: if i chroot into gentoo, how do i tell fstab to put windows on mnt/winXP, since mnt directory is below gentoo?
I think you lost me a bit there sorry. I dont understand exactly what you are typing.

In as far as the fstab and similar I tihnk you are misunderstanding something.

What is going on in your Linux distro will not affect how Windows runs, unless you mess with sometrhing on the windows partition.

What this means is that even though you have ext2 in your fstab for Windows and windows boots up correctly, doesnt mean that it is correct in Linux. Your windows partition is NTFS, you really should change your fstab to reflect that. Until you do you probably wont be able to mount your windows partition.

Yes you would have to have chrooted into your correct environment in order to emerge grub I believe. So that may be why you had the problems that you had to put the /Gentoo in. Wether or not this can be fixed, or how easily it can be fixed I cant be sure of without being at the computer. But at any rate you can try if you want. Change the mount points to the correct ones of / and /boot , make sure you update this if needed in your menu.lst

So for your Windows parition the mount point I tihnk you want should be /mnt/WinXP just make sure that directory exists and correct your parition FS type in your fstab and it should work I think.

Unfortunatly I am not to sure how much of your compilation may have been effected if you werent chrooted at the correct time. You may have to redo a good portion of your install if things got linked to the wrong library or locations. But unfortunatly I cant tell you exactly how much, sorry.

But at least you are learning some things

If you want and are able I might be able to be open on Wednesday if you want someone to be on IM in case you ahve questions while going through. I cant make a promise cause my schedule changes quite often, but I can at least try. Post back up here if you want to take advantage of it.

Clarification: the errors i got before were not in the liveCD environment, they happened after i tried to boot up without the CD. i came back into the liveCD environment, chrooted to /mnt/gentoo, changed my fstab, and tried to emerge grub again. it says that it can't automatically mount the boot drive, i have to mount it rw (read-write?). a little bit above that is an error message "/proc/mounts: no such file or directory found" or something like that.

if i change the windows thing to ntfs, i don't think that will fix it, although i'll try, just for consistency's sake.
Sending PM after I type this, I may actually be able to help you some Tuesday as well during my work, keep an eye out for me to be logged on, Ill let you know if I cant talk right then. Only thing is tuesday I wont have access to my gentoo box to reference.

Nope changing the windows will not fix it you are correct, that will fix a different error you dont seem to be having yet, or at least havent noticed yet, but will be having when you get to it

Hmm in as far as the cant automatically mount /boot that is a bit odd and I cant come up with a reason for it right off hand, can you mount it manually fine on the command line? Can you do so both with specifying all the parameters, and can you do it with the shortcut of just mount /boot so that it looks it up in /fstab?

For your /proc/mounts my first thing would be to ask if when you chrootd into your /mnt/gentoo off the live cd, did you make sure to mount all of your partitions including your /proc and /dev/shm? My best guess under the circumstances is that you forgot to mount your /proc by hand in your new environment.

yeah, i think thats what happened (the proc). i saw that line later and it didnt look too familiar. im gonna try that next. if that doesnt work, how do i manually mount that boot partition to be read-write? just mount /dev/hda2 /mnt/gentoo/boot?
You will probably have to specify the filesystem type as well by using the -t flag. I cant remember if you will need to use the -o flag to give it options, try it first without and if that doesnt work look thorugh your man mount to see what the options are you need to give it.

thank you all for helping out, i know have a running gentoo environment emerging kde as we speak (no gnome for me). with any luck, soon my windows partition will be relegated to running games off my external drive.
Heh yea sorry I havent been able to get on today, hope things have been goin good for yas.

Have fun, I gotta go outta town for a bit so I wont be able to check in, if ya got problems just gimme time and Ill see what I can do if they are still around by the time I get back

So share the wealth, what was it? Glad you got it working.