LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Grub confused about File System (https://www.linuxquestions.org/questions/linux-general-1/grub-confused-about-file-system-729051/)

cov 05-28-2009 05:04 AM

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.

syg00 05-28-2009 05:27 AM

Quote:

Originally Posted by cov (Post 3555238)
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.

cov 05-28-2009 06:08 AM

Quote:

Originally Posted by syg00 (Post 3555253)
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.

cov 05-28-2009 06:35 AM

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!

cov 05-28-2009 06:47 AM

Nope.

I trashed the MBR and rewrote it. Grub still can't see the file system.

veerain 05-28-2009 06:56 AM

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.

cov 05-28-2009 07:40 AM

Quote:

Originally Posted by contusion (Post 3555309)
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.

cov 05-28-2009 08:50 AM

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.

colorpurple21859 05-28-2009 09:02 AM

the grub located in slackware/extra has the patch to boot the 256 inode size

cov 05-28-2009 09:08 AM

Quote:

Originally Posted by colorpurple21859 (Post 3555419)
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.

cov 05-28-2009 11:20 AM

Quote:

Originally Posted by colorpurple21859 (Post 3555419)
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.

colorpurple21859 05-28-2009 02:28 PM

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

cov 05-29-2009 01:46 AM

Quote:

Originally Posted by colorpurple21859 (Post 3555745)
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.


All times are GMT -5. The time now is 11:37 AM.