LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 05-11-2007, 02:15 PM   #16
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled

Quote:
The things you mention in post #1 should have resolved the problem - you aren't doing this on a Core Duo by any chance ???.
Installing GRUB involves also copying stage 1.5 file where it is accessible for GRUB initial code, usually first sectors of the HDD, before first partition. The sole purpose of stage 1.5 is to deal with root filesystem. How could GRUB possibly install itself correctly without access to proper stage 1.5 file?
 
Old 05-11-2007, 02:45 PM   #17
bear^
LQ Newbie
 
Registered: May 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
The things you mention in post #1 should have resolved the problem - you aren't doing this on a Core Duo by any chance ???.
Core duo is dual core? If not, what is it.

Under partition in gnome my ntfs partition is flagged /boot. Now in device.map there stands something like hdo0 = /dev/hda something (dont know if its writen correctly, i dont have the linux computer here at work).

Dos this have anything to do with my problems?
 
Old 05-11-2007, 05:54 PM   #18
bear^
LQ Newbie
 
Registered: May 2007
Posts: 24

Original Poster
Rep: Reputation: 15
OK, after entering gedit /boot/grub/grub.conf i get a blank file. With the less command i get no sutch file or directory.

Here are the result for the fdisk -l command.

Device Boot Start End Blocks Id System
/dev/hda1 1 16708 134206978+ 7 HPFS/NTFS
/dev/hda2 * 16709 18759 16474657+ 83 Linux
/dev/hda3 18760 19457 5606685 82 Linux swap / Solaris
 
Old 05-11-2007, 06:38 PM   #19
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Is there /boot/grub/menu.lst file?

Edit: Hey, did you mount hda2?

Last edited by Emerson; 05-11-2007 at 06:41 PM.
 
Old 05-11-2007, 06:44 PM   #20
bear^
LQ Newbie
 
Registered: May 2007
Posts: 24

Original Poster
Rep: Reputation: 15
i typed "gedit /boot/grub/menu.lst" and there opend a empty file.

Seems like there are no menu.lst file. Using the LiveCD, i browsed the filesystem device and in the boot map theres no grub folder.

edit: seems like i cant mount hda2. If im doing it correct that is. Typed sudo mount /dev/hda2 and nothing and typed mount /dev/hda2, nothing.

ubuntu@ubuntu:~$ mount /dev/hda2
mount: can't find /dev/hda2 in /etc/fstab or /etc/mtab
ubuntu@ubuntu:~$ sudo mount hda2
mount: can't find hda2 in /etc/fstab or /etc/mtab
ubuntu@ubuntu:~$ sudo mount /dev/hda2
mount: can't find /dev/hda2 in /etc/fstab or /etc/mtab

Last edited by bear^; 05-11-2007 at 06:46 PM.
 
Old 05-11-2007, 06:56 PM   #21
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
mkdir /mnt/ubuntu
mount -t ext3 /dev/hda2 /mnt/ubuntu

This will make your Linux partition available under /mnt/ubuntu.

Type man mount for help.
 
Old 05-11-2007, 07:03 PM   #22
bear^
LQ Newbie
 
Registered: May 2007
Posts: 24

Original Poster
Rep: Reputation: 15
I hope this is corret. I typed gedit /mnt/ubuntu/boot/grub/menu.lst and something with text poped up.

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/hda2 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title Ubuntu, kernel 2.6.15-26-386
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.15-26-386
savedefault
boot

title Ubuntu, kernel 2.6.15-26-386 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.15-26-386
boot

title Ubuntu, memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

I hope thats correct :P
 
Old 05-11-2007, 07:10 PM   #23
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
OK, can't see anything wrong here. Let's try to re-install GRUB now.

chroot /mnt/ubuntu grub-install --recheck /dev/hda

This is from memory, you may want to check it if it does not work.
 
Old 05-11-2007, 07:12 PM   #24
bear^
LQ Newbie
 
Registered: May 2007
Posts: 24

Original Poster
Rep: Reputation: 15
chroot: cannot change root directory to /mnt/ubuntu: Operation not permitted


Im sorry if im a pain in the neck, i dont mean to be one

Edit:

Tried the Sudo in front, got this: /dev/hda: Not found or not a block device.

Last edited by bear^; 05-11-2007 at 07:13 PM.
 
Old 05-11-2007, 07:35 PM   #25
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Hmmm ... try:

sudo mount -o bind /dev /mnt/ubuntu/dev

and then the grub-install thing.
 
Old 05-12-2007, 06:36 AM   #26
bear^
LQ Newbie
 
Registered: May 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Tried it, got this:

mkdir: cannot create directory `/boot/grub': Permission denied

Typed grub-install --recheck /dev/hda

Then i tried with the sudo in front, got this:

Could not find device for /boot: Not found or not a block device.
 
Old 05-12-2007, 07:16 AM   #27
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
You issued these commands:

sudo mount -o bind /dev /mnt/ubuntu/dev
sudo chroot /mnt/ubuntu grub-install --recheck /dev/hda

And this was the response?

mkdir: cannot create directory `/boot/grub': Permission denied
 
Old 05-12-2007, 07:21 AM   #28
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Look, I do not know a thing about Ubuntu. Can you use the Ubuntu CD to boot up into your installation in rescue mode or something?
 
Old 05-12-2007, 07:58 AM   #29
bear^
LQ Newbie
 
Registered: May 2007
Posts: 24

Original Poster
Rep: Reputation: 15
I might have made a typo somwhere along the line, tried it again, this is the respond:

ubuntu@ubuntu:~$ sudo mount -o bind /dev /mnt/ubuntu/dev
ubuntu@ubuntu:~$ sudo chroot /mnt/ubuntu grub-install --recheck /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Due to a bug in xfs_freeze, the following command might produce a segmentation
fault when /boot/grub is not in an XFS filesystem. This error is harmless and
can be ignored.
xfs_freeze: specified file ["/boot/grub"] is not on an XFS filesystem
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/hda
 
Old 05-12-2007, 08:04 AM   #30
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
Looks good. Did you try booting from HDD now? Do you still get error 17?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
apache2 heap overflow error ? jalfaro Linux - Software 0 06-29-2006 03:43 PM
heap or stack yashwantpinge Programming 1 03-17-2006 08:25 AM
Is array allocated on heap set to zero? nibbler Programming 3 12-14-2005 03:55 AM
increasing heap size podollb Linux - Software 3 03-07-2005 12:42 AM
Modifying the heap available to a process exitsfunnel Linux - Software 0 12-10-2003 10:20 PM


All times are GMT -5. The time now is 02:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration