[clue-tech] Help Recovering from grub-install error
Matt Gushee
mgushee at havenrock.com
Sat Mar 26 17:07:40 MST 2005
gthrelk at comcast.net wrote:
>>You haven't lost your data, everything about Windows is fine except the
>>boot partition. You can copy off the data and reinstall, which might be
>>quickest, or you can understand your partition tables and MBRs well
>>enough to fix them (that's my vote, then you might learn enough not to
>>break them in the future).
>>
>>I don't have time to speculate more at the moment, but send me the
>>output of these commands:
> Can't really tell you where grub was originally. I would have thought that
> /dev/hda and /dev/hda1 both pointed to the same area i.e. the beginning of the
> first disk. Looking at the results of your requested commands, I guess
> I've already learned something new since they show different results.
Right. /dev/hda represents the whole disk, while /dev/hda1 is the first
partition. The first 512 (?--or is it 1024?) bytes of /dev/hda are the
Master Boot Record (MBR).
> I've attached the output of the fdisk -l and sudo command output. Ignore
> the third disk, its a disk that I just hooked up that's empty.... space for me
> to copy if that's my only option. If I must do the copy, as I can't seem to
> view the vfat files with windows, do you have a suggestion as to how best to
> copy using Linux?
It should be dead simple. First of all, you need to mount the Windows
partition under Linux. I haven't used any RedHattish Linux for 2 or 3
years, but most modern Linuces with stock kernels and default
configurations will let you just do (possibly as root):
mount /c # Or whatever the mount point is called
Fedora/GNOME might have some sort of automounting capability, such that
the partition will get mounted when you click on it in the file manager.
As far as copying goes, I would probably do something like:
for dir in foo bar baz; do
tar cpf /my/backup/directory/`basename $dir`.tar /c/$dir
done
[ I dunno how much shell scripting you know--let me know if there's
anything unclear about that. ]
Coupla comments on the tar options: it's been a long time since I've
dealt with a Win partition, but I think the 'p' flag will preserve the
permissions on all the files. Note that there's no compression. If you
have enough spare disk space, you're better off not compressing.
Compressing a whole partition takes a looong time, even with gzip; bzip2
is ridiculous.
Now, there will be one semi-serious problem: your file names will
probably be mangled. Long file names in Windows (at least in 9x; not
sure about XP) are implemented in the GUI layer; the underlying names
are old-style DOS 8.3, and that's all that Linux can see. I imagine
there's some tool or kernel module that can read the long file names,
but I doubt that it comes built into the system, even FC3.
--
Matt Gushee
Englewood, CO, USA
More information about the clue-tech
mailing list