Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2nd September 2009, 11:34 AM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
boot problems - GRUB - Error2 Bad file or dir type

I installed windows and havnt been able to boot to fedora since. Without a boot disk my machine complains 'BOOTMGR is missing'. If i use a boot disk to access grub on another linux partition (/dev/sda5) i can try to boot my fedora install using its old grub.conf settings. However this gives me the grub error:

Code:
root (hd0,0)
  Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-2.6.29.6-213.fc11.x86_64 ro root=UUID=63608748-e626-4a3f-9232-c836524f606f rhgb quiet

Error 2: Bad file or directory type
Darn grub thinks the file system type is ext2fs - this makes me think windows might have written something (prehaps its bootloader) to the first partition rather than the MBR.

Anyone got anythin i could try?
Reply With Quote
  #2  
Old 2nd September 2009, 01:20 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
windows_xp_2003ie
Quote:
Originally Posted by Mr tim esquire

Without a boot disk my machine complains 'BOOTMGR is missing'.
Hello Mr tim esquire,

I don't use Vista or Windows 7, but that looks like it would be an error message generated by partition boot sector code (similar to "NTLoader is missing" which I am very familiar with). To me, that means the wrong NTFS partition is being targeted by the Windows boot loader, but I wouldn't expect the Windows installer to make a mistake like that. I wonder if the new Windows system ever booted normally, or if post-installation changes were made to something.

Quote:
Originally Posted by Mr tim esquire

If i use a boot disk to access grub on another linux partition (/dev/sda5) i can try to boot my fedora install using its old grub.conf settings. However this gives me the grub error:
Code:
root (hd0,0)
  Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-2.6.29.6-213.fc11.x86_64 ro root=UUID=63608748-e626-4a3f-9232-c836524f606f rhgb quiet

Error 2: Bad file or directory type
That is probably happening because the Linux system in /dev/sda5 has a grub package version older than v0.97-21. That is the first version with the patch to allow GRUB to access files inside filesystems with 256-byte inodes. If it's a Fedora system, you can check that with rpm -qa | grep grub. If it's Debian or based on it, you can check the grub version with dpkg -l grub. Anyway, it was a common thing last summer when Fedora 9 was first released with 256-byte inodes, but the Fedora grub package for previous versions had not yet been patched.

Quote:
Originally Posted by Mr tim esquire

Darn grub thinks the file system type is ext2fs - this makes me think windows might have written something (prehaps its bootloader) to the first partition rather than the MBR.
Windows wrote MS boot code in the master boot record. It always does that. You can't stop it from doing that. So this happens all the time. You can boot the computer with your Fedora 11 DVD or the first CD of the CD set and re-install the Fedora 11 boot loader in the master boot record. You also can do it with a LiveCD. Then configure GRUB to boot the new Windows system.

Last edited by stoat; 2nd September 2009 at 02:22 PM.
Reply With Quote
  #3  
Old 3rd September 2009, 11:25 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
live cd

Fire up live CD -
Code:
grub> root (hd0,0)
Error 21: Selected disk does not exist
I cannot mount disk because default liveCD user does not have root permissions and is not on the sudoers list.

??
Reply With Quote
  #4  
Old 3rd September 2009, 11:41 PM
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,291
linuxopera
Quote:
I cannot mount disk because default liveCD user does not have root permissions and is not on the sudoers list.
Open a terminal, type 'su -', and press <ENTER> to get root user - no password needed (works for me: F11-LXDE Live, not installed yet). Then mount the desired drive/device (works for me).

V
Reply With Quote
  #5  
Old 3rd September 2009, 11:51 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
Thanks, I managed to mount the disk using the palimpsest tool but I ca't install grub:
Code:
grub>find /boot/grub/stage1
Error 1: File not found
grub>find /media/_/boot/grub/stage1
Error 1: File not found
but it is there! i can cat it!

The palimpsest tool tries to make my partition bootable but never finishes the job!

Any ideas?
Reply With Quote
  #6  
Old 4th September 2009, 01:05 AM
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,291
linuxopera
Palimpsest does not seem to come with LXDE - I don't have any such beast. Suggest you fall back to the old manual methods. Stoat is MIA this evening - try his tutorial "GRUB_, grub>, and more GRUBGRUBGRUB" in "Guides and Solutions" section.

V
Reply With Quote
  #7  
Old 4th September 2009, 01:46 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
windows_xp_2003ie
Quote:
Originally Posted by Mr tim esquire

Fire up live CD -
Code:
grub> root (hd0,0)
Error 21: Selected disk does not exist
I cannot mount disk because default liveCD user does not have root permissions and is not on the sudoers list.
Using the LiveCD to re-install GRUB involves a slightly different procedure. It's still easy. Just different. See more here...
http://forums.fedoraforum.org/showth...01#post1172001
P.S.: Get root privileges in the LiveCD with su or su -.

Last edited by stoat; 4th September 2009 at 01:52 AM.
Reply With Quote
  #8  
Old 6th September 2009, 02:02 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
I burnt the latest fedora live cd assuming it had a post 0.97-21 version of GRUB but im not so sure~? It did behave differently to other grub-on-liveCDs ive tried. But im still having porblems!

Code:
[liveuser@localhost ~]$ su -
[root@localhost ~]# grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> find /boot/grub/stage1
find /boot/grub/stage1
 (hd0,0)
 (hd0,4)
