View previous topic :: View next topic |
Author |
Message |
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Thu Sep 30, 2004 3:02 pm Post subject: Grub not booting |
|
|
Hi,
I don't get grub to start. Emerge grub made no problems, installing did also run without any error. I tried the natively way and grub-install.
root (hd0,1)
setup (hd0)
quit
Here is my fstab:
/dev/hda1 /mnt/windows auto noauto,noatime,user
/dev/hda2 /boot ext2 noauto,noatime
/dev/hda4 / reiserfs noatime
/dev/hda3 none swap sw
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,user 0 0
my grub.conf:
default 0
timeout 30
splashimage=(hd0,1)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.8-r4
root (hd0,1)
kernel /kernel-2.6.8-r4 root=/dev/hda4 video=vesafb:ywrap,pmipal,1024x768-32@85
title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
and at last my mtab:
/dev/hda4 / reiserfs rw,noatime 0 0
none /dev devfs rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/bus/usb usbfs rw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 ro,noexec,nosuid,nodev 0 0
/dev/hda2 /boot ext2 rw,noatime 0 0
none /proc proc rw 0 0
none /proc proc rw 0 0
none /proc proc rw 0 0
I know, that grub did anything in the MBR cause even Windows is not booting anymore. At the time I depend on a live cd
thx for help _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
Posted: Thu Sep 30, 2004 3:15 pm Post subject: |
|
|
What do you mean by "not booting"? Are there any error messages? You've given us all the information except what the problem actually is! _________________ No-one's more important than the earthworm. |
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Thu Sep 30, 2004 3:16 pm Post subject: |
|
|
the problem is my bios says:
Hard disk boot sector invalid or No activ partition _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Thu Sep 30, 2004 3:18 pm Post subject: |
|
|
Code: |
root (hd0,0)
setup (hd0)
quit
|
Code: |
# For booting GNU/Linux
title linux
root (hd0,0)
kernel (hd0,0)/kernel-2.6.8-r4 root=/dev/hda4
|
|
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Thu Sep 30, 2004 3:25 pm Post subject: |
|
|
but if I enter
root (hd0,0)
grub says: Filesystem type unknown, cause there is my windows partition located... _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
Yogi-CH Guru
Joined: 19 Apr 2004 Posts: 372 Location: Somewhere in Texas, last I remember...
|
Posted: Thu Sep 30, 2004 3:32 pm Post subject: |
|
|
anduril wrote: | but if I enter
root (hd0,0)
grub says: Filesystem type unknown, cause there is my windows partition located... |
Bear in mind that (hd0,0) means hard drive 1, partition 1. To find out what partitions you have, along with their number, run the following from CLI (shell) as root:
# fdisk -l
....and it will be spelled out for you. Then, if the drive is (for sake of example):
/dev/hda1 (windows)
/dev/hda2 (extended)
/dev/hda3 linux (/)
/dev/hda4 swap
/dev/hda5 linux (/home)
...you'd enter
(hd0,2) to represent the root partition & take it from there.
HTH... _________________ ...Yogi
Last edited by Yogi-CH on Thu Sep 30, 2004 3:37 pm; edited 1 time in total |
|
Back to top |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Thu Sep 30, 2004 3:33 pm Post subject: |
|
|
anduril wrote: |
root (hd0,0)
grub says: Filesystem type unknown, cause there is my windows partition located... |
oops, sorry - i didnt see that.
how big is the harddisk, and what size is your 1st partition (the windows partition)? maybe your boot is beyond a boundary so the bios (or/and grub) is unable to use it?
btw.. you have to set the /boot partition (hda2) active! |
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Thu Sep 30, 2004 4:04 pm Post subject: |
|
|
I did it as the handbook says: +32M and yes there is there are two "stars" under the section boot in fdisk. One for the windows partition and one for my boot partition _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Thu Sep 30, 2004 4:18 pm Post subject: |
|
|
here is the complete fdisk list:
/dev/hda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/hda2 * 1276 1280 40162+ 83 Linux
/dev/hda3 1281 1343 506047+ 82 Linux swap
/dev/hda4 1344 3776 8747392+ 83 Linux _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
Yogi-CH Guru
Joined: 19 Apr 2004 Posts: 372 Location: Somewhere in Texas, last I remember...
|
Posted: Thu Sep 30, 2004 4:54 pm Post subject: |
|
|
[quote="anduril"]here is the complete fdisk list:
/dev/hda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/hda2 * 1276 1280 40162+ 83 Linux
/dev/hda3 1281 1343 506047+ 82 Linux swap
/dev/hda4 1344 3776 8747392+ 83 Linux[/quote
Okay, here's how your grub.conf file might look:
Code: |
default 0
timeout 30
splashiage=(hd0,1)/grub/splash.xpm.gz
title Gentoo
root=(hd0,1)
kernel /kernel-x.x.x root=/dev/ram0 initrc=/boot/initrc real_root=/dev/hda4 vga=<parameter>
title Win-XP
root (hd0,0)
chainloader +1
|
In addition, you need to physically copy the linuxrc since it doesn't get put in the right place automagically. Mine was in /usr/share/genkernel/generic. If you don't find it, use the following:
Code: |
# find /usr/ -iname linuxrc
./usr/xxx/xxx/xxx/linuxrc
#cp /usr/xxx/xxx/linuxrc /boot
|
The above examples *should_work* and the <parameter> will come out of the installation handbook unless you already know what it is for your box.
As for mine: On one box, I need the 'vga=0xf00' for it to work; on the other, 'vga=0x317'. In the 1st case I am using 800x600 & the Intel video nees the 0xf00 parameter; in the next case my notebook is 1024x768 & the ATI Radeon AGP card needs 0x317. In both cases I am using frame buffering (which can be set in the kernel & usually is, by default, I believe).
HTH... _________________ ...Yogi
Last edited by Yogi-CH on Thu Sep 30, 2004 5:03 pm; edited 1 time in total |
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Thu Sep 30, 2004 5:02 pm Post subject: |
|
|
no, unfortunaly not _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
Yogi-CH Guru
Joined: 19 Apr 2004 Posts: 372 Location: Somewhere in Texas, last I remember...
|
Posted: Thu Sep 30, 2004 5:05 pm Post subject: |
|
|
anduril wrote: | no, unfortunaly not |
I edited my msg four times, and before the last edit you already looked at it. Look, again. If this doesn't work we need *much_more_info* ...like the screen output in its entiretly. I may not be able to help further but someone certainly will. _________________ ...Yogi |
|
Back to top |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Thu Sep 30, 2004 8:33 pm Post subject: |
|
|
i still dont believe he has to setup grub like this:
Code: |
root (hd0,1)
setup (hd0)
quit
|
run grub again, and enter "hd0,0", not "0,1". this would explain the errormessage: "Hard disk boot sector invalid". IMHO the mbr is meant by this (boot sector)??
i am not talking about grub.conf, there "hd0,1" should be correct. |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
Posted: Thu Sep 30, 2004 8:36 pm Post subject: |
|
|
hds wrote: | run grub again, and enter "hd0,0", not "0,1". this would explain the errormessage: "Hard disk boot sector invalid". IMHO the mbr is meant by this (boot sector)??
i am not talking about grub.conf, there "hd0,1" should be correct. |
As far as I know, the root line should point to where grub can find it's config files - i.e. the stage 1.5 files etc. So if they're in /boot, and so is the kernel, it should be hd(0,1) both times. Anyway, hd(0,0) points to the first partition, not the mbr... _________________ No-one's more important than the earthworm. |
|
Back to top |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Thu Sep 30, 2004 8:43 pm Post subject: |
|
|
well, then i dont know. however - i still dont know how large his hda1 is. i guess(!) there is some limitation infact of cylinders by grub itself or by his bios then? lets say (for example) he has a 60GB harddisk, and his 1st partition is 40GB large. then it could be possible that either grub (or the bios, or both) are not able to boot from hda2 (=hd0,1)? |
|
Back to top |
|
|
shade266 Guru
Joined: 29 Oct 2003 Posts: 593 Location: Internal
|
Posted: Thu Sep 30, 2004 11:21 pm Post subject: |
|
|
I am going to add the fact that you do not need the bootable flag on the /boot partition.. in your case hda2. Once grub is installed successfully and you set the proper chainloading grub will find /boot. the way you have your setup appears to me that you are causing grub and the windows bootloader to engae regardless which distro you select from the grub menu. _________________ I've been away for a long time, bear with me. |
|
Back to top |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Fri Oct 01, 2004 7:36 am Post subject: |
|
|
shade266 wrote: | I am going to add the fact that you do not need the bootable flag on the /boot partition.. in your case hda2. Once grub is installed successfully and you set the proper chainloading grub will find /boot. the way you have your setup appears to me that you are causing grub and the windows bootloader to engae regardless which distro you select from the grub menu. |
dont think so. i have both partitions primary as well. though.. my windows is the last partition on the drive.
well, if nothing helps, i suggest you resize hda1 and leave room at the beginning (10-15MB) for a /boot partition. infact you already have 4 partitions (all of them primary i guess?) this is a little tricky, because you might have to backup one of them first. |
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Fri Oct 01, 2004 9:44 am Post subject: |
|
|
I am not able to find the linuxrc, but I don`t have it on three different pcs. I am pretty sure, that it must be
root (hd0,1)
cause I used the same kinds of partition on the other systems and there grub ran without any problems. Please say me, which information you need. Maybe it is the bios? I've never heard of it before: Insyde Software SCU. I've 10GB for Linux. 32MB for the boot, 512 for swap and the rest for root and 10GB for Windows in one partition - all primary. _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
hds Advocate
Joined: 21 Aug 2004 Posts: 2629 Location: Sprockhoevel [GER]
|
Posted: Fri Oct 01, 2004 11:52 pm Post subject: |
|
|
how old is your bios? |
|
Back to top |
|
|
MickKi Veteran
Joined: 08 Feb 2004 Posts: 1173
|
Posted: Sat Oct 02, 2004 7:18 am Post subject: |
|
|
Hi anduril,
anduril wrote: | here is the complete fdisk list:
/dev/hda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/hda2 * 1276 1280 40162+ 83 Linux
/dev/hda3 1281 1343 506047+ 82 Linux swap
/dev/hda4 1344 3776 8747392+ 83 Linux |
I haven't read all of this long thread but from what you show above your first and most critical mistake is that your have flagged up two partitions as active boot partitions. There should be only one! Since the MBR must be at the beginning of the disk I suggest that you remove the hda2 flag. That will allow you to boot (assuming that you have set up your grub correctly - sorry have not checked the rest of the thread in detail).
Good luck. _________________ Regards,
Mick |
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Sat Oct 02, 2004 11:22 am Post subject: |
|
|
I don't know how old the bios is, but I don't think it is that old, cause the cpu is an athlon-xp 1800+
@MickKi
I need these two, cause one is for windows and one for linux _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
jschellhaass Guru
Joined: 20 Jan 2004 Posts: 341
|
Posted: Sat Oct 02, 2004 11:54 am Post subject: |
|
|
Doesn't grub error out when you try and install into the MBR and windows is the first partition?
I would think you should install the boot record in first linux partition and toggle the boot flag off for the windows partition (dev/hda1) and just leave the boot flag on /dev/hda2.
root (hd0,1)
setup (hd0,1)
jeff |
|
Back to top |
|
|
jschellhaass Guru
Joined: 20 Jan 2004 Posts: 341
|
Posted: Sat Oct 02, 2004 11:57 am Post subject: |
|
|
In order to get windows to boot again you will need to boot the Windows cd into recovery console and run fixmbr and fixboot.
jeff |
|
Back to top |
|
|
MickKi Veteran
Joined: 08 Feb 2004 Posts: 1173
|
Posted: Sat Oct 02, 2004 3:22 pm Post subject: |
|
|
Hi anduril,
anduril wrote: | @MickKi
I need these two, cause one is for windows and one for linux | Well, you may think that you need these two, but what you actually need is to be able boot into both OS' - which is not the same. On the other hand your computer needs only one MBR, which has to be in the first partition of the first disk on your machine.
Don't confuse the MBR with the boot sector of each bootable partition. Running fixmbr with your Windoze CD will overwrite grub and then you won't be able to use grub (directly) to boot linux. You could of course edit the M$Windoze boot.ini file to include a line for the linux boot partition and chainload grub using the NT loader (ntldr). Personally I prefer the grub boot loader and its splash screen and menu (it looks nicer and there's a smaller risk of some virus wiping it out ).
So in conclusion, use fdisk and remove the boot flag from all but the first partition. Install grub and edit your grub.conf to include your Windoze & your Gentoo boot partitions. Mine looks similar to this: Code: | title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
title=Gentoo Linux 2.6.8-gentoo-r5
root (hd1,0)
kernel /kernel-2.6.8-gentoo-r5 root=/dev/hdb3 |
that's because I have WinXP on the first disk (second partition) and Gentoo on the second disk 3rd partition. I use grub to chainload WinXP (using ntldr), while Gentoo is booted directly with grub (using the images in /boot which is in hd1,0).
After the grub boot loader kicks in: when I select WinXP it reads the boot.ini from the first disk/first partition, this refers it to the appropriate disk/partition for ntldr to boot WinXP (first disk/second partition). This what my boot.ini looks like: Code: | [boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn
|
When I select Gentoo, it goes to the second disk/first partition where my Gentoo /boot is and this directs it to the second disk/third partition where the Gentoo file system and kernel is.
I hope the above helps. If it doesn't make sense or you haven't sussed it out yourself just ask. Good luck!
PS. . . . and after I finished writing this looong reply I went back and read your first message! What you show there is correct EXCEPT for the double flag. Remove the boot flag from the linux partition and you're good to go! _________________ Regards,
Mick |
|
Back to top |
|
|
anduril Tux's lil' helper
Joined: 25 Mar 2004 Posts: 108
|
Posted: Sat Oct 02, 2004 3:35 pm Post subject: |
|
|
removinf the boot flag of the windows partition worked. grub loaded. but now, after letting windows play with the mbr, nothing does function. even mounting the boot partition is not possible:
wrong fs type, bad optopn, bad superblock on /dev/hda2 ot too many mounted filesystems
I deleted the /boot partition, made it new but it did not help _________________ *-°*-°*-°*-° Carum est quod rarum est et veri amici rari sunt *-°*-°*-°*-° |
|
Back to top |
|
|
|