Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trouble Installing Gentoo Over XP [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Sun Jul 17, 2005 7:15 pm    Post subject: Reply with quote

As long as you have an x86 arch, whether it's a Pentium, an Athlon-XP or a Pentium4, the kernel image will be compiled into arch/i386/boot/bzImage. Look there and you'll find your kernel.
You should look at grub.conf to check that the kernel name is the same that you gave to your kernel in /boot.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Mon Jul 18, 2005 7:46 pm    Post subject: Reply with quote

HELP ME!!!

I did all that code you listed at the end of page 5, and only that code, and when I rebooted, it gave me this....

Mounting filesystems
mount: Mounting devfs on /dev failed: no such device
Error opening file: ".devfsd" No such file or directory

Determining root device...
Block device /dev/hda3 is not a valid root device...
The root block device is unspecified or not detected
Please specify a device to boot, or "shell" for a shell...
boot() ::

I can't boot into my kernel, please help!
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Tue Jul 19, 2005 1:01 am    Post subject: Reply with quote

Somebody? Anybody? Is there some way I can boot into my old kernel? What would the instructions on page 5 have to do with /dev/hda3?
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Tue Jul 19, 2005 1:20 am    Post subject: Reply with quote

Maheriano wrote:
Somebody? Anybody? Is there some way I can boot into my old kernel? What would the instructions on page 5 have to do with /dev/hda3?


As far as I can see they have little to do. Didn't you told me in another thread that you have SATA disks? The only important point in the end of the previous page is that I told you how to build a kernel by hand, instead of using genkernel. Can you post the contents of /boot/grub/grub.conf? You might still be trying to use an initrd, that you didn't create by following my instructions.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Tue Jul 19, 2005 2:03 am    Post subject: Reply with quote

SATA? No, it's all IDE.
I wasn't building the kernel by hand, I used Genkernel, does that make a difference?
I'll try and post grub.conf, but I don't think it'll let me use nano, I tried to use links and it wouldn't let me. I pretty much can't do anything from that command line. And I didn't do anything but the instructions that you and NeddySeagoon laid out for me. Do you know if it's possible for me to boot into my old kernel, or the new kernel, or if things are looking pretty grim on getting them back? I'll try with the grub.conf in about 4 hours when I get home from work.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Tue Jul 19, 2005 4:25 pm    Post subject: Reply with quote

Maheriano,

grub has a command line editior, much like a simplified nano.
When you get to the boot menu, press the e key
Edit whatever you need to then press the b key to (try) to boot. These changes are not permanent.

Providing your old kernel is still in /boot you can boot it.

You can look inside /boot with the liveCD
Mount your partitions like you did at the original install (no fdisk or making filesystems) then your own /boot
will be at /mnt/gentoo/boot - grub.conf is at /mnt/gentoo/boot/grub/grub.conf.
If you need to, you can continue with the chroot steps. Then your own system will be running on top of the liveCD kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Tue Jul 19, 2005 9:26 pm    Post subject: Reply with quote

Ya, I know all about the e editing at that command line but I didn't think any editing there would help. Is there something you suggest to edit there?

Okay, so I'm going to try and make sure I have this figured out. I put the CD in again, and boot it with "gentoo acpi=off" like before. And then I mount the partitions......you mean like "mount /mnt/gentoo" or whatever? I'll try that, but I think I tried to do that a few pages back and it didn't work without the fdisk. I'll try it though for sure.
And then my boot is at /mnt/gentoo/boot, but how does this help me? What do I type to boot that?
How do I know if I need to continue with the chroot steps? And once I have my system running on the liveCD kernel, how do I get it running on my own kernel?
Sorry I need it dummed down a bit, but I learn pretty quick as you can see.



And I tried to get the contents of grub.conf last night but couldn't use NANO.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Tue Jul 19, 2005 9:39 pm    Post subject: Reply with quote

Hi again.

Yes, you should do exactly what you said about the live-cd and the mounting. To edit the file you don't need to chroot. To run grub again you do have to chroot. To see the contents of /boot/grub/grub.conf you don't need nano as you can do
Code:
# cat /mnt/gentoo/boot/grub/grub.conf

At this point I have to confess you that I've almost forgotten your problem. Could you please briefly remind me of it. What is the exact error that you get when you try to boot? Show us the contents of /boot/grub/grub.conf and /etc/fstab.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Tue Jul 19, 2005 9:46 pm    Post subject: Reply with quote

I'll try and post a summary of everything going on for you in the next post, but I just want to mention in this one that I did "ls" at the root of the directory tree that the shell brings me to and /etc was there but I don't think /boot was. It's wierd because I don't have /home or /mnt or any of those, real bizarre.

see next post....
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Tue Jul 19, 2005 10:10 pm    Post subject: Reply with quote

Maheriano,

Lets start at the beginning, with some explaination that may be missing from the guide. Don't you do this, this is just for your understanding. In a fresh install of Gentoo the first steps are

Use fdisk to partition the disk
Use mkfs to format (make filesystems) on the partitions
Mount the partitions on /mnt/gentoo (root) amd /mnt/gentoo/boot (boot)
Untar your selected tarball
chroot to do the actual install.

fdisk creates and writes the drive partiton table. This makes all the data that was on the disk inaccessable. Its all still there but it can no longer be accessed. Only do that the very first time you use the liveCD.

making filesystems is destructive of your data. It writes the superblock (and copies of the superblock) and the free space table. Its not a lot, but after you have done this some of your data has been overwritten and you would need to be very desperate to attempt recovery. Again, only do that the very first time you use the liveCD.

Mounting your partitions makes the data they contain accessable for reading and writing. When your own system starts, it does this for you every time. When it doesn't start you have to do this step so you can fix it.

Untaring the tarball copies its contents all over the mounted filesystems, your hard drive. It overwrites files of the same name already present. Again, only do that the very first time you use the liveCD. This installs your choosen stage of Gentoo.

The chroot steps do several things. The odds and ends like /proc are mounted, the root of the filesystem is changed to chop of the /mnt/gentoo part, which is exactly as it will be in your own install and then the working enviornment it set so you can continue the install.

If you have understood things this far, you can see that by mounting your filesystems then you can edit grub.conf. From inside the chroot, its at /boot/grub/grub.conf, from outside (before you have done the chroot steps) its at /mnt/gentoo/boot/grub/grub.conf

If grub.conf looks OK, the fault is probably with your kernel, you need to be instade the chroot to fix that.
When you are looking at grub.conf, compare the spelling and captilisation of the kernel file names with that in your /boot (/mnt/gentoo/boot).
You can try adding the token
Code:
udev
to the end of yor kernel line to tell the kernel its to use udev, or
Code:
devfs
if you want it to attempt to use devfs. Try each in turn.

It would be good if you can post your
Code:
ls -l /boot
and the content of grub.conf.
You can put them on a floppy to move to another PC, or even a Windows session on the same PC.
The main point is, if you cannot make the box boot by finding an error in grub.conf and fixing it, the problem is your kernel, so you need to get into the chroot to fix that.


Now you have some understanding of why you need to do what you are doing, mount your partitions, just like you did for the install but skipping the destructive fdisk and mkfs steps.
You can now inspect and correct grub.conf
If that fails, follow the chroot steps and check you have udev, coldplug and hotplug if you do, you probably need to fix you kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Tue Jul 19, 2005 10:15 pm    Post subject: Reply with quote

My computer was working fine with the exception of the sound card. So I did exactly this as you laid out for me....
# cd /usr/src/linux
# make menuconfig
# make && make modules_install
# cp arch/i386/boot/bzImage /boot/kernel-version-gentoo
# cp System.map /boot/System.map-version-gentoo
# cp .config /boot/config-version-gentoo
# nano -w /boot/grub/grub.conf

It all worked fine, no errors. But then I rebooted and it went to the purple grub splash screen and I hit enter to boot. It rolled up all the code on the screen saying it was hotplugging and stuff, but it stopped in the middle with this as the last piece of code it spit out....
Mounting filesystems
mount: Mounting devfs on /dev failed: no such device
Error opening file: ".devfsd" No such file or directory

Determining root device...
Block device /dev/hda3 is not a valid root device...
The root block device is unspecified or not detected
Please specify a device to boot, or "shell" for a shell...
boot() ::


Where it says "boot() ::" is kind of a command line thing where I can type in a root device of my choice so it can try and boot the kernel. But it doesn't like anything I type. So I type "shell" and it brings me to like a dos prompt but like I said in the last post, it doesn't have /boot or /mnt or /home or any of that stuff. It says it's using ASH as a prompt I think. I do have "linuxrc" and "lost+found" and "etc" and "bin" and "sys" and a few others I can't remember. And when I type "help" it gives me some options of commands I can type but there doesn't seem to be much use to what they give me. Ever hear of this? I'd like to just get it back the way it was, I'm guessing I copied my kernel to another directory or something, I have no idea what I'm doing. But I didn't type any commands other than what you laid out above.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Tue Jul 19, 2005 10:30 pm    Post subject: Reply with quote

Maheriano,

Making sound modules should not have broken any of the things you r need for booting.

Are your sure of the exact text of your error ?

The liveCD uses bash for its shell, the same as your installed system. Grub does its own thing. At the grub shell, the kernel is not running and no filesystems are mounted, so grub cannot use bash.

Are you sue the error is not along the lines of ...
fsck failed ... press Ctrl -D to contine or give the root password to repair the system?
That error means that /etc/fstab is incorrect.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Tue Jul 19, 2005 10:34 pm    Post subject: Reply with quote

Ok.

This seems to be an issue with devfs and udev. First thing, boot with the live-cd, mount the partitions and chroot. Go to /usr/src/linux do make menuconfig and go to File Systems -> Pseudo Filesystems and deactivate /dev file system support if it's enabled. In that case, save the config, make the kernel and copy it to /boot.
Then check that you have udev, hotplug and coldplug emerged. If not emerge them.
Code:
# emerge -pv hotplug coldplug udev

Finally, edit /etc/conf.d/rc and check that you have the following
Code:
# Use this variable to control the /dev management behavior.
#  auto   - let the scripts figure out what's best at boot
#  devfs  - use devfs (requires sys-fs/devfsd)
#  udev   - use udev (requires sys-fs/udev)
#  static - let the user manage /dev

RC_DEVICES="auto"

# UDEV OPTION:
# Set to "yes" if you want to save /dev to a tarball on shutdown
# and restore it on startup.  This is useful if you have a lot of
# custom device nodes that udev does not handle/know about.

RC_DEVICE_TARBALL="yes"

As you can read from the comments, you don't want to have RC_DEVICES="devfs". On this system I have auto, on another I have udev. Try it and see what works. Also take the chance and look at /boot/grub/grub.conf and remove any reference to devfs. If you still have an initrd and or ramfs, post the contents so that we can look at it.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Tue Jul 19, 2005 11:33 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Maheriano,

Making sound modules should not have broken any of the things you r need for booting.

Are your sure of the exact text of your error ?

The liveCD uses bash for its shell, the same as your installed system. Grub does its own thing. At the grub shell, the kernel is not running and no filesystems are mounted, so grub cannot use bash.

Are you sue the error is not along the lines of ...
fsck failed ... press Ctrl -D to contine or give the root password to repair the system?
That error means that /etc/fstab is incorrect.


Positive of the error, I copied it out letter by letter. Even down to the amount of dots at the end of the line.
The command line is not using bash, it says it's using ash.
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Wed Jul 20, 2005 12:46 am    Post subject: Reply with quote

jmbsvicetto wrote:
Ok.

This seems to be an issue with devfs and udev. First thing, boot with the live-cd, mount the partitions and chroot. Go to /usr/src/linux do make menuconfig and go to File Systems -> Pseudo Filesystems and deactivate /dev file system support if it's enabled. In that case, save the config, make the kernel and copy it to /boot.
Then check that you have udev, hotplug and coldplug emerged. If not emerge them.
Code:
# emerge -pv hotplug coldplug udev

Finally, edit /etc/conf.d/rc and check that you have the following
Code:
# Use this variable to control the /dev management behavior.
#  auto   - let the scripts figure out what's best at boot
#  devfs  - use devfs (requires sys-fs/devfsd)
#  udev   - use udev (requires sys-fs/udev)
#  static - let the user manage /dev

RC_DEVICES="auto"

# UDEV OPTION:
# Set to "yes" if you want to save /dev to a tarball on shutdown
# and restore it on startup.  This is useful if you have a lot of
# custom device nodes that udev does not handle/know about.

RC_DEVICE_TARBALL="yes"

As you can read from the comments, you don't want to have RC_DEVICES="devfs". On this system I have auto, on another I have udev. Try it and see what works. Also take the chance and look at /boot/grub/grub.conf and remove any reference to devfs. If you still have an initrd and or ramfs, post the contents so that we can look at it.


I'm going to try this tonight and I'll post what happens tomorrow when I get back to work here. I don't actually think I'm working, but I'll have to come in just to use the internet. So you want me to boot from the CD and the first thing I will try is the "mount /mnt/boot /bin/bash" or whatever is in the handbook right? I don't think it will let me do that right away, but I will try. And I know how to make the menuconfig and save it, but how do I make the kernel? Is that in the code in the quote from page 5 that messed up my machine? And the copy to boot is in there as well right? Just wanted to make sure I had everything I needed before I left work tonight because I have no internet access.....though I guess I could get it from the liveCD.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Wed Jul 20, 2005 12:59 am    Post subject: Reply with quote

What you want to do is
Code:

<- after booting mount the partitions and chroot ->
# mount -t filesystem /dev/hda? /mnt/gentoo
# mount -t filesystem /dev/hda? /mnt/gentoo/boot
# mount -t proc proc /mnt/gentoo/proc
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile

<- to configure the kernel, compile it and copy it to boot ->
# cd /usr/src/linux
# make menuconfig
# make && make modules_install
# cp arch/i386/boot/bzImage /boot/kernel-version-gentoo
# cp System.map /boot/System.map-version-gentoo
# cp .config /boot/config-version-gentoo

<- to update grub if you need to ->
# nano -w /boot/grub/grub.conf

Is this clear?
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Wed Jul 20, 2005 1:14 am    Post subject: Reply with quote

Nice, thanks a lot. I don't understand it, but I can sure try typing it and see what happens. Though I'm not sure it iwll let me mount right away, I'm a bit weary of that.
And how do I know if I need to update grub? I'm going to be mounting them all at the same points.
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Wed Jul 20, 2005 1:57 am    Post subject: Reply with quote

Well, you might want to create a new entry in GRUB for the new kernel. You have to make sure the /kernel line has te correct name of the kernel. In case you didn't understood it, the kernel-version-gentoo was just an example - you might choose to have kernel-2.6.12-r4-gentoo, kernel-2.6.11-gentoo or kernel-2.6.12-r4-myown-gentoo. The name has to be relevant only to you - just make sure the entry in GRUB points to the correct file.
I don't see why you would have any problem mounting IDE partitions. Don't forget to replace filesystem with the filesystem of the partition and /dev/hda? by the proper partition.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Wed Jul 20, 2005 2:12 am    Post subject: Reply with quote

Ya I use all the default /dev/hda names the handbook uses so the root will be /dev/hda3 again. And the kernel name is kernel-2.6.12-gentoo-r4 which I'm guessing won't change.
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Wed Jul 20, 2005 6:26 am    Post subject: Reply with quote

It didn't work. It mounted the filesystems which it wasn't doing before, but after that, it gave the same error I posted above about the /dev/hda3. I followed the instructions exactly and they worked, but when I looked in /boot, there was no grub directory. This is really frustrating me, and I don't want to have to reinstall it for the 25th time. I really appreciate you guys helping me out here, but nothing seems to be working.
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Wed Jul 20, 2005 10:26 pm    Post subject: Reply with quote

I have a new one for you. I decided to just reinstall but now I'm having new problems. I did everything right form the beginning with the handbook and when it got to one of the first few points about unzipping the tarball, "tar -xvjpf stage3-*.tar.bz2", and it keeps saying there's no memory left. How do I delete the files from the previous installations so I can reinstall?
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Wed Jul 20, 2005 11:55 pm    Post subject: Reply with quote

Here's the error when I try to save after doing fdisk....
Warning: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

And after downloading the stage tarball, here is the error after typing "tar -xvjpf stage3-*.tar.bz2"...
tar: stage3-*.tar.bz2: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
livecd gentoo #
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jul 21, 2005 12:45 am    Post subject: Reply with quote

Hi.

This would be a lot simpler if I could use StarTrek's energizers and beam you to my porch or living room! :wink:
Let's try to follow some steps.
1. If you already used fdisk to delete the partitions, start by clearing everything up, restarting the system and starting from a clean system.
2. Don't forget that after creating the partitions, you have to make the filesystems. mkfs.ext2 or mkfs.reiserfs are your friends.
3. Then mount the partitions.
4. Before extracting the tarball, don't forget to cd to /mnt/gentoo.
5. You can see if everything is well after the previous step, by doing df -h. You should be using a small part of /mnt/gentoo and should have the ramfs free.
6. Don't forget to extract the portage snapshot with the -C /mnt/gentoo/usr option.
7. Do the chroot.
8. Follow the guide.
Try to follow this steps. If you can please post us the error so that we can try to help you. Don't reinstall if you have problems. Everytime you do that, we start from scratch!
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Maheriano
l33t
l33t


Joined: 18 Jun 2005
Posts: 623
Location: Calgary, Alberta

PostPosted: Thu Jul 21, 2005 12:52 am    Post subject: Reply with quote

haha ya but I can't do step one - cleaning things up and restarting. No matter if I restart or not, it always gives me the same error when I do the fdisk and tar commands. I don't know how to clean it up, how do I delete everything and start over? I got a complete backup on a second drive. Hopefully when I reinstall it, my sound card will work so it won't be for nothing!
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jul 21, 2005 12:59 am    Post subject: Reply with quote

To clear everything up, run fdisk, delete all partitions and write the partition table. Then restart your system.
When you run fdisk after restarting, post the error message so that we can understand what's going on.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 6 of 7

 
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