[Techtalk] I lost my filesystem

Carla Schroder carla at bratgrrl.com
Mon Apr 14 09:15:09 EST 2003

On Monday 14 April 2003 6:14 am, Hanlie Pretorius wrote:
> Hi,
> I'm fairly new to Linux and I use Redhat 8.
> I had one disk that I shared between Windows 2000 and Linux. I then got a
> new disk and loaded Linux on the second disk as well. I could see the old
> Linux partition and Windows from the second disk and everything worked
> fine.
> Then I used PartitionMagic in Windows to delete the old Linux partitions
> and I extended the Windows partition to cover the whole disk. From that
> time on the Linux boot sequence on the second disk stops where it tries to
> find my root file system (the second partition on my 2nd hard disk - hdb2).
> It then gives me the option to go to a shell and at that point I'm more or
> less in the same place as a rescue boot.
> Our systems administrators have looked at it and they say I've lost the
> label of the partition or GRUB doesn't know where the parition is. Although
> I can reload Linux on the second drive, I'd prefer to save everything that
> I've setup on it from oblivion.
> We've tried the following to solve the problem:
> * change fstab to remove references to hda but the whole system is in
> read-only mode and we can't save fstab (we can see the three partitions
> though)
> * change the label of hdb2 with fdisk and parted
> Can someone out there help me please? I feel very frustrated (and stupid!)
> Thanks
> Hanlie

How familiar are you with GRUB? GRUB reads filesystems and kernel executables, 
rather than inflexibly restricting the user to disk geometry. It uses a 
different partition numbering scheme than fdisk, GRUB starts from 0:


 translates to

 A second hard drive is hd1, and so forth..

GRUB can find the boot partition and kernel. At boot, hit C to get to GRUB's 
command line. To boot manually, you need 3 things: root, kernel, then the 
'boot' command. Use tab completion to find the root and kernel values. Type 
the known value, in your case hd1, then keep hitting tab until something 

#use tab-completion
 grub> root (hd1, 

GRUB will respond something like this:

 Possible partitions are:
 Partition num: 0, Filesystem type is reiserfs, partition type 0x83
 Partition num: 1, Filesystem type unknown, partition type 0x92
 Partition num: 3, Filesystem type unknown, partition type 0x17
 Partition num: 4, Filesystem type is ext2fs, partition type 0x83

Enter the correct partition, yours is hdb2, so it looks like this:

grub> root (hd1,1)

GRUB will confirm:

 Filesystem type is ext2fs, partition type 0x83

Now find the kernel:

 #use tab-completion
 grub> kernel /boot/vmlinuz 
 Possible files are: vmlinuz vmlinuz-2.4.19

Enter vmlinuz-2.4.xx, whatever yours is, plus append the correct root line. 
Notice the trickiness, on this line use fdisk-type values:

grub> kernel /boot/vmlinuz-2.4.19 root=/dev/hdb2

Enter the boot command:

 grub> boot

If you found the correct root partition and kernel, it will boot. Then edit 
your GRUB boot menu, and there you are. Don't listen to people who tell you 
to change your partition labels, they don't know what they are talking about.

Carla Schroder
this message brought to you
by Libranet 2.7 and Kmail

More information about the Techtalk mailing list