Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was dual-booting Ubuntu 11.10 and Win7 from GRUB2 for some time. I recently replaced Ubuntu with Mint 12. Installation was successful, but when I restart my machine I receive "Error: no such device (some long string)" and the GRUB rescue prompt. I booted into Live Mint from a USB key ran the Ubuntu Boot Repair tool. I rebooted and GRUB2 started normally. Upon restarting, however, the GRUB2 rescue prompt returns.
I thought that maybe I had mistakenly installed GRUB2 on the USB key, so I booted into Live Mint again, ran Ubuntu Boot Repair, rebooted into Mint on my hard disk, removed the USB key, and ran Ubuntu Boot Repair a second time. I rebooted and GRUB2 started normally. Upon restarting, however, the rescue prompt returns.
Any help would be appreciated.
Here is output from fdisk -l:
Code:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa75536ca
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 113043455 56418304 7 HPFS/NTFS/exFAT
/dev/sda3 113043456 145813503 16385024 f W95 Ext'd (LBA)
/dev/sda4 145813504 156299263 5242880 27 Hidden NTFS WinRE
/dev/sda5 113045504 145813503 16384000 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf8e432ea
Device Boot Start End Blocks Id System
/dev/sdb1 * 156252158 419637247 131692545 5 Extended
/dev/sdb2 419637248 1229291519 404827136 7 HPFS/NTFS/exFAT
/dev/sdb3 1229291520 1250261679 10485080 27 Hidden NTFS WinRE
/dev/sdb5 156252160 179687423 11717632 82 Linux swap / Solaris
/dev/sdb6 179689472 411686911 115998720 83 Linux
/dev/sdb7 411688960 419637247 3974144 82 Linux swap / Solaris
Disk /dev/sdc: 4083 MB, 4083351552 bytes
128 heads, 63 sectors/track, 989 cylinders, total 7975296 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sdc1 * 56 7975295 3987620 c W95 FAT32 (LBA)
Here is the log from Boot Info Script:
Code:
Boot Info Script 0.60 from 17 May 2011
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
in partition 6 for .
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for on this drive.
=> Syslinux MBR (3.61-4.03) is installed in the MBR of /dev/sdc.
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /BOOT/BCD
sda2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe
sda3: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda4: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /BOOT/bcd
sdb1: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sdb5: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sdb6: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Linux Mint 12 Lisa
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
sdb7: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sdb2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sdb3: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /BOOT/bcd
sdc1: __________________________________________________________________________
File system: vfat
Boot sector type: SYSLINUX 3.86 2010-04-01
Boot sector info: Syslinux looks at sector 31068 of /dev/sdc1 for its
second stage. No errors found in the Boot Parameter
Block.
Operating System:
Boot files: /boot/grub/grub.cfg /syslinux/syslinux.cfg /ldlinux.sys
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 * 2,048 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 113,043,455 112,836,608 7 NTFS / exFAT / HPFS
/dev/sda3 113,043,456 145,813,503 32,770,048 f W95 Extended (LBA)
/dev/sda5 113,045,504 145,813,503 32,768,000 7 NTFS / exFAT / HPFS
/dev/sda4 145,813,504 156,299,263 10,485,760 27 Hidden NTFS (Recovery Environment)
Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdb1 * 156,252,158 419,637,247 263,385,090 5 Extended
/dev/sdb5 156,252,160 179,687,423 23,435,264 82 Linux swap / Solaris
/dev/sdb6 179,689,472 411,686,911 231,997,440 83 Linux
/dev/sdb7 411,688,960 419,637,247 7,948,288 82 Linux swap / Solaris
/dev/sdb2 419,637,248 1,229,291,519 809,654,272 7 NTFS / exFAT / HPFS
/dev/sdb3 1,229,291,520 1,250,261,679 20,970,160 27 Hidden NTFS (Recovery Environment)
Drive: sdc _____________________________________________________________________
Disk /dev/sdc: 4083 MB, 4083351552 bytes
128 heads, 63 sectors/track, 989 cylinders, total 7975296 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdc1 * 56 7,975,295 7,975,240 c W95 FAT32 (LBA)
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 1832E12C32E11014 ntfs SYSTEM
/dev/sda2 01CC469EEAC8D870 ntfs Windows
/dev/sda4 60E25E26E25E00A8 ntfs RECOVERY
/dev/sda5 B05462B554627E4A ntfs Programs
/dev/sdb2 B22A651B2A64DDBB ntfs Data
/dev/sdb3 32F88FA2F88F6349 ntfs RECOVERY
/dev/sdb5 0bdcd557-4f26-458a-b8d7-ccf3e343e10a swap
/dev/sdb6 2916083f-be31-430f-861f-c120fc6cdc74 ext4
/dev/sdb7 393d20e8-be73-4fca-9c36-46ef72f91b6b swap
/dev/sdc1 1CFA-0C71 vfat PENDRIVE
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sda1 /media/SYSTEM fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sdb6 /media/sdb6 ext4 (rw)
/dev/sdc1 /cdrom vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
=========================== sdb6/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 {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 2916083f-be31-430f-861f-c120fc6cdc74
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 2916083f-be31-430f-861f-c120fc6cdc74
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=10
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
if background_color 0,0,0; then
clear
fi
### 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 ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 12 64-bit, 3.0.0-12-generic (/dev/sdb6)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 2916083f-be31-430f-861f-c120fc6cdc74
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=2916083f-be31-430f-861f-c120fc6cdc74 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Linux Mint 12 64-bit, 3.0.0-12-generic (/dev/sdb6) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 2916083f-be31-430f-861f-c120fc6cdc74
echo 'Loading Linux 3.0.0-12-generic ...'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=2916083f-be31-430f-861f-c120fc6cdc74 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-12-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,msdos6)'
search --no-floppy --fs-uuid --set=root 2916083f-be31-430f-861f-c120fc6cdc74
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 2916083f-be31-430f-861f-c120fc6cdc74
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)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 1832E12C32E11014
chainloader +1
}
menuentry "Windows Recovery Environment (loader) (on /dev/sda4)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root 60E25E26E25E00A8
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows Recovery Environment (loader) (on /dev/sdb3)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos3)'
search --no-floppy --fs-uuid --set=root 32F88FA2F88F6349
drivemap -s (hd0) ${root}
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 ###
--------------------------------------------------------------------------------
=============================== sdb6/etc/fstab: ================================
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sdc6 during installation
UUID=2916083f-be31-430f-861f-c120fc6cdc74 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdc7 during installation
UUID=393d20e8-be73-4fca-9c36-46ef72f91b6b none swap sw 0 0
--------------------------------------------------------------------------------
=================== sdb6: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
173.819923401 = 186.637721600 boot/grub/core.img 1
191.808471680 = 205.952778240 boot/grub/grub.cfg 1
87.104492188 = 93.527736320 boot/initrd.img-3.0.0-12-generic 2
173.815616608 = 186.633097216 boot/vmlinuz-3.0.0-12-generic 1
87.104492188 = 93.527736320 initrd.img 2
173.815616608 = 186.633097216 vmlinuz 1
=========================== sdc1/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
menuentry "Start Linux Mint" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper quiet splash --
initrd /casper/initrd.lz
}
menuentry "Start Linux Mint (compatibility mode)" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper xforcevesa ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --
initrd /casper/initrd.lz
}
menuentry "Check the integrity of the medium" {
set gfxpayload=keep
linux /casper/vmlinuz boot=casper integrity-check quiet splash --
initrd /casper/initrd.lz
}
--------------------------------------------------------------------------------
========================= sdc1/syslinux/syslinux.cfg: ==========================
--------------------------------------------------------------------------------
default vesamenu.c32
menu background splash.jpg
menu title Welcome to Linux Mint
menu color border 0 #00eeeeee #00000000
menu color sel 7 #ffffffff #33eeeeee
menu color title 0 #ffeeeeee #00000000
menu color tabmsg 0 #ffeeeeee #00000000
menu color unsel 0 #ffeeeeee #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
label live
menu label Start Linux Mint
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz quiet splash --
menu default
label xforcevesa
menu label Start Linux Mint (compatibility mode)
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/mint.seed boot=casper xforcevesa initrd=/casper/initrd.lz ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --
label memtest
menu label Memory Test
kernel memtest
label local
menu label Boot from local drive
localboot 0x80 --------------------------------------------------------------------------------
=================== sdc1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
================= sdc1: Location of files loaded by Syslinux: ==================
GiB - GB File Fragment(s)
?? = ?? ldlinux.sys 1
?? = ?? syslinux/gfxboot.c32 1
?? = ?? syslinux/syslinux.cfg 1
?? = ?? syslinux/vesamenu.c32 1
============== sdc1: Version of COM32(R) files used by Syslinux: ===============
syslinux/gfxboot.c32 : COM32R module (v4.xx)
syslinux/vesamenu.c32 : COM32R module (v3.xx)
=============================== StdErr Messages: ===============================
unlzma: Decoder error
unlzma: Decoder error
Last edited by gavin526; 01-17-2012 at 01:33 PM.
Reason: add logs
This suggests the USB was (still) present when grub-update (aka grub-mkconfig) was run.
I fell into an identical "trapped" situation when I performed Synaptic package updates to an instance of debian-based distroX which I had installed (installed, not "LiveCD") to a USB pendrive. Post-install for one of the packages apparently called grub-update, which "messed up" my ability to boot from the debian-based distroY residing on the hard drive.
For me, the "fix" was to boot via USB pen, choosing the HDD-resident O/S entry from its boot menu... then remove the USB pen. Launch Synaptic package manager, filter to view "installed" packages then search for "grub" and re-install (or, upgrade) the 4 packages (grub-common etc). Immediately after the installation completed, I shutdown. Upon restart, the HDD boot was back-to-normal.
Thanks for the help. I tried your suggestion. I was able to use the live USB key to boot into Mint on my local disk, remove the USB key, and update GRUB. I was then able to reboot (not shutdown) and GRUB functioned normally. However, upon shutting down and powering back on, I encountered the same grub rescue prompt. The UUID of the device it cannot find is the UUID of my Mint partition. If I shutdown, reinsert the USB key, and power on, GRUB works normally. Any ideas?
Update: I can reach the GRUB menu if I hold the shift key while powering on.
Last edited by gavin526; 01-17-2012 at 06:15 PM.
Reason: added information about holding shift key
Details are fresh in my mind b/c that hiccup just happened this week. At the end of the session in which I updated grub on the O/S installed to HDD, I'm certain I performed "shutdown" rather than reboot. I don't know whether reboot vs full shutdown at that point would have turned out differently. FWIW, I didn't/don't need to use the shift key during boot.
Had my attempt failed, my next step would have been to boot system rescue CD http://www.sysresccd.org/
from a USB pen to try fixing the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.