LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   loader issue (https://www.linuxquestions.org/questions/linux-newbie-8/loader-issue-868254/)

Brocifer 03-13-2011 01:41 PM

Quote:

Originally Posted by Bob32 (Post 4289355)
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.

Bob32 03-13-2011 01:50 PM

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.

Brocifer 03-13-2011 01:52 PM

Quote:

Originally Posted by Bob32 (Post 4289374)
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

Bob32 03-13-2011 01:56 PM

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 ?

Brocifer 03-13-2011 01:57 PM

Quote:

Originally Posted by Bob32 (Post 4289377)
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.

Bob32 03-13-2011 01:58 PM

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)

Brocifer 03-13-2011 02:06 PM

Quote:

Originally Posted by Bob32 (Post 4289381)
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)

Bob32 03-13-2011 02:10 PM

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

Brocifer 03-13-2011 02:12 PM

Quote:

Originally Posted by Bob32 (Post 4289399)
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

Bob32 03-13-2011 02:13 PM

chroot /mnt/sysimage
chroot: cannot change root directory to /mnt/sysimage: No such file or directory

ps: I edited my last post

Brocifer 03-13-2011 02:17 PM

Quote:

Originally Posted by Bob32 (Post 4289403)
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?

Bob32 03-13-2011 02:19 PM

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 ?

Brocifer 03-13-2011 02:26 PM

Quote:

Originally Posted by Bob32 (Post 4289410)
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

Bob32 03-13-2011 02:27 PM

grub> device (hd0,0) /dev/sda
device (hd0,0) /dev/sda

Error 15: File not found

tredegar 03-13-2011 02:28 PM

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.


All times are GMT -5. The time now is 12:04 AM.