LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-02-2008, 01:40 PM   #1
debpu06
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Rep: Reputation: 15
GRUB boot loader


Hi I have windows xp on my harddrive and I added Fedora on a seperate partition. While trying to add a sharing partition for some reason my bootloader stopped working and I could not access either fedora or windows. So I got mandriva on a pendrive and booted to try to fix it from that. So I ended up adding mandriva so i could use its bootloader to access windows and fedora, but I cant boot fedora. I was wondering if anyone could help me add this correctly.

Thanks
 
Old 10-02-2008, 02:25 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by debpu06 View Post
I was wondering if anyone could help me add this correctly.
When you boot Mandriva, what is the output of "fdisk -l"?
 
Old 10-02-2008, 02:43 PM   #3
debpu06
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 19457 115330635 5 Extended
/dev/sda5 5100 7902 22515066 83 Linux
/dev/sda6 7903 19457 92815506 83 Linux
 
Old 10-02-2008, 03:51 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by debpu06 View Post
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 19457 115330635 5 Extended
/dev/sda5 5100 7902 22515066 83 Linux
/dev/sda6 7903 19457 92815506 83 Linux
Thanks for the reply. What is the contents of "/boot/grub/menu.lst" on the Mandriva installation? It may be named "/boot/grub/grub.conf".
 
Old 10-02-2008, 04:33 PM   #5
debpu06
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Original Poster
Rep: Reputation: 15
It says permission denied even though I am in root. Any suggestions?
 
Old 10-02-2008, 08:29 PM   #6
roy_lt_69
Member
 
Registered: Aug 2006
Location: Vancouver, BC, Canada
Distribution: Slackware, Mint, Debian
Posts: 238

Rep: Reputation: 29
Looks like you have 3 partitions: sda1 is a Windows partition (~40GB), while sda5 (~22GB) and sda6 (~92GB) are both Linux partitions.
Where did you create your "sharing" partition?
Your original partitions may still be intact!
Try mounting the partitions to see if they are the original one.
You can try re-installing Grub so that it boots to those two partitions (do a search for how to do this).
 
Old 10-02-2008, 08:47 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Don't know about the permissions problem, but then I haven't looked at Mandy in forever - try "cat /boot/grub/menu.lst". If that works post the output of
Code:
grep -vE "(^#|^\s*$)" /boot/grub/menu.lst
(reduces the output).
Also, what does "df -hT" produce ???
 
Old 10-02-2008, 08:50 PM   #8
debpu06
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Original Poster
Rep: Reputation: 15
The sharing partition never got made so I dont have that one. I am pretty sure the data is still there its just that I cant get it to boot from grub so i cant access it at all.
 
Old 10-02-2008, 09:10 PM   #9
roy_lt_69
Member
 
Registered: Aug 2006
Location: Vancouver, BC, Canada
Distribution: Slackware, Mint, Debian
Posts: 238

Rep: Reputation: 29
I think all you really need to do is
1)boot from a rescue cd;
2)determine which partition (sda5 or sda6) has your original /boot partition;
3)re-install grub by running grub-install and then setup your grub environment (do a search for grub-install for specifics).
 
Old 10-03-2008, 08:12 AM   #10
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by debpu06 View Post
It says permission denied even though I am in root. Any suggestions?
Are you sure you are running with root permissions? Run "whoami" to verify this. You can alway run "sudo cat ..." if you are not root, or run "sudo bash" to get a session as root.
 
Old 10-03-2008, 02:41 PM   #11
debpu06
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by David1357 View Post
Are you sure you are running with root permissions? Run "whoami" to verify this. You can alway run "sudo cat ..." if you are not root, or run "sudo bash" to get a session as root.
yes it verified I am in root
 
Old 10-03-2008, 02:45 PM   #12
debpu06
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00 View Post
Don't know about the permissions problem, but then I haven't looked at Mandy in forever - try "cat /boot/grub/menu.lst". If that works post the output of
Code:
grep -vE "(^#|^\s*$)" /boot/grub/menu.lst
(reduces the output).
Also, what does "df -hT" produce ???
[root@localhost guest]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda5 ext2 22G 1.4G 19G 7% /



[root@localhost guest]# cat/boot/grub/menu.lst
bash: cat/boot/grub/menu.lst: No such file or directory
 
Old 10-03-2008, 03:07 PM   #13
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by debpu06 View Post
[root@localhost guest][root@localhost guest]# cat/boot/grub/menu.lst
bash: cat/boot/grub/menu.lst: No such file or directory
Put a space after "cat". And also look for "/boot/grub/grub.conf".
 
Old 10-03-2008, 07:52 PM   #14
debpu06
LQ Newbie
 
Registered: Sep 2008
Posts: 24

Original Poster
Rep: Reputation: 15
[root@localhost guest]# cat /boot/grub/menu.lst
timeout 30
color black/cyan yellow/cyan
gfxmenu (hd0,4)/boot/gfxmenu
default 0

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda5 vga=788
initrd (hd0,4)/boot/initrd.img

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/sda5
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/sda5 failsafe
initrd (hd0,4)/boot/initrd.img

title windows
root (hd0,0)
makeactive
chainloader +1



[root@localhost guest]# /boot/grub/grub.conf
bash: /boot/grub/grub.conf: No such file or directory
 
Old 10-03-2008, 09:24 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
Log in to Mandriva and as root create a mount point for Fedora:

mkdir /mnt/fedora

Then mount it:

mount -t ext3 /dev/sda6 /mnt/fedora

Change to that directory:

cd /mnt/fedora/boot/grub/

Then run the command:

cat menu.lst

Copy the fedora entries to the Mandriva /boot/grub/menu.lst file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless Keyboard not working to select boot options (Grub boot loader) psrini_vasan Fedora 7 12-16-2009 05:45 PM
How to change from grub boot loader to lilo boot loader linuxjamil Linux - Software 1 05-27-2008 01:47 PM
Two hard disks - dual boot ( XP - Linux ) using microsoft boot loader, not grub cristy88 Linux - General 2 12-17-2007 06:26 PM
Grub boot loader menu shows two linux boot options pramos Linux - Newbie 3 09-12-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration