[Solved] Grub problem: Grub Rescue

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

For some reason I can't label it. I can only flag it. I can only label my NTFS partition in sdb
Here's the command inputs:

Code: Select all

mint mint # mount/dev/sdb1 /media/SDB1
bash: mount/dev/sdb1: No such file or directory
mint mint # sudo gparted
======================
libparted : 2.3
======================
ls /media
I think I'm not able to fix it myself ;'(

Oh, nvm. I just had to unmount the drive :p
Last edited by 7rozen_7ear_ on Sat Feb 12, 2011 8:28 am, edited 1 time in total.
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
Please run GP, maybe you must "unmount" sdb1, afterwards it must be possible to edit the label: 48f7fe4d-eb94-4711-a9dc-ee54d409adf4 -> rootMint.
After having rebooted, open a Terminal, and the best (first action in Terminal, every time on live medium) would be: first type "sudo su" to have root rights for all commands:

Code: Select all

mint@mint ~ $ sudo su

Code: Select all

mint mint # blkid
- "#" shows: root rights -
You should see:

Code: Select all

/dev/loop0: TYPE="squashfs" 
... 
/dev/sdb1: LABEL="rootMint" UUID="48f7fe4d-eb94-4711-a9dc-ee54d409adf4" TYPE="ext4" 
...
mint mint # 
[/color]
I suggest: please do that, staying on live medium - as root in Terminal - and post from there, then I will give you the next command(s).
Step by step we should locate the problem.
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

I see you're online atm, could u pls at me in your msn list? I'll go online by ebuddy. Is that ok?

Here's the information u asked for:

Code: Select all

/dev/loop0: TYPE="squashfs" 
/dev/sdb1: LABEL="rootMint" UUID="48f7fe4d-eb94-4711-a9dc-ee54d409adf4" TYPE="ext4" 
/dev/sdb3: UUID="09B1A9E70C88019E" TYPE="ntfs" 
/dev/sda1: LABEL="Door systeem gereserveerd" UUID="62FA8E2FFA8DFF91" TYPE="ntfs" 
/dev/sda2: UUID="44C87660C8764FE2" TYPE="ntfs" 
/dev/sda5: UUID="76c405b5-5045-4883-9e0f-429670371159" TYPE="swap"
Door systeem gereserveerd = Reserved by (file)system

I'm happy I can do this the Linux-way cuz I'm getting some knowledge bout the terminal :D
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
I have a hardware problem and my vacation starts at Monday, so afterwards I will be offline for several weeks.
We should try to solve the problem today - I will stay here most time of the day.
Please perform all suggested steps and report - from live medium.
seeley

Edit:
I did not see your complete post. First step done. As root (sudo su) >
Now - error message "... can't create, exists..." can be ignored:

Code: Select all

mkdir /media/rootMint
and then:

Code: Select all

mount /dev/sdb1 /media/rootMint
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

Code: Select all

mint mint #     mkdir /media/rootMint
mint mint #     mount /dev/sdb1 /media/rootMintµ
mount: mount point /media/rootMintµ does not exist
mint mint #     mount /dev/sdb1 /media/rootMint
Done, no complications (the µ is just an enter fail ;p)

Edit:

I tried to go on:

Code: Select all

mint mint #     sudo grub-setup -d /media/rootMint/boot/grub /dev/sdb
Segmentation fault
mint mint #     sudo grub-setup -d /media/rootMint/boot/grub /dev/sda
Segmentation fault
mint mint #     sudo grub-setup -d /media/rootmint/boot/grub /dev/rootmint
Segmentation fault
This may be usefull, idk
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
Okay. Next steps: (you are root?!)

Code: Select all

cd /media

Code: Select all

ls -l
- lowercase "L" like list

You should see > rootMint

Code: Select all

cd rootMint
You should see > ...,boot,...

Code: Select all

cat boot/grub/grub.cfg
copy and save and post.
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

Ok, here it is:

Code: Select all

mint mint #     cd /media
mint media #     ls -l
total 4
drwxr-xr-x 21 root root 4096 2011-02-10 19:28 rootMint
mint media #     cd rootMint
mint rootMint #     cat boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
}

if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Linux Mint 10 64-bit, 2.6.35-22-generic (/dev/sdb1)' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set 48f7fe4d-eb94-4711-a9dc-ee54d409adf4
	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=48f7fe4d-eb94-4711-a9dc-ee54d409adf4 ro   quiet splash
	initrd	/boot/initrd.img-2.6.35-22-generic
}
menuentry 'Linux Mint 10 64-bit, 2.6.35-22-generic (/dev/sdb1) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set 48f7fe4d-eb94-4711-a9dc-ee54d409adf4
	echo	'Loading Linux 2.6.35-22-generic ...'
	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=48f7fe4d-eb94-4711-a9dc-ee54d409adf4 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set 48f7fe4d-eb94-4711-a9dc-ee54d409adf4
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set 48f7fe4d-eb94-4711-a9dc-ee54d409adf4
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set 62fa8e2ffa8dff91
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
mint rootMint # 
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
Everything - as fare as I see - seems to be okay.
You are on Terminal as root, see if sdb1 is mounted:

Code: Select all

mount
You should see maybe 6 - 12 lines, one containing "...sdb1 on rootMint..."
Next, last and important command on live medium:

Code: Select all

sudo grub-setup -d /media/rootMint/boot/grub /dev/sda
Afterwards reboot - without live medium - and:
no error -> boot to Mint Desktop and there Terminal:

Code: Select all

sudo update-grub
reboot again, boot to mint from hd and report.
If any error message, please report.
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

Code: Select all