grub> root (hd0,0)
root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)       
setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  28 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+28 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
Looks like this has been sucessful but when i restart i still get the 'BOOTMGR is missing' error!


If i open a grub console there seems to be some problems to hand:

Code:
[root@localhost ~]# mkdir /mnt/temp
[root@localhost ~]# mount /dev/sdb1 /mnt/temp

[root@localhost ~]# grub-install --root-directory=/mnt/temp /dev/sdb1
/dev/sdb1 does not have any corresponding BIOS drive.

[root@localhost ~]# grub-install --recheck /dev/sdb1
grep: /boot/grub/device.map: No such file or directory
mv: cannot stat `/boot/grub/device.map': No such file or directory
Probing devices to guess BIOS drives. This may take a long time.
The file /boot/grub/stage1 not read correctly.

[root@localhost ~]# grub-install --recheck /dev/sdb
Probing devices to guess BIOS drives. This may take a long time.
The file /boot/grub/stage1 not read correctly.
Really want to get this going! what can i do?
Thanks Tim
Reply With Quote
  #9  
Old 6th September 2009, 03:25 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfedorafirefox
Quote:
Originally Posted by Mr tim esquire

[root@localhost ~]# mkdir /mnt/temp
[root@localhost ~]# mount /dev/sdb1 /mnt/temp

[root@localhost ~]# grub-install --root-directory=/mnt/temp /dev/sdb1
Hello Mr tim esquire,

You have more than one hard drive? And Fedora 11 is installed in /dev/sdb1? I didn't know that. From following your other threads, Fedora 11 was in /dev/sda5, and Kubuntu was in /dev/sda6. Some unspecified NTFS was /dev/sda7, and swap was /dev/sda8. Two more primary ext3 partitions were /dev/sda1 and /dev/sdb3. The extended was /dev/sda2.

So where is the new Windows system located nowadays? Maybe it is not booting because of drive boot order issues in BIOS. Windows requires a compatible primary active partition in the drive that boots from BIOS for its boot loader files. Your fdisk in your other threads never had that. Maybe its on the other drive. Maybe the BIOS drive boot order has been altered. Maybe that's true for Fedora, too, because that GRUB setup command seemed to succeed and displayed messages that stage1.5 was written to the DOS Compat Area of some hard drive and stage1 was written the master boot record. So Fedora should boot if that drive is first in the BIOS boot order.

It might help your readers to clarify all of that by posting the entire fdisk report run with all drives connected and running. And tell what each partition is used for.

P.S.: Maybe it's a good thing that grub-install command failed because it was aimed at a partition boot sector and not the master boot record like the GRUB shell command was. That could have broken something (like Windows) depending on what is in /dev/sdb1.

Last edited by stoat; 6th September 2009 at 03:45 PM.
Reply With Quote
  #10  
Old 6th September 2009, 11:53 PM
Mr tim esquire Offline
Registered User
 
Join Date: Mar 2008
Posts: 101
linuxfedorafirefox
Hi stoat thanks for the dedication¬! This is a different system to the one i was previously having problems with! The old version of grub must have been the problem in terms of getting fedora to boot. Using a CD i can now boot fedora OK. However if i dont use a boot disk i get the 'BOOTMGR is missing error'. I have CD and ZIP drives as my IDE slave and master. and 2 disks plugged into SATA. the boot order is OK, if i goto boot menu on startup both drives return the error.

Anyhow using a boot disk is slightly annoying, especially as i wanted to setup WOL but at least I've got my fedora back!
Reply With Quote
  #11  
Old 7th September 2009, 12:37 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
windows_xp_2003ie
Quote:
Originally Posted by Mr tim esquire

The old version of grub must have been the problem in terms of getting fedora to boot. Using a CD i can now boot fedora OK.
If I understand you correctly, you can now boot up Fedora 11 using that CD. If that is true, then there is no better place from which to re-install Fedora's GRUB boot loader than the running system itself (IMO). In Fedora 11, do your grub-install /dev/sda or the GRUB shell method that you did before. Reboot and I would expect the Fedora 11 GRUB to be launched directly from BIOS. Then tweak the grub.conf to boot Windows if it is capable of booting.

P.S.: I still have no explanation for why Windows did not boot directly from BIOS after re-installing it. That's what it usually does. It takes back the master boot record for it own boot strapping code, and it usually does not botch the boot loader arrangement (never for me).

Last edited by stoat; 7th September 2009 at 01:04 AM.
Reply With Quote
Reply

Tags
bad, boot, dir, error2, file, grub, problems, type

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct grub.conf file for dual boot on same SATA drive jeepfreak Installation, Upgrades and Live Media 17 9th April 2007 06:58 PM
editing the /boot/grub/grub.conf file Debaser13 Using Fedora 10 10th June 2005 05:40 PM
Automatic type text , delete file and save file problem shown in FC3 and FC2 kalpana EOL (End Of Life) Versions 1 10th June 2005 04:50 AM
apending "/boot/grub/grub.conf" file // need some help... I-1 Using Fedora 5 4th May 2005 01:27 PM
GRUB boot problems gonzalo76 Using Fedora 9 4th January 2005 01:12 PM


Current GMT-time: 10:20 (Monday, 28-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat