Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-14-2005, 02:01 PM
|
#1
|
Member
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226
Rep:
|
System restarts when grub appears
I had Windows XP installed, and i installed FC3. After i installed it, in the grub appear 2 options: Windows XP and Fedora, like I expected. But when i try to change the default boot option by hitting the arrow, the system restarts. The only way i can boot the other OS than the default boot system is to change the default boot system using the 1st bootable FC3 cd. Can you tell me why is this happening? Thank you.
|
|
|
10-14-2005, 09:45 PM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
You can boot into Linux using the installation cd, then open a terminal window and su to root. Then edit /boot/grub/menu.lst (if that's what FC4 uses), or edit grub.conf (if that's what FC4 uses).
In that file, there is a line which reads:
default 0
That means that the first operating system in the list is the default system to boot. Change that line to read 'default 1' to set the second operating system as default. (Grub numbering uses the same numbering scheme as the C programming language: numbers begin with 0 instead of 1).
Or, you could edit the file the move the second system in the list of available systems to the first postion, and leave the line 'default 0' unchanged.
Either way, the effect will be the same: you change the default system to boot.
As to why this is happening, I suspect that the manner in which the keyboard arrow keys are mapped may be the problem, and the down arrow is mapped as equal to shutdown-and-reboot.
I don't know the mapping for your locale, so I can't say with any degree of certainty.
|
|
|
10-15-2005, 03:31 AM
|
#3
|
Member
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226
Original Poster
Rep:
|
Code:
The only way i can boot the other OS than the default boot
system is to change the default boot system using the 1st bootable FC3 cd.
Like I said in my first post, I know that, but I was trying to find a solution to my problem and make the grub work.
Quote:
As to why this is happening, I suspect that the manner in which the keyboard arrow keys are mapped may be the problem, and the down arrow is mapped as equal to shutdown-and-reboot.
|
I don't know, it may be this, but the system restarts if I press any arrow key, and I think any key, but I dindn't try with any other key besides the arrows.
Thank you.
Last edited by zahadumy; 10-15-2005 at 03:37 AM.
|
|
|
11-11-2005, 02:55 PM
|
#4
|
Member
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226
Original Poster
Rep:
|
Oka, it's been a while since my last post and I have the same problem. Is it possible to install another bootloader (LILO)? Thank you.
|
|
|
11-11-2005, 03:21 PM
|
#5
|
Senior Member
Registered: Oct 2003
Posts: 3,057
Rep:
|
What's your grub.conf look like?
|
|
|
11-11-2005, 03:26 PM
|
#6
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,316
|
USB keyboard ???.
|
|
|
11-12-2005, 06:10 AM
|
#7
|
Member
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226
Original Poster
Rep:
|
My grub.conf is:
Code:
[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,12)
# kernel /boot/vmlinuz-version ro root=/dev/sda13
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,12)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core 3
root (hd0,12)
kernel /boot/vmlinuz-2.6.9-1.667 root=/dev/sda13 ro rhgb
initrd /boot/initrd-2.6.9-1.667.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
And I don't have a USB keyboard, I have a PS2 one. Thank you.
|
|
|
11-12-2005, 07:44 AM
|
#8
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
How large is your Sata disk?
FC3 does not have the ability to cross the 137Gb barrier. You obviously have a few partition is FC3 was installed in sda13.
The menu.lst (or menu.conf) looks satisfactory to me but in order to have a complete picture you need to show the content of
(1) /etc/fstab
(2) fdisk -l (at root terminal)
|
|
|
11-12-2005, 11:24 AM
|
#9
|
Member
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226
Original Poster
Rep:
|
Code:
[root@localhost ~]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sda12 swap swap defaults 0 0
/dev/sda10 swap swap defaults 0 0
/dev/sda5 /mnt/D auto defaults 0 0
/dev/sda6 /mnt/E auto defaults 0 0
/dev/sda7 /mnt/F auto defaults 0 0
/dev/sda8 /mnt/G auto defaults 0 0
/dev/sda9 /mnt/H auto uid=500 0 0
/dev/hdb /media/cdrecorder auto pamconsole,fscontext=system_u: object_r:removable_t,ro,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,fscontext=system_u: object_r:removable_t,exec,noauto,managed 0 0
Code:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1916 15390238+ 7 HPFS/NTFS
/dev/sda2 1917 14946 104663475 f W95 Ext'd (LBA)
/dev/sda5 1917 6381 35865081 b W95 FAT32
/dev/sda6 6382 10854 35929341 b W95 FAT32
/dev/sda7 10855 12772 15406303+ b W95 FAT32
/dev/sda8 12773 13413 5148801 b W95 FAT32
/dev/sda9 13414 13671 2072353+ b W95 FAT32
/dev/sda10 13672 13734 506016 82 Linux swap
/dev/sda11 13735 14296 4514233+ 83 Linux
/dev/sda12 14297 14362 530113+ 82 Linux swap
/dev/sda13 14363 14946 4690948+ 83 Linux
/dev/sda10 and /dev/sda11 are a Slackware 10.1 distro, but I don't have them in /boot/grub/grub.conf because I couldn't set grub to boot it, this is another problem. I have to boot with a Slack rescue floppy and install lilo. But when I install lilo I can't configure it to boot Fedora... I have a lot of problems with Linux and no solutions. I started a thread about this grub problem and nobody helped me, so... forget it!
Thank you.
Last edited by zahadumy; 11-12-2005 at 11:26 AM.
|
|
|
11-12-2005, 12:35 PM
|
#10
|
Senior Member
Registered: Oct 2003
Posts: 3,057
Rep:
|
From your fstab
Quote:
LABEL=/ / ext3 defaults 1 1
|
From your fdisk -l
Quote:
/dev/sda13 14363 14946 4690948+ 83 Linux
|
From your grub.conf
Quote:
kernel /boot/vmlinuz-2.6.9-1.667 root=/dev/sda13 ro rhgb
|
The entries in grub.conf and fstab need to match. Unless you have more than one install of Redhat / Fedora , then use root=LABEL=/ in the grub.conf and LABEL=/ in the fstab.
You also could change the fstab to match what you have already in the grub.conf.
For example:
From your fstab
Quote:
/dev/sda13 / ext3 defaults 1 1
|
and
From your grub.conf
Quote:
kernel /boot/vmlinuz-2.6.9-1.667 root=/dev/sda13 ro rhgb
|
Also, I like to give myself some more time to look at the options....
timeout=15
and I comment out the hiddenmenu part ....
#hiddenmenu
|
|
|
11-12-2005, 12:59 PM
|
#11
|
Member
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226
Original Poster
Rep:
|
I understant what you are saying, but I tried to add a Slack option to grub like this:
Code:
title Slackware 10.1
root (hd0,10)
kernel /boot/vmlinuz ro root=/dev/sda11 ro
initrd /boot/initrd.gz
I had to write a root partition for Slack (/dev/sda11), because I can't use that label in /etc/fstab. That's why I did this. Thank you, but I still have the same problem. Do you have any idea what should I put in grub.conf in order to be able to boot Slackware from grub? Thank you.
|
|
|
11-12-2005, 08:34 PM
|
#12
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
I really don't see a problem with your setup but you seem to have a bit of bother with everything.
You have 3 boot laoders, XP's Ntldr, FC's Grub and Slackware's Lilo. Any one of them can boot the other two.
At the moment your FC's Grub only boots the XP, FC3 itself is booted by an installation CD and there is a rescue bootable floppy for the Slackware, right?
Let's be lazy and do the minimum work
Step 1 -------------- getting FC's Grub to boot Slackware
Slackware 10.1 has no initrd and its kernel has no tail so 3 more lines at the end of FC's /boot/grub/menu.lst should do it
title My Slackware 10.1 @ sda11
root (hd0,10)
kernel /boot/vmlinuz root=/dev/sda11 ro
For Step 2 & 3 to work it is necessary that you replicate Grub inside FC3 root partition by
grub-install /dev/sda13
Step 2 -----------------Getting Slackware bootable floppy to boot FC3 as extra alternative
You did claim to have installed Lilo in Slackware 10.1 so it is only a matter of amending the /etc/lilo.conf in the sda11 partition with the following entries.
other=/dev/sda11
label=FC3
After you have saved the lilo.conf proceed to save the boot loader Lilo both in its root partition as well as in the floppy
lilo -b /dev/sda11
lilo -b /dev/fd0
If Lilo doesn't complain and says FC3 has been added then all systems go.
Step 3 ----------Make a Grub floppy unattached to a system to boot all 3
While in FC3 find out where Grub's stage1 and stage2 are stored by
find / -name stage1
My record shows FC3 store them in /usr/share/grub/i386-redhat directory
Change directory to it, pop in a floppy and dd the stage1 and stage2 out as follow
dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1
If you have replicated FC3's Grub in sda13 as proposed above and Slackware's Lilo has been replicated in sda11 then you can boot this Grub floppy up to a Grub prompt. By typing the following 3 lines you should be able to boot all 3 systems
root (hd0,j)
chainloader +1
boot
where j=0 for XP, j=12 for FC3 and j=10 for Slackware.
--------------------------------------
If the above works out, go to the bank to open a desposit box to lock up the Grub floppy because it can boot any system in a PC.
So the end result should be, assuming FC3 still unbootable by MBR,
(a) you MBR boots Slackware and XP
(b) Lilo floppy boots all three
(c) Grub floppy (unattached to a system) also boot three"manualy"
Last edited by saikee; 11-13-2005 at 04:14 AM.
|
|
|
11-13-2005, 09:35 AM
|
#13
|
Member
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226
Original Poster
Rep:
|
God bless UK!
Quote:
Originally posted by saikee
[B]I really don't see a problem with your setup but you seem to have a bit of bother with everything.
You have 3 boot laoders, XP's Ntldr, FC's Grub and Slackware's Lilo. Any one of them can boot the other two.
At the moment your FC's Grub only boots the XP, FC3 itself is booted by an installation CD and there is a rescue bootable floppy for the Slackware, right?
Let's be lazy and do the minimum work
Step 1 -------------- getting FC's Grub to boot Slackware
Slackware 10.1 has no initrd and its kernel has no tail so 3 more lines at the end of FC's /boot/grub/menu.lst should do it
title My Slackware 10.1 @ sda11
root (hd0,10)
kernel /boot/vmlinuz root=/dev/sda11 ro
|
Fedora's grub booted Windows XP and Fedora itself. I couldn't manage to make it boot Slack (until today, thanks to you). I tried to install lilo, Slack's bootloader, and it booted Slackware and Windows, but I couldn't make it boot Fedora, and now I don't care, because I won't use lilo from now on. All I needed was Step 1 from what you wrote me. Thank you, all I can say is thank you very much, now I can do whatever I want today instead of reading grub and lilo documentation on the net. Thank you! Have a nice day!
|
|
|
11-13-2005, 10:04 AM
|
#14
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
I have offered you the whole sheep and you are happy to walk away with one lamb chop!
Have a nice day yourself.
|
|
|
11-18-2005, 10:42 PM
|
#15
|
Member
Registered: Jul 2005
Location: China
Distribution: Mandriva
Posts: 84
Rep:
|
GRUB and LILO always conflict with Windows. And GNU GRUB is not so robust, causing many problems during boot.
So try GRUB for DOS please. It is a cross-platform boot loader based on GNU GRUB. The GRUB.EXE can be started from DOS/Win9x; and GRLDR can be started from BOOT.INI of Windows NT/2K/XP/2003; and even more, the GRUB.EXE can be started from LINUX via the KEXEC tool.
By using GRUB.EXE or GRLDR, you don't have to touch your MBR. It is the safest way coexisting with DOS/Windows.
You needn't install GRUB for DOS. Just run GRUB.EXE from DOS, or append a line of "C:\GRLDR=START GRUB" into your BOOT.INI(restart and select the "START GRUB" menu item), that will do.
Download GRUB for DOS here: http://freshmeat.net/projects/grub4dos/
There is a fat12grldr.img file with the GRUB for DOS release. You can create a GRUB bootable floppy with this fat12grldr.img file.
Or, you can just copy GRUB.EXE to your DOS floppy and run GRUB.EXE to enter the GRUB environment.
|
|
|
All times are GMT -5. The time now is 01:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|