mint rootMint #     mount
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
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)
/dev/loop0 on /rofs type squashfs (ro,noatime)
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)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/mint/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mint)
/dev/sdb1 on /media/rootMint type ext4 (rw)
mint rootMint #     sudo grub-setup -d /media/rootMint/boot/grub /dev/sda
Segmentation fault
Hey, is the segmentation fault normal?
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
Please try the command without "sudo" - if you are root (you see it : ...mint... #).
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

seeley wrote:Hi!
Please try the command without "sudo" - if you are root (you see it : ...mint... #).
seeley
Hey, I just rebooted my laptop. (still got the rescue message like you expected ;p)

Here's the new output:

Code: Select all

mint mint #     mkdir /media/rootMint
mint mint #     mount /dev/sdb1 /media/rootMint
mint mint #     grub-setup -d /media/rootMint/boot/grub /dev/sda
grub-setup: error: cannot stat /media/rootMint/boot/grub/boot.img.
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
To see if your boot.img exists: Open Terminal: (if open, close and reopen)

Code: Select all

sudo su

Code: Select all

ls -l
You see "rootMint" >

Code: Select all

mount /dev/sdb1 /media/rootMint
"...mounted or busy..." can be ignored

Code: Select all

cd rootMint

Code: Select all

cd boot

Code: Select all

cd grub

Code: Select all

ls -l
You should see many lines, one containing "...-rw-....root 512... boot.img"
If not, you have to make a fresh installation,
if yes, the file can be corrupted (we can not see it - only suppose).
Plaese report; stay on live medium.
seeley
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
To see if your boot.img exists: Open Terminal: (if open, close and reopen)

Code: Select all

sudo su

Code: Select all

ls -l
You see "rootMint" >

Code: Select all

mount /dev/sdb1 /media/rootMint
"...mounted or busy..." can be ignored

Code: Select all

cd rootMint

Code: Select all

cd boot

Code: Select all

cd grub

Code: Select all

ls -l
You should see many lines, one containing "...-rw-....root 512... boot.img"
If not, you have to make a fresh installation,
if yes, the file can be corrupted (we can not see it - only suppose).
Plaese report; stay on live medium.
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

Hey,

Code: Select all

mint mint # ls -l
total 0
drwxr-xr-x 2 mint mint 60 2011-02-12 14:35 Desktop
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Documents
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Downloads
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Music
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Pictures
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Public
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Templates
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Videos
mint mint #     mount /dev/sdb1 /media/rootMint
mount: /dev/sdb1 already mounted or /media/rootMint busy
mount: according to mtab, /dev/sdb1 is already mounted on /media/rootMint
mint mint #     cd rootMint
bash: cd: rootMint: No such file or directory
mint mint #     cd boot
bash: cd: boot: No such file or directory
mint mint #     cd grub
bash: cd: grub: No such file or directory
mint mint #     ls -l
total 0
drwxr-xr-x 2 mint mint 60 2011-02-12 14:35 Desktop
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Documents
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Downloads
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Music
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Pictures
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Public
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Templates
drwxr-xr-x 2 mint mint 40 2011-02-12 13:36 Videos
mint mint # 
I was looking at other linux distros ;p Just for fun, not to use atm xD that's why it took so long ;p
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
Last possibility: Please try it in any case: [ my help/ install GRUB"2" ]:
reboot to live medium, "umount" sdb1 with GP
Then Terminal as root:

Code: Select all

mount /dev/sdb1 /mnt

Code: Select all

mount --bind /dev/ /mnt/dev

Code: Select all

grub-install --root-directory=/mnt /dev/sda
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

Code: Select all

mint mint # mount /dev/sdb1 /mnt
mint mint #     mount --bind /dev/ /mnt/dev
mint mint #     grub-install --root-directory=/mnt /dev/sda
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Here is the information.
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
Please try: as root

Code: Select all

apt-get install grub-common grub-pc os-prober --reinstall 
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

Hey:

Code: Select all

mint mint # mkdir /media/rootMint
mkdir: cannot create directory `/media/rootMint': File exists
mint mint # mount /dev/sdb1 /media/rootMintµ
mount: mount point /media/rootMintµ does not exist
mint mint # mount /dev/sdb1 /media/rootMint
mint mint # apt-get install grub-common grub-pc os-prober --reinstall 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 103 not upgraded.
Need to get 0B/2,389kB of archives.
After this operation, 0B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 134423 files and directories currently installed.)
Preparing to replace grub-common 1.98+20100804-5ubuntu3-1mint1 (using .../grub-common_1.98+20100804-5ubuntu3-1mint1_amd64.deb) ...
Unpacking replacement grub-common ...
Preparing to replace grub-pc 1.98+20100804-5ubuntu3-1mint1 (using .../grub-pc_1.98+20100804-5ubuntu3-1mint1_amd64.deb) ...
Unpacking replacement grub-pc ...
Preparing to replace os-prober 1.39 (using .../os-prober_1.39_amd64.deb) ...
Unpacking replacement os-prober ...
Processing triggers for man-db ...
Processing triggers for install-info ...
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
/usr/sbin/update-info-dir: line 46: /usr/bin/ginstall-info: Input/output error
Processing triggers for ureadahead ...
Setting up grub-common (1.98+20100804-5ubuntu3-1mint1) ...
Setting up grub-pc (1.98+20100804-5ubuntu3-1mint1) ...
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
grub-probe: error: cannot find a device for / (is /dev mounted?).
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
Setting up os-prober (1.39) ...
The last (and crucial part):

Code: Select all

grub-probe: error: cannot find a device for /boot (is /dev mounted?).
grub-probe: error: cannot find a device for / (is /dev mounted?).
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
I don't think it works =p Could u pm me your live/msn mail so I can add you to my msn contacts? It's way easier to communicate that way
seeley

Re: Grub problem: Grub Rescue

Post by seeley »

Hi!
Maybe the problem is that you have 2 hard disks. At the moment I don't have another idea.
Sorry. But I will search a while.
The file is: boot/grub/device.map.
seeley
7rozen_7ear_

Re: Grub problem: Grub Rescue

Post by 7rozen_7ear_ »

seeley wrote:Hi!
Maybe the problem is that you have 2 hard disks. At the moment I don't have another idea.
Sorry. But I will search a while.
seeley
OK, thx for your help so far.
I think that the source of the problem is that I originally installed LM9 on my sda drive. I just formatted that partition and installed LM10 on a new partition located in my sdb drive. I could just restore the original windows MBR files, i think, using PartitionMagic (cuz it uses Super Grub Disk or something like that). If I'd do that I think I would be able to install grub on my sdb drive (by reinstalling LM10 maybe or by apt-get). The original file is restored and it will be edited by the new grub 2 with, I think, removes the problem. Could this be correct to assume?
Locked

Return to “Installation & Boot”