LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-28-2009, 05:04 AM   #1
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Rep: Reputation: 30
Grub confused about File System


Hi,

I'm experimenting with a Slackware-based distro (Kongoni) which seems to have issues with Reiserfs.

I changed the file system to ext3 using cfdisk to rewrite the partition table and mkfs.ext3 to format the partition.

Now Grub refuses to boot the partition: I get
Code:
Error 2: bad file or directory type.
Dropping into the grub command line, if I do the following:
Code:
grub> find(hd0,2)/
and hit 'tab' grub cannot read the partition and cannot list the contents of the partition.

If I boot with Puppy, I can list the contents of the Partition, but Puppy says that it is still a Rieserfs.
Fdisk -l produces the following:
Code:
Disk /dev/sda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         973     7815591    c  W95 FAT32 (LBA)
/dev/sda2   *         974        1181     1670760   83  Linux
/dev/sda3            1182        2479    10426185   83  Linux
/dev/sda4            2480        3738    10112917+   5  Extended
/dev/sda5            2480        3607     9060628+  83  Linux
/dev/sda6            3608        3738     1052226   82  Linux swap / Solaris
Does Grub get the type of Partition from somewhere? It appears to read from somewhere that the Partition type is Reiserfs and then gets confused because it is an ext3 partition.

Does anyone know how I can pass on the correct information to Grub?

An additional complication which may or may not have a bearing on this is that my HD is an IDE hard drive, and, as such, actually uses the hda nomenclature rather than the sda which the Puppy Grub install uses.

However, I doubt that this has any bearing as I have been able to boot up using this configuration previously.
 
Old 05-28-2009, 05:27 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by cov View Post
grub> find(hd0,2)/
Hopefully that is a typo - you need a space after the "find".

If both grub and puppy say you (still) have a reiser partition, I'd be prepared to believe them. They will both look at the filesystem meta-data in the partition itself to figure that out.
I suspect grub can handle reiserfs (aka reiser 3), but not reiser4 - but I don't use either.
 
Old 05-28-2009, 06:08 AM   #3
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by syg00 View Post
Hopefully that is a typo - you need a space after the "find".

If both grub and puppy say you (still) have a reiser partition, I'd be prepared to believe them. They will both look at the filesystem meta-data in the partition itself to figure that out.
I suspect grub can handle reiserfs (aka reiser 3), but not reiser4 - but I don't use either.
Yes, Grub can boot the Reiserfs. Indeed, the Fat32 partition in my fdisk -l result is actually an xfs partition and Grub has no problem with that.

The partition is definitely ext3, I've run fsck.ext3 on it.

On the Puppy Desktop it refers to it (in the hints when I pass the mouse over it) as Reiserfs, but the Pmount utility correctly identifies it as ext3.

I'm convinced that there is some information somewhere which is identifying the partition to Grub (and the Puppy Desktop) as Reiserfs.

What I think I'll do is trash my Puppy partition (which has the grub install on it) and re-install Puppy and Grub.
 
Old 05-28-2009, 06:35 AM   #4
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Well, that didn't work.

The Puppy Desktop is now correctly listing the partition as ext3, but Grub still says "Error 2: bad file or directory type."

If grub is reading erroneous information I suppose it might be in the MBR.

Time to trash my MBR!
 
Old 05-28-2009, 06:47 AM   #5
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Nope.

I trashed the MBR and rewrote it. Grub still can't see the file system.
 
Old 05-28-2009, 06:56 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Since you formatted the partition and also made a new ext3 filesystem how is it going to keep essential grub files.
Normally grub files are present in the
/boot/grub
directory.
 
Old 05-28-2009, 07:40 AM   #7
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by contusion View Post
Since you formatted the partition and also made a new ext3 filesystem how is it going to keep essential grub files.
Normally grub files are present in the
/boot/grub
directory.
I was hoping it wouldn't.

I thought that a reinstall of the grub bootloader might retain the configuration files which caused the error. The only way (in my mind) to be completely sure that the any prior information on the partitions was removed would be a completely clean install.
 
Old 05-28-2009, 08:50 AM   #8
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
I'm reading that grub has a problem with an inode size of 256, which I apparently I have unwittingly formated my ext3 partition with.

It seems that, in preparation for the next generation of file systems that the mkfs command has this as default.
 
Old 05-28-2009, 09:02 AM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
the grub located in slackware/extra has the patch to boot the 256 inode size
 
Old 05-28-2009, 09:08 AM   #10
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by colorpurple21859 View Post
the grub located in slackware/extra has the patch to boot the 256 inode size
Thanks.

I'll see if I can track it down.

This Article by Carla Schroder discusses this issue.
 
Old 05-28-2009, 11:20 AM   #11
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by colorpurple21859 View Post
the grub located in slackware/extra has the patch to boot the 256 inode size
Doesn't install.

Says "Could not find device for /boot: Not found or not a block device"

Looks like I'm going to have to reformat my ext3 disk. Damn.
 
Old 05-28-2009, 02:28 PM   #12
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
can you extract the files out of the grub.tgz file, if so you might be able to rename you puppy grub files in /boot/grub and either the subdirectory of /lib or /usr/lib not sure, so you can put them back if this dosen't work. replace it with the grub files out of the tgz package. then copy the stage files to /boot/grub and rerun grub manually. Don't know if this makes any sense to you. I did it once before, a while back when I had the same problem and it worked. Don't really remember what I did but is was something like this. but then again it might be easier to reformat using puppy and don't format during the installation
 
Old 05-29-2009, 01:46 AM   #13
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by colorpurple21859 View Post
can you extract the files out of the grub.tgz file, if so you might be able to rename you puppy grub files in /boot/grub and either the subdirectory of /lib or /usr/lib not sure, so you can put them back if this dosen't work. replace it with the grub files out of the tgz package. then copy the stage files to /boot/grub and rerun grub manually. Don't know if this makes any sense to you. I did it once before, a while back when I had the same problem and it worked. Don't really remember what I did but is was something like this. but then again it might be easier to reformat using puppy and don't format during the installation
Hey Purple!

Thanks for your efforts, but the white towel has come flying into the centre of the ring.

I've spent a couple of days on this just to avoid having to reformat and reinstall which would have taken me an hour, tops!

In the end that's what I did.

mkfs.ext3 -I 128 /dev/hda3

reinstall.

works fine. From what I understand, this is all so that when ext4 comes along it will be simply a matter of pulling the rug out from underneath the furniture and sliding the new file format in underneath, so clearly I won't have that functionality. But in the mean time my bootloader can boot all of my OSes.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot - Configs - Confused - Grub - Help nitrohuffer2001 Linux - General 6 09-29-2006 02:08 PM
confused about system stack George2 Programming 3 06-05-2006 03:24 PM
Configuring GRUB for XP, confused about map commands TigerFX Linux - Software 3 05-13-2006 10:31 AM
confused by my new red hat 9 system dave bean Red Hat 3 03-04-2005 07:29 AM
RPM system, I am confused ravalox Linux - Software 1 06-12-2004 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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
Open Source Consulting | Domain Registration