View previous topic :: View next topic |
Author |
Message |
the_maddin n00b
Joined: 12 Sep 2006 Posts: 39
|
Posted: Tue Sep 12, 2006 7:42 pm Post subject: Should I use menu.lst or grub.conf? |
|
|
My whole gentoo installation is on one partition (/dev/hda12).
The handbook 2006.1 recommends using a file called /boot/grub/grub.conf for the configuration of the bootloader.
I created that file and tried to configure grub the manual way using the grub shell. The commands were: root (hd0,11) and setup (hd0,11). But the last command returned that it couldn't find /boot/grub/menu.lst.
Now I moved the /boot/grub/grub.conf file to /boot/grub/menu.lst and the error is gone!!!!
Why should I use the grub.conf in /boot/grub? And what about the file /etc/grub.conf?
Is that /boot/grub/grub.conf file a relict of older grub versions and not yet changed in the handbook?
Thanks
Maddin |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Tue Sep 12, 2006 7:53 pm Post subject: |
|
|
the_maddin,
Welcome to gentoo. You should not have a /etc/grub.conf file. Lilo users have a /etc/lilo.conf but thats lilos way of doing things. Its used at a different time.
/boot/grub/menu.lst and /boot/grub/grub.conf are actually the same file. One is normally a symbolic link to the other Code: | lrwxrwxrwx 1 root root 20 Dec 14 2004 menu.lst -> /boot/grub/grub.conf | if your symlink was missing grub would not find grub.conf.
The handbook is correct. The normal emerge grub creates the link for you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Bob Leny Apprentice
Joined: 18 Aug 2006 Posts: 189
|
Posted: Tue Sep 12, 2006 8:39 pm Post subject: |
|
|
jmbsvicetto wrote: | Hi.
Bob Leny wrote: | I need some help here if at all possible. I installed grub on hdb,5 and stupid me, doesnt load from hdb, it loads from hda. So I switched out the hard drives. You can the issue... (If not, now grub is looking in hdb,5, which doesn't exist...)
|
You should post the output of fdisk -l and say what disk is set to boot on the BIOS.
However, from your description, have you tried to boot with the live-cd, mount the partitions, chroot and do the following?
Code: | # grub
grub> root (hd1,4)
grub> setup (hd0)
grub> exit
# |
Does it work? |
The bios is booting from hda, which is was I swaped them (I wanted grub on my new disk, which is now hda).
Ok, I put the fdisk -l on the last post. I used this for the mount, I don't know if it's right though...
Code: | #mount /dev/hda5 /mnt/gentoo |
I don't know what to change the directory to.
And with this new information, is this still right:
Code: | # grub
grub> root (hd1,4)
grub> setup (hd0)
grub> exit
# |
And, if you could, explain what "root", and "setup" do?
Thanks! |
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4734 Location: Angra do Heroísmo (PT)
|
Posted: Wed Sep 13, 2006 1:24 am Post subject: |
|
|
Bob Leny wrote: |
The bios is booting from hda, which is was I swaped them (I wanted grub on my new disk, which is now hda).
Code: | #mount /dev/hda5 /mnt/gentoo |
I don't know what to change the directory to.
And, if you could, explain what "root", and "setup" do?
|
Please reread my above post, as I was finally able to complete it. I had some problems posting the complete answer before.
To mount your partitions and chroot, you should do the following - assuming your disk is /dev/hda, your /boot partition is /dev/hda1 and your / partition is /dev/nda5.
Code: | # mount /dev/hda5 /mnt/gentoo
# mount /dev/hda1 /mnt/gentoo/boot
# mount -t proc proc /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# cat /proc/mounts /mnt/gentoo/etc/mtab
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile |
Now to install GRUB in the MBR follow my instructions in the previous post.
The root in root (hd0,0) tells GRUB where is your /boot partition using GRUB partition names. GRUB is made of 2 different parts, a stage1 and a stage1.5 + stage2. The stage1 is embbeded on a partition or the MBR. The stage1.5 and stage2 files are put on the /boot/grub dir. The setup command tells GRUB to install stage1 to the specified disk or partition.
After you install GRUB into the MBR and before you reboot, do the following inside the chroot
Code: | # exit
# cd /
# umount /mnt/gentoo/*
# umount /mnt/gentoo |
Does this help? _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
Bob Leny Apprentice
Joined: 18 Aug 2006 Posts: 189
|
Posted: Wed Sep 13, 2006 1:54 am Post subject: |
|
|
jmbsvicetto wrote: |
Code: | # mount /dev/hda5 /mnt/gentoo
# mount /dev/hda1 /mnt/gentoo/boot
# mount -t proc proc /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# cat /proc/mounts /mnt/gentoo/etc/mtab
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile |
|
Umm... It works untill I get to the "#env-update". I get, "bash env-update: command not found".
Nope scratch that! My big brain did something... I'm a logical person, I saw a pattern and solved my problem. "env -update"! yeah!
What should I do?
(Ya know, this would be impossible without this second computer...) |
|
Back to top |
|
|
Bob Leny Apprentice
Joined: 18 Aug 2006 Posts: 189
|
Posted: Wed Sep 13, 2006 2:15 am Post subject: |
|
|
Guh....
When I typed "root (hd0,5)" I get this, "Filesystem type unknown, partition type 0x82"
Is that right?
Aslo, when I do the grub> setup (hd?,?) I get "cannot mount selected partition". I under stand that the setup writes stage 1.5 and stage 2 to the specified location, but what should the location be? |
|
Back to top |
|
|
JugglingSuns120 n00b
Joined: 16 Oct 2005 Posts: 15
|
Posted: Wed Sep 13, 2006 2:16 am Post subject: |
|
|
Hi, and thanks for your reply. A bit of background on my system. I have a dell Inspiron 1405 laptop with a single 80 gig internal drive. Attached via USB is a 160 gig external IDE drive. I did as you said but I mapped them in reverse order. The error still occurs even after mapping the drives. The error message I receive is as follows
Code: |
root (hd1,0)
Filesystem type unknown, partition type OxDe
kernel /kernel-2.6.13-gentoo-r7 root=/dev/sda3
Error 17: Cannot mount selected partition
|
Quote: |
device.map
Code: | (hd1) /dev/sda
(hd0) /dev/hda |
[/code]
grub.conf.
Code: | default 0
timeout 15
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd1,0)
kernel /boot/kernel-2.6.13-gentoo-r7 root=/dev/sda3 |
|
|
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4734 Location: Angra do Heroísmo (PT)
|
Posted: Wed Sep 13, 2006 2:20 am Post subject: |
|
|
Bob Leny wrote: | Guh....
When I typed "root (hd0,5)" I get this, "Filesystem type unknown, partition type 0x82"
Is that right?
|
(hd0,5) is your /dev/hda6 partition which seems to be a SWAP partition.
You want to use (hd0,4). GRUB starts counting at 0. _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4734 Location: Angra do Heroísmo (PT)
|
Posted: Wed Sep 13, 2006 2:39 am Post subject: |
|
|
JugglingSuns120 wrote: | Hi, and thanks for your reply. A bit of background on my system. I have a dell Inspiron 1405 laptop with a single 80 gig internal drive. Attached via USB is a 160 gig external IDE drive. I did as you said but I mapped them in reverse order. The error still occurs even after mapping the drives. The error message I receive is as follows
Code: |
root (hd1,0)
Filesystem type unknown, partition type OxDe
kernel /kernel-2.6.13-gentoo-r7 root=/dev/sda3
Error 17: Cannot mount selected partition
|
Code: |
device.map
[code](hd1) /dev/sda
(hd0) /dev/hda[/code]
|
|
Please post the output of fdisk -l /dev/sda. It seems you have the wrong type for your partition. that would explain the error.
JugglingSuns120 wrote: |
grub.conf.
Code: | default 0
timeout 15
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd1,0)
kernel /boot/kernel-2.6.13-gentoo-r7 root=/dev/sda3 |
|
This seems fine to me. I would try to solve the partition problem. _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
Bob Leny Apprentice
Joined: 18 Aug 2006 Posts: 189
|
Posted: Wed Sep 13, 2006 3:03 am Post subject: |
|
|
Dude! This sucks! Nothing but problems! I've been trying to install Gentoo for 2 weeks now and I haven't got it yet!
This is a line I receive whilst running the command, grub> setup (hd0,4)
Code: | Running embed /boot/grub/e2fs_stage1_5 (hd0,4)... failed (this is not fatal) |
Maybe this is a problem I don't know.
Heres my error on boot...
Booting `Gentoo Linux`
root (hd1,4)
Filesystem type is fat, partition type 0xc
kernel /kernel.genkernel.x86.2 6 17.gentoo.r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hdb2
Error 15: File not found
My root shouldnt be hd1,4!??!???!?!
I did this a second time aswell... |
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4734 Location: Angra do Heroísmo (PT)
|
Posted: Wed Sep 13, 2006 3:56 am Post subject: |
|
|
Bob Leny wrote: |
Code: | Running embed /boot/grub/e2fs_stage1_5 (hd0,4)... failed (this is not fatal) |
Code: | root (hd1,4)
Filesystem type is fat, partition type 0xc
kernel /kernel.genkernel.x86.2 6 17.gentoo.r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hdb2
Error 15: File not found |
My root shouldnt be hd1,4!??!???!?!
|
Well, that looks bad. Your /boot partition shouldn't be fat. Although the warning about stage1_5 in itself is not worrying.
Well, if you look at my suggestion above, I used (hd1,4). You however, had (hd0,5) in the previous reply, which threw me off balance.
Does it work now? _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
JugglingSuns120 n00b
Joined: 16 Oct 2005 Posts: 15
|
Posted: Wed Sep 13, 2006 4:00 am Post subject: |
|
|
jmbsvicetto wrote: |
Please post the output of fdisk -l /dev/sda. It seems you have the wrong type for your partition. that would explain the error.
|
Here are the results:
Code: |
fisk -l /dev/sda
Disk /dev/sda: 163.9 GB 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 572 = 8225280 bytes
Device Boot Start End Blocks ID System
/dev/sda1 * 1 13 104391 82 Linux
/dev/sda2 14 123 882575 83 Linux Swap
/dev/sda3 124 9729 77160195 82 Linux
/dev/sda4 9730 19929 81931500 b W95 FAT32
|
AJ |
|
Back to top |
|
|
jmbsvicetto Moderator
Joined: 27 Apr 2005 Posts: 4734 Location: Angra do Heroísmo (PT)
|
Posted: Wed Sep 13, 2006 4:10 am Post subject: |
|
|
JugglingSuns120 wrote: |
Code: |
root (hd1,0)
Filesystem type unknown, partition type OxDe
|
|
JugglingSuns120 wrote: |
Here are the results:
Code: | fisk -l /dev/sda
Device Boot Start End Blocks ID System
/dev/sda1 * 1 13 104391 82 Linux
|
|
hmm, something's wrong in here. Are you sure GRUB sees /dev/sda1 as (hd1)?
You can try to confirm this, by using the command line editor of GRUB. _________________ Jorge.
Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
|
|
Back to top |
|
|
JugglingSuns120 n00b
Joined: 16 Oct 2005 Posts: 15
|
Posted: Wed Sep 13, 2006 4:20 am Post subject: |
|
|
jmbsvicetto wrote: | JugglingSuns120 wrote: |
Code: |
root (hd1,0)
Filesystem type unknown, partition type OxDe
|
|
JugglingSuns120 wrote: |
Here are the results:
Code: | fisk -l /dev/sda
Device Boot Start End Blocks ID System
/dev/sda1 * 1 13 104391 82 Linux
|
|
hmm, something's wrong in here. Are you sure GRUB sees /dev/sda1 as (hd1)?
You can try to confirm this, by using the command line editor of GRUB. |
When I installed GRUB into the MBR I went through and the command root (hd1,[0-3]) to confirm that the output matched the partition layout and both (hd1,0) and (hd1,2) showed a filesystem that was ext 2 while (hd1,1) showed swap and (hd1,3) showed FAT32, so I am fairly certain that they are both pointing to the same spot, also my installation of grub to the MBR was sucessful which wouldnt be possible if my root was pointing to the wrong spot.
AJ
[edit]PS. I was just reading another post unrelated to this topic but it brought up the FSTAB file which it just occured to me I never modified when I made my drive an external one. Would this be causing the problems with GRUB? My FSTAB still has all partitions as hdb instead of sda. [/edit] |
|
Back to top |
|
|
danthehat Tux's lil' helper
Joined: 20 Feb 2005 Posts: 82 Location: Ontario, Canada
|
Posted: Wed Sep 13, 2006 6:12 am Post subject: |
|
|
I installed GRUB just fine to my first sata drive, but when I go to boot into Gentoo via the boot menu, it gives me an error 22 and just generally makes a pest of itself... Now from what I understand, error 22's happen when something called EVMS pisses off GRUB. But I don't even know what EVMS is, so I am very confused.
I am not sure what you guys need to know to fix me, so please ask and I shall provide.
Thanks,
dTh |
|
Back to top |
|
|
l1nny n00b
Joined: 13 Sep 2006 Posts: 13 Location: USA
|
Posted: Wed Sep 13, 2006 6:42 am Post subject: VFS: Could not open root device..... |
|
|
'Just had to post this, although it's been posted before. My problem was a little different though.
I have a sort of unusual machine, with 2 sas drives and 1 sata drive.
I already had part of the second sas's drives partition used (12 of 34GB) as the first primary partition, with Windoze on the first drive.
Anyway, I used 12GB of the drive for Gentoo, and made my partitions [1] boot [2] swap [3] root. I performed a manual
install and everything looked okay, and then there's the grub configuration. Anyway, I performed this (3rd install of Gentoo) and rebooted.
I couldn't figure this one out at all; my boot drive and partition were 1,1 [drive 2, partition 2], and I installed the bootloader on drive 1 [0], so I had something like:
root (hd1,1)
kernel /boot/bzImage root (1,3)
Anyway, no go with this, got the same error message as above.
I just couldn't get it out of my mind though, and got back up and read the notes on grub a little more closely.
My mtab was incorrect !!!!! Fixed that and it booted right up.
Too much excitement for one morning !! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Wed Sep 13, 2006 9:44 am Post subject: |
|
|
danthehat,
info grub says Code: | 22 : No such partition
This error is returned if a partition is requested in the device
part of a device- or full file name which isn't on the selected
disk |
A typo in your grub.conf can cause that, its not always LVM related.
Can you post your grub.conf and tell us about the partitions on all your hard drives please. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Wed Sep 13, 2006 9:48 am Post subject: |
|
|
l1nny,
mtab is created and modified by the system as things are mouted and unmouted. It can't be incorrect.This line
Code: | kernel /boot/bzImage root (1,3) | must be incorrect too.
You are mixing up grubs notation for things with the kernels notation. Both use the term root to mean different things.
The grubspeak is not quite right either. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Wed Sep 13, 2006 9:56 am Post subject: |
|
|
JugglingSuns120,
When you do a manual install of grub, /etc/fstab is not consulted.
At boot time, its used to run fsck, which will fail is the partitions don't exist, or are the wrong type.
Partition type de is Dell Utility. It sounds linke your grub install was fine but you made the famous 'out by one' error in your grub.conf. Of course, if you don't have a Dell that contains a utility partition, this is all irrelavent to you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
JugglingSuns120 n00b
Joined: 16 Oct 2005 Posts: 15
|
Posted: Wed Sep 13, 2006 1:46 pm Post subject: |
|
|
NeddySeagoon wrote: | JugglingSuns120,
When you do a manual install of grub, /etc/fstab is not consulted.
At boot time, its used to run fsck, which will fail is the partitions don't exist, or are the wrong type.
Partition type de is Dell Utility. It sounds linke your grub install was fine but you made the famous 'out by one' error in your grub.conf. Of course, if you don't have a Dell that contains a utility partition, this is all irrelavent to you. |
Well it seems as if you are right on this one, under the live cd GRUB sees the external drive as (hd1) but when the laptop boots from that drive it is seen as (hd0). I modified my grub.conf to use (hd0) instead of (hd1) and it boots into linux. Now I need to work my way through a kernel panic which is telling me there is no init found and I should be all set. Thanks for all your help guys.
AJ |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Wed Sep 13, 2006 2:07 pm Post subject: |
|
|
JugglingSuns120,
external drive ... Hmm do you have on your kenrl line in grub ?
Its needed to allow the USB subsystem to come up before mouting root is attempted.
<secs> varies from system to system but values from 7 to 30 are reported to work. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
sniggit Apprentice
Joined: 31 Aug 2003 Posts: 187 Location: n00bcity
|
Posted: Wed Sep 13, 2006 5:53 pm Post subject: |
|
|
Hi.
Im having some problem with grub and dual booting.
After reinstalling windows, windows rewrote my mbr.
When I started up my computer it booted directly into winxp.
so i booted up the livecd and this:
Code: | mount /dev/sdb3 /mnt/gentoo
mount /dev sdb1 /mnt/gentoo/boot
mount -o bind /proc /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
cp /proc/mounts /etc/mtab
grub-install /dev/sda1 |
with this grub.conf:
Code: | default 0
timeout 20
title=gentoo
root (hd1,0)
kernel /boot/2.6.15-gentoo-r7 root=/dev/sdb3
title=winxp
rootnoverify (hd0,0)
chainloader +1
|
this is the same grub.conf I was using before I reinstalled windows, so it should be
working, right? Wrong.
When I try to boot winxp the screen reads :
Code: | rootnoverify (hd0,0)
chainloader +1
Grub loading stage2... |
and jumps back to the boot selection screen. No error message so I really don't know where to start looking.
I tried some subtle changes in grub.conf which I saw someone suggesting:
Code: | changed
rootnoverify (hd0,0)
chainloader +1
to
chainloader (hd0,0)+1
|
But that didnt make any difference, which may not be that surprising..
Any help would be appreciated _________________ Let the money shine!
Last edited by sniggit on Wed Sep 13, 2006 6:33 pm; edited 1 time in total |
|
Back to top |
|
|
l1nny n00b
Joined: 13 Sep 2006 Posts: 13 Location: USA
|
Posted: Wed Sep 13, 2006 6:18 pm Post subject: Thanks, notation incorrect... |
|
|
Thanks NeddySeagoon; I kinda' left out the 'hd' part of the syntax there, and mtab can be wrong if you've fooled with it, which is exactly what I did. 'Not a total noobie, but there's still a whole lot of ground to cover.
'Started with Smoothwall about a year or so ago, and learned a lot from that. Then got interested a couple of months ago in KnoppMyth and Knoppix, then got into Debian, then worked with Ubuntu a short time. Good distros, but....
Gentoo looked to be the way to go when I started an install and found it wasn't all just point & click & let the install program make most of the decisions for you; I was hooked.
Anyway, all's well that ends well; I was just happy to have a working system this morning !! Thanks for the response.
BTW, your sig says it all !! That happened to me ONE time, and I lost over a years worth of e-mail, etc,etc....; never again!! |
|
Back to top |
|
|
JugglingSuns120 n00b
Joined: 16 Oct 2005 Posts: 15
|
Posted: Wed Sep 13, 2006 6:19 pm Post subject: |
|
|
NeddySeagoon wrote: | JugglingSuns120,
external drive ... Hmm do you have on your kenrl line in grub ?
Its needed to allow the USB subsystem to come up before mouting root is attempted.
<secs> varies from system to system but values from 7 to 30 are reported to work. |
I did not have this line added, after adding it I was able to boot my system. Thanks for the help.
AJ |
|
Back to top |
|
|
Deathwing00 Bodhisattva
Joined: 13 Jun 2003 Posts: 4087 Location: Dresden, Germany
|
|
Back to top |
|
|
|
|
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
|
|