LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-13-2011, 02:41 PM   #31
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1

Quote:
Originally Posted by Bob32 View Post
But where is that file exactly ?
(I'm using the ubuntu live cd)
/boot/grub/grub.conf: No such file or directory
/boot/grub/menu.lst: No such file or directory
Sorry, looks like Ubuntu calls it grub.cfg. Just use the commands above but for the sed command cat out /boot/grub/grub.cfg instead of grub.conf

i.e. boot into maintenance mode and run these two commands:

Code:
mount -o remount,rw /
Code:
cat /boot/grub/grub.cfg | sed s/hd1/hd0/g
then reboot and test.

Last edited by Brocifer; 03-13-2011 at 02:43 PM.
 
Old 03-13-2011, 02:50 PM   #32
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
cat: /boot/grub/grub.cfg: No such file or directory
As a matter of fact, /boot/grub is empty except for the file grubenv which contains "#" characters.
By the way, I don't know what maintenance mode means.

Last edited by Bob32; 03-13-2011 at 02:51 PM.
 
Old 03-13-2011, 02:52 PM   #33
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
cat: /boot/grub/grub.cfg: No such file or directory
As a matter of fact, /boot/grub is empty except for the file grubenv which contains "#" characters.
Doesn't sound like you're in maintenance mode, sorry not real familiar w/ Ubuntu.

What is the output of:

Code:
mount -l

Last edited by Brocifer; 03-13-2011 at 02:54 PM. Reason: Added code tag, whoops!
 
Old 03-13-2011, 02:56 PM   #34
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
No I'm the one who's sorry, I don't know what 'maintenance mode' means so it's likely I'm not in it. How do I go into that mode ?
 
Old 03-13-2011, 02:57 PM   #35
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
No I'm the one who's sorry, I don't know what 'maintenance mode' means so it's likely I'm not in it. How do I go into that mode ?
Don't worry about it, not a problem. Just post the mount output please.
 
Old 03-13-2011, 02:58 PM   #36
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
ubuntu@ubuntu:~$ mount -l
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
/dev/sr0 on /cdrom type iso9660 (ro,noatime) [Ubuntu 10.04.2 LTS amd64]
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
 
Old 03-13-2011, 03:06 PM   #37
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
ubuntu@ubuntu:~$ mount -l
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
/dev/sr0 on /cdrom type iso9660 (ro,noatime) [Ubuntu 10.04.2 LTS amd64]
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
Try the following then:

Code:
grub
Code:
root (hd0,0)
Code:
setup (hd0)
Code:
quit
If it seems to work, attempt a reboot (without the CD)

Last edited by Brocifer; 03-13-2011 at 04:50 PM.
 
Old 03-13-2011, 03:10 PM   #38
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
The program 'grub' is currently not installed. You can install it by typing:
sudo apt-get install grub
so i did that.
then
root (hd0,0)
Error 21: Selected disk does not exist

Last edited by Bob32; 03-13-2011 at 03:12 PM.
 
Old 03-13-2011, 03:12 PM   #39
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
The program 'grub' is currently not installed. You can install it by typing:
sudo apt-get install grub
Does this work?

Code:
chroot /mnt/sysimage
 
Old 03-13-2011, 03:13 PM   #40
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
chroot /mnt/sysimage
chroot: cannot change root directory to /mnt/sysimage: No such file or directory

ps: I edited my last post
 
Old 03-13-2011, 03:17 PM   #41
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
chroot /mnt/sysimage
chroot: cannot change root directory to /mnt/sysimage: No such file or directory

ps: I edited my last post
So you're getting into the grub prompt?
 
Old 03-13-2011, 03:19 PM   #42
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Come again ?
I am in the live ubuntu cd right now.
The last time I booted, it went straight to seven, so I have no reason to doubt that is still is the case since I don't recall having done anything special.
Do you want me to test again ?

edit: ah sorry you meant the grub prompt of the grub command, I thought you were speaking of the grub menu at boot time, because I was confounded a few posts back as I didn't know the right word, and I thought you'd be using my words to help me out.
So, yes I can get the grub prompt by typing grub in the console, after I have installed that software.

I then typed root (hd0,0) in the grub prompt, which gave the output:
Error 21: Selected disk does not exist
Do you want me to type something else in the grub prompt ?

Last edited by Bob32; 03-13-2011 at 03:23 PM.
 
Old 03-13-2011, 03:26 PM   #43
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
Come again ?
I am in the live ubuntu cd right now.
The last time I booted, it went straight to seven, so I have no reason to doubt that is still is the case since I don't recall having done anything special.
Do you want me to test again ?

edit: ah sorry you meant the grub prompt of the grub command, I thought you were speaking of the grub menu at boot time, because I was confounded a few posts back as I didn't know the right word, and I thought you'd be using my words to help me out.
So, yes I can get the grub prompt by typing grub in the console, after I have installed that software.

I then typed root (hd0,0) in the grub prompt, which gave the output:
Error 21: Selected disk does not exist
Do you want me to type something else in the grub prompt ?
Yes, try this at the grub prompt:

Code:
device (hd0,0) /dev/sda
then

Code:
root (hd0,0)
Code:
setup (hd0)
Code:
quit
 
Old 03-13-2011, 03:27 PM   #44
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
grub> device (hd0,0) /dev/sda
device (hd0,0) /dev/sda

Error 15: File not found
 
Old 03-13-2011, 03:28 PM   #45
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
I am about to sign-off from LQ for today, but before I do so, there is some confusion that really needs to be cleared up before the OP and Brocifer get into an even bigger tangle.

Bob32 is running not in "Maintenance mode", but from a live CD.

His ubuntu root partition isn't mounted so he cannot edit /boot/grub/grub.cfg

Even if he mounted it he could not directly edit it (even as root) because it is a file with perms r--r--r--
and the first lines read:
Code:
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
Bob32 is trying to install grub2 not "grub legacy". They are very different.

Bob32 needs to reinstall grub to the MBR of which ever HDD he has set his computer to boot from, pointing grub at his ubuntu root partition (wherever that is now). See post #4.

After a reboot to ubuntu he needs to run
Code:
sudo update-grub
to find his windows installations, and then reboot once more to see them listed.

I'm off for some food and sleep now.
 
  


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
Valgrind / loader / $ORIGIN issue jim2718 Linux - Software 1 12-17-2010 06:15 PM
reformat/boot loader issue babag Mandriva 2 06-16-2007 03:35 AM
boot loader issue tm2383 Fedora 1 11-02-2006 12:46 PM
Ahh help! (Grub Boot Loader Issue). RoaCh Of DisCor Linux - Software 9 09-09-2004 05:39 AM
grub boot loader issue mbegovic Linux - Software 2 04-17-2004 05:59 PM


All times are GMT -5. The time now is 10:40 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