LinuxQuestions.org
Review your favorite Linux distribution.
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 09-29-2010, 09:50 PM   #1
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,679
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Error: No such device <hex number>, Grub Rescue>


I installed LinuxMint on an external harddisk. I shutdown the laptop and removed the external harddisk. Then when I restarted the laptop (external harddisk was not attached) the laptop showed me the above stated error. Now I am not able to boot any OS on it untill I reconnect the external harddisk !

Help ! Help !
 
Old 09-29-2010, 11:02 PM   #2
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
You probably installed grub on the MBR of the internal disk.
When you boot grub will look for its secundary bootloader on the external disk.
Disk is not found, thus failure.

Best if you restore the MBR on the internal disk first.

After that check if your system BIOS supports selecting the boot disk during POST (most often F11 or F12)
If it does install grub on the external harddisk MBR.

___________________
Gerrard
 
Old 09-29-2010, 11:26 PM   #3
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,143
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Try re-installing grub using rescue mode!
 
Old 09-30-2010, 12:30 AM   #4
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,679
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thanks to both of you !

Quote:
Originally Posted by gdejonge View Post
Best if you restore the MBR on the internal disk first.

After that check if your system BIOS supports selecting the boot disk during POST (most often F11 or F12)
If it does install grub on the external harddisk MBR.
Kindly tell me how to do all this ? If there is some doc kindly point me to it ?
 
Old 09-30-2010, 01:01 AM   #5
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,143
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Really not sure about Linux Mint CD/DVD but all the rescue mode cds may work in this fashion only:

Boot from Linux Mint CD/DVD ---> Select Rescue Option ---> You will get command prompt:there you type

Quote:
fdisk -l
chmroot /mnt/sysimage
grub-install /dev/sdx
Note:Here you point to hard disk where you want to re-install grub
 
Old 09-30-2010, 01:06 AM   #6
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
From linux: check in the /boot directory of the external harddisk. There should be a 512 bytes size file called backup_mbr, boot.0800 or something like that. (Depends on the distribution you use).

With file <filename> it should give something like
Code:
# file backup_mbr
backup_mbr: x86 boot sector, ...................
You can write it back with dd
Code:
# dd if=backup_mbr of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 7.6657e-05 s, 6.7 MB/s
If you use windows: fdisk /mbr should do the trick

__________________
Gerrard
 
Old 09-30-2010, 01:10 AM   #7
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,143
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Thumbs up

Quote:
Originally Posted by gdejonge View Post
From linux: check in the /boot directory of the external harddisk. There should be a 512 bytes size file called backup_mbr, boot.0800 or something like that. (Depends on the distribution you use).

With file <filename> it should give something like
Code:
# file backup_mbr
backup_mbr: x86 boot sector, ...................
You can write it back with dd
Code:
# dd if=backup_mbr of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 7.6657e-05 s, 6.7 MB/s
If you use windows: fdisk /mbr should do the trick

__________________
Gerrard

Hi Gerrard,

Anisha wants to re-install grub; don't want to remove grub
 
Old 09-30-2010, 09:09 AM   #8
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,679
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Distribution : Linux Mint Fluxbox 9

Thanks to you, gdejonge.

I do not know what you are asking me to do. Below is the output: See if you can make out something out of it.

