[ltp] Missing superblock or hide n' go seek

Joshua Jore linux-thinkpad@www.bm-soft.com
Sun, 20 Feb 2000 12:52:01 -0600



Bill: this is bcced to you in the hopes that perhaps you'll have a clue about
this.

This is an operator error issue and while I know in theory how to fix the
problem I'm familiar enough with the tools to do it without help.

Booted into al VFAT partition using UMSDOS /dev/hda1 in C:\LINUX (running slack
3.4 ; don't ask, this is just staging for another much older laptop which
couldn't use newer software). I've accidentally had the superblock of /dev/hda
copied to /boot/boot.0300 and of course, there's something in the superblock
that thinks it's supposed to boot to /mnt/floppy/vmlinuz. The problem is: now
that / isn't mounted anymore I can't mount it again since the current superblock
is toast I need to do something like:

dd if=/boot/boot.0300 of=/dev/hda bs=512 count=1

The biggest problem is that there isn't a valid partition table in the current
superblock so I can't do something nice like boot from a disk and mount /. I
think I need to do one of two things:

1# edit the superblock by hand and put something reasonable there. If I'm going
to do that I need to use some kind of hex editor from a console prompt. I don't
know of any (that work in Linux anyway). I would just need an idea of where to
get a hex editor that's up to the job.

2# a much better solution (and easier too) would be to find the file
/boot/boot.0300 somewhere in /dev/hda and then copy it over the current
superblock. I assume that the best way of doing this would be some sort of
pattern matching to look for a win98 boot record ... somewhere on the disk. Once
I find it I'd need to be able to copy that block (really only 512 bytes; I
think) to either a staging location so I could inspect it or directly to the
superblock of /dev/hda (remember, the current one is already toast). I assume
this means doing something with grep but I'm no expert here.

Can anyone.... *please* help? with sugar on top? and a glass of milk also?

Josh Jore
jjore@imation.com
Nothing I say here should be construed to have anything to do with Imation's
positions on anything, including whether the earth orbits the sun or something
else.


----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html