Could you point me out some good document which could explain me all this!
Code:
Eccentric-aquarian ~ # file backup_mbr
backup_mbr: ERROR: cannot open `backup_mbr' (No such file or directory)
Eccentric-aquarian ~ # locate mbr
/usr/lib/grub/i386-pc/g2ldr.mbr
/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/zi/America/Cambridge_Bay
/usr/lib/syslinux/mbr.bin
/usr/share/gimp/2.0/gimpressionist/Presets/Embroidery
/usr/share/pixmaps/pidgin/emotes/default/umbrella.png
/usr/share/vlc/lua/playlist/lelombrik.lua
/usr/share/zoneinfo/America/Cambridge_Bay
/usr/share/zoneinfo/posix/America/Cambridge_Bay
/usr/share/zoneinfo/right/America/Cambridge_Bay
/usr/src/linux-headers-2.6.32-22/include/linux/atmbr2684.h
/usr/src/linux-headers-2.6.32-22-generic/include/linux/atmbr2684.h
Eccentric-aquarian ~ # locate MBR
Eccentric-aquarian ~ # locate backup
/home/anisha/.mozilla/firefox/4ffd1pio.default/bookmarkbackups
/home/anisha/.mozilla/firefox/4ffd1pio.default/bookmarkbackups/bookmarks-2010-09-29.json
/usr/bin/mintbackup
/usr/bin/tdbbackup
/usr/lib/linuxmint/mintBackup/backup-data.svg
/usr/lib/linuxmint/mintBackup/backup-software.svg
/usr/share/doc/mintbackup
/usr/share/doc/mintbackup/changelog.gz
/usr/share/doc/mintbackup/copyright
/usr/share/icons/hicolor/48x48/mimetypes/application-x-backup.png
/usr/share/linuxmint/locale/af/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/am/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ar/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ast/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/be/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/bg/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/bn/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/bs/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ca/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/cs/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/csb/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/da/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/de/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/el/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/en_AU/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/en_GB/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/es/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/et/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/eu/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/fa/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/fi/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/fo/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/fr/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/gl/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/he/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/hi/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/hr/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/hu/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/id/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/is/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/it/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ja/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/jv/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/kk/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/kn/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ko/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/lb/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/lt/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/mk/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ml/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/mr/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ms/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/nb/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/nds/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/nl/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/nn/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/oc/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/pl/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/pt/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/pt_BR/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ro/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ru/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/sk/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/sl/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/sq/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/sr/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/sv/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ta/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/templates/mintbackup.pot
/usr/share/linuxmint/locale/th/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/tl/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/tr/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/uk/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/ur/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/vi/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/zh_CN/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/zh_HK/LC_MESSAGES/mintbackup.mo
/usr/share/linuxmint/locale/zh_TW/LC_MESSAGES/mintbackup.mo
/usr/share/man/man8/tdbbackup.8.gz
/usr/share/mime/application/x-backup.xml
/usr/share/mime/packages/mintbackup.xml
/usr/share/pixmaps/mintbackup.png
/var/backups
/var/backups/aptitude.pkgstates.0
/var/backups/dpkg.status.0
/var/lib/dpkg/info/mintbackup.list
/var/lib/dpkg/info/mintbackup.md5sums
/var/lib/dpkg/info/mintbackup.postinst
 
Old 09-30-2010, 09:13 AM   #9
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,679
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Code:
Eccentric-aquarian boot # ls -R
.:
abi-2.6.32-22-generic  config-2.6.32-22-generic  initrd.img-2.6.32-22-generic  System.map-2.6.32-22-generic  vmlinuz-2.6.32-22-generic
boot                   grub                      memtest86+.bin                vmcoreinfo-2.6.32-22-generic

./boot:
grub

./boot/grub:
linuxmint.png

./grub:
915resolution.mod  cpio.mod                     gcry_cast5.mod      hashsum.mod    minicmd.mod          pxeboot.img         trig.mod
acpi.mod           cpuid.mod                    gcry_crc.mod        hdparm.mod     minix.mod            pxecmd.mod          true.mod
affs.mod           crc.mod                      gcry_des.mod        hello.mod      mmap.mod             pxe.mod             udf.mod
afs_be.mod         crypto.lst                   gcry_md4.mod        help.mod       moddep.lst           raid5rec.mod        ufs1.mod
afs.mod            crypto.mod                   gcry_md5.mod        hexdump.mod    msdospart.mod        raid6rec.mod        ufs2.mod
aout.mod           datehook.mod                 gcry_rfc2268.mod    hfs.mod        multiboot2.mod       raid.mod            uhci.mod
ata.mod            date.mod                     gcry_rijndael.mod   hfsplus.mod    multiboot.mod        read.mod            usb_keyboard.mod
ata_pthru.mod      datetime.mod                 gcry_rmd160.mod     iso9660.mod    normal.mod           reboot.mod          usb.mod
at_keyboard.mod    diskboot.img                 gcry_seed.mod       jfs.mod        ntfscomp.mod         reiserfs.mod        usbms.mod
befs_be.mod        dm_nv.mod                    gcry_serpent.mod    jpeg.mod       ntfs.mod             relocator.mod       usbtest.mod
befs.mod           drivemap.mod                 gcry_sha1.mod       kernel.img     ohci.mod             scsi.mod            vbeinfo.mod
biosdisk.mod       echo.mod                     gcry_sha256.mod     keystatus.mod  part_acorn.mod       search_fs_file.mod  vbe.mod
bitmap.mod         efiemu32.o                   gcry_sha512.mod     linux16.mod    part_amiga.mod       search_fs_uuid.mod  vbetest.mod
bitmap_scale.mod   efiemu64.o                   gcry_tiger.mod      linuxmint.png  part_apple.mod       search_label.mod    vga.mod
blocklist.mod      efiemu.mod                   gcry_twofish.mod    linux.mod      part_gpt.mod         search.mod          vga_text.mod
boot.img           elf.mod                      gcry_whirlpool.mod  lnxboot.img    partmap.lst          serial.mod          video_fb.mod
boot.mod           example_functional_test.mod  gettext.mod         load.cfg       part_msdos.mod       setjmp.mod          video.lst
bsd.mod            ext2.mod                     gfxmenu.mod         loadenv.mod    part_sun.mod         setpci.mod          video.mod
bufio.mod          extcmd.mod                   gfxterm.mod         locale         parttool.lst         sfs.mod             videotest.mod
cat.mod            fat.mod                      gptsync.mod         loopback.mod   parttool.mod         sh.mod              xfs.mod
cdboot.img         font.mod                     grldr.img           lsmmap.mod     password.mod         sleep.mod           xnu.mod
chain.mod          fshelp.mod                   grub.cfg            ls.mod         password_pbkdf2.mod  tar.mod             xnu_uuid.mod
charset.mod        fs.lst                       grubenv             lspci.mod      pbkdf2.mod           terminal.lst        zfsinfo.mod
cmp.mod            functional_test.mod          gzio.mod            lvm.mod        pci.mod              terminal.mod        zfs.mod
command.lst        gcry_arcfour.mod             halt.mod            mdraid.mod     play.mod             terminfo.mod
configfile.mod     gcry_blowfish.mod            handler.lst         memdisk.mod    png.mod              test.mod
core.img           gcry_camellia.mod            handler.mod         memrw.mod      probe.mod            tga.mod

./grub/locale:
ast.mo  ca.mo  de.mo  fi.mo  fr.mo  hu.mo  id.mo  it.mo  nl.mo  ru.mo  sv.mo  zh_CN.mo
 
Old 10-01-2010, 10:25 AM   #10
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,679
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Someone rescue me !
 
Old 10-01-2010, 02:37 PM   #11
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Give me the version of grub you are using

sudo grub-install -v

If it is 1.97 or 1.98 (grub2) here is a tutorial I am using now. (Trying to convert my system to grub2)

grub2

or

grub2

One of the tutorials go into detail using a live cd for grub2 installs.

Last edited by Larry Webb; 10-01-2010 at 02:42 PM.
 
1 members found this post helpful.
Old 10-04-2010, 10:55 AM   #12
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,679
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thank you Larry,

Those are lengthy manuals and I'll read them on a holiday.

Code:
aquarius anisha # sudo grub-install -v
grub-install (GNU GRUB 1.98-1ubuntu5-1mint2)
 
Old 10-04-2010, 11:11 AM   #13
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I reread your original post and you need to restore your mbr. What operating system are you using on your internal hd?
 
Old 10-04-2010, 11:41 AM   #14
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,679
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thanks again,
Code:
Linux Mint 9 Isadora
What is the exact way to restore Mbr ?
 
Old 10-04-2010, 02:22 PM   #15
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Using a Mint as a live cd and

replace X with the number of your root partition and with one hd

sudo mount /dev/sdax /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda
sudo update-grub
reboot

Last edited by Larry Webb; 10-04-2010 at 02:27 PM.
 
  


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
GRUB error: unknown filesystem, grub rescue magnecticfield Linux - Newbie 28 07-30-2013 03:35 AM
Grub rescue error by unknown partition jeffinfrank Linux - Laptop and Netbook 2 04-28-2010 05:59 PM
Grub, device string replaced with 32 digit hexadecimal number. Caused Grub "error 11" VipX1 Linux - Newbie 3 10-19-2009 05:27 PM
Boot Error + GRUB + Rescue Mode najeebsyed2 Linux - Software 9 11-01-2007 09:08 AM
printing 64 bit hex number lilzz Linux - Newbie 8 08-20-2006 08:16 PM